Files
magpie/internal/catalog
ggbdpq 72e09cc019 catalog: a list's sora ids are video models, made at its OpenAI-shaped videos API (#4954)
What changed: a fetched model list keeps an id naming a video model the
way it keeps one that draws (FilmsID: sora-2, sora-2-pro). OpenAI's list
marks no kind, and textModel counts sora out of the chat models, so a
Sora model was never listed at all: the provider editor could not mark
it a video model, and startVideo answered 400 "can't make videos". A
sora id now reaches the list as Films - a video model of the provider,
asked at its OpenAI-shaped videos API, which the gateway already speaks
- and is still no chat model. The other video families keep the faces
their own APIs are asked on: Ark's Seedance at its tasks, a MiniMax
key's H3, and a model the user says makes videos (#1399).

Run:
- go test ./internal/gateway -run TestOpenAIKeySoraMakesVideos -count=1
  RED before (videomakers [] - the list carried no sora model), green
  after: sora-2 and sora-2-pro are the provider's video models, a video
  is started, polled and fetched at its /v1/videos, and neither id is
  among the chat models.
- TestCustomProviderMakesVideos, TestCustomProviderVideoNeedsTheListsWord,
  TestCustomProviderVideoTheUserMarks green, the last two with the
  fixture's unmarked model renamed to agnes-video-2.5-flash (#1399's own
  case): a name alone still makes no video model, even one with "video"
  in it.
- go test ./internal/catalog, the video family with -race, gofmt,
  go vet -tags nogui, builds (darwin, linux, windows): clean.

Reviewed and ported (on origin/main 1b0340fdb, cherry-picked clean;
main's Seedance-at-Ark commits 93060c98d and 5bd1aee63 cover Ark's
Domain/modalities faces only, and nothing on main lists sora):
- mote: TestOpenAIKeySoraMakesVideos, TestCustomProviderMakesVideos,
  TestCustomProviderVideoNeedsTheListsWord and
  TestCustomProviderVideoTheUserMarks green. With catalog.go and
  live.go put back to main, TestOpenAIKeySoraMakesVideos is red:
  "video_sora_test.go:70: videomakers []".
- The two existing tests' "sora-like-2" fixture is renamed to
  agnes-video-2.5-flash, since a sora id is now a video model by name;
  they still hold that a name alone makes no video model.
- mote: go test -tags nogui ./internal/catalog ok; -timeout 45m
  ./internal/gateway ok; vet darwin/linux/windows ok; gofmt -l clean.
Not tried: a real OpenAI key's Sora video (the upstream is httptest).

Co-authored-by: ggbdpq <ggbdpq@gmail.com>
Generated-by: GLM-5.3-Flash (ZCode)
2026-11-05 18:31:17 +08:00
..