Expose gateway billing flows from the synced server baseline

The preserved local work adds PopiNewAPI billing checkout, gateway account binding, and matching web console/pricing surfaces on top of the current test-server baseline. During the merge, the start-end video helpers from the deployed baseline were kept alongside the actionGenerate prompt handling from the WIP.

Constraint: Current usable baseline is 7054436, already deployed on the test server.

Rejected: Commit the WIP before syncing the baseline | would have hidden conflicts with the deployed start-end-frame changes.

Confidence: medium

Scope-risk: broad

Directive: Do not deploy this commit to the test server without rechecking gateway credentials and billing checkout behavior in that environment.

Tested: go test ./...

Tested: make build

Tested: cd web && npm run build
This commit is contained in:
wtgoku
2026-05-21 16:53:07 +08:00
parent 7054436a99
commit baba209519
31 changed files with 6035 additions and 86 deletions
+14 -2
View File
@@ -25,6 +25,7 @@ func TestHandleModelsLoadsDynamicCatalogFromNewAPI(t *testing.T) {
{"id":"seedream-4-5-251128","owned_by":"custom","supported_endpoint_types":[]},
{"id":"sora-2","owned_by":"openai","supported_endpoint_types":["openai-video"]},
{"id":"viduq2","owned_by":"custom","supported_endpoint_types":[]},
{"id":"doubao-seedance-2-0-260128","owned_by":"custom","supported_endpoint_types":[]},
{"id":"custom-i2v-preview","owned_by":"custom","supported_endpoint_types":[]},
{"id":"gpt-4.1","owned_by":"openai","supported_endpoint_types":["openai"]}
]
@@ -74,8 +75,8 @@ func TestHandleModelsLoadsDynamicCatalogFromNewAPI(t *testing.T) {
if !resp.OK {
t.Fatalf("expected ok response, got %s", rec.Body.String())
}
if len(resp.Data.Items) != 5 {
t.Fatalf("expected 5 supported media models, got %d: %s", len(resp.Data.Items), rec.Body.String())
if len(resp.Data.Items) != 6 {
t.Fatalf("expected 6 supported media models, got %d: %s", len(resp.Data.Items), rec.Body.String())
}
byID := make(map[string]model, len(resp.Data.Items))
@@ -133,6 +134,17 @@ func TestHandleModelsLoadsDynamicCatalogFromNewAPI(t *testing.T) {
t.Fatalf("expected viduq2 provider vidu, got %q", viduModel.Provider)
}
seedanceModel, exists := byID["doubao-seedance-2-0-260128"]
if !exists {
t.Fatal("expected doubao-seedance-2-0-260128 in dynamic model list")
}
if seedanceModel.Type != "video" {
t.Fatalf("expected doubao-seedance-2-0-260128 type video, got %q", seedanceModel.Type)
}
if seedanceModel.Provider != "volcengine" {
t.Fatalf("expected doubao-seedance-2-0-260128 provider volcengine, got %q", seedanceModel.Provider)
}
fallbackModel, exists := byID["custom-i2v-preview"]
if !exists {
t.Fatal("expected fallback-classified video model in dynamic model list")