feat(server): dispatch /v1/videos and /v1/videos/sync by model

Registers the OpenAI/vLLM-Omni video generation endpoints as
model-dispatched routes so llama-swap can swap in video upstreams
(e.g. vllm serve <model> --omni, or a ComfyUI shim exposing the same
shape). Extraction is content-type driven, so both multipart form and
JSON bodies resolve the model field.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AXQxVhXBw8PwFAtsVrXSmj
This commit is contained in:
2026-07-12 09:25:55 -04:00
parent 0292c90ca1
commit cecb89880e
2 changed files with 48 additions and 0 deletions
+5
View File
@@ -80,6 +80,11 @@ var modelPostJSONRoutes = []string{
var modelPostFormRoutes = []string{
"/v1/audio/transcriptions",
"/v1/images/edits",
// video generation (vLLM-Omni / OpenAI videos shape); extraction is
// content-type driven, so JSON bodies dispatch on these paths too
"/v1/videos",
"/v1/videos/sync",
}
// modelGetRoutes are model-dispatched GET endpoints (the model arrives as a