OpenRouter video: POST /api/v1/videos returns 200, but the official SDK only accepts 202
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 78/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- javascript, openapi, typescript
Línea de trabajo
Empieza en dist/openrouter-video.js, en handleOpenRouterVideoCreate, e inspecciona la ruta del fixture y la ruta de record/proxy que replica. Reproduce la llamada con @openrouter/sdk y verifica que la creación del vídeo devuelve 202 con el cuerpo de respuesta existente, mientras que el polling y la descarga permanecen sin cambios.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Summary
The OpenRouter video mock added for #261 answers job creation (POST /api/v1/videos) with HTTP 200. The official @openrouter/sdk accepts only 202 for that call, so every job created through the real SDK fails before polling starts.
Poll (GET /api/v1/videos/{id}) and download (GET /api/v1/videos/{id}/content) work correctly.
Versions
@copilotkit/aimock1.43.0@openrouter/sdk0.13.20 and 1.4.21 (same behavior in both)
Reproduce
import { LLMock } from '@copilotkit/aimock'
import { OpenRouter } from '@openrouter/sdk'
const mock = new LLMock({ port: 4099, host: '127.0.0.1' })
mock.onVideo('a guitar being played in a store', {
video: { id: 'job-1', status: 'completed', url: 'https://example.com/v.mp4' },
})
await mock.start()
const client = new OpenRouter({
apiKey: 'test',
serverURL: 'http://127.0.0.1:4099/api/v1',
})
await client.videoGeneration.generate({
videoGenerationRequest: {
model: 'google/veo-3.1-lite',
prompt: 'a guitar being played in a store',
},
})
Actual
The SDK throws:
OpenRouterDefaultError: Unexpected Status or Content-Type: Status 200
Body: {"id":"e8c64b76-…","polling_url":"http://127.0.0.1:4099/api/v1/videos/e8c64b76-…","status":"pending"}
The body is correct. Only the status code is rejected.
Expected
202 Accepted with the same body.
Why 202
The SDK is generated from OpenRouter's OpenAPI spec, and its response matcher for this operation lists 202 as the only success status (esm/funcs/videoGenerationGenerate.js):
M.match(
M.json(202, models.VideoGenerationResponse$inboundSchema),
M.jsonErr(400, …), M.jsonErr(401, …), M.jsonErr(402, …),
M.jsonErr(404, …), M.jsonErr(429, …), M.jsonErr(500, …),
M.fail("4XX"), M.fail("5XX"),
)
This is unchanged between SDK 0.13.20 and 1.4.21.
Where
In dist/openrouter-video.js, the create handler (handleOpenRouterVideoCreate) ends with res.writeHead(200, { "Content-Type": "application/json" }). The fixture path and, if it mirrors the upstream status, the record/proxy path should both send 202.
Impact
TanStack AI cannot add openrouter to its video-gen e2e matrix with the built-in handler. The adapter uses the official SDK, so creation fails on the status code. We are keeping OpenRouter video on unit tests until this is fixed (TanStack/ai#1541).
- Lenguaje dominante
- TypeScript
- Estrellas
- 979
- Forks
- 84
- Merge medio
- 1 d 5 h
- PR fusionados (30 d)
- 58
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Sin plantilla de pull request
- Sin guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de CopilotKit/aimock
-
Dificultad 3/5 1-2 días Aptitud para principiantes 58/100
CopilotKit/aimock#549 ·
Los mantenedores suelen responder en 1 día
-
Feature: model-generated files (inline images) in chat/responses turnsPosiblemente ocupada @abhiaiyer91 la tomó hace 3 días. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
CopilotKit/aimock#548 ·
Los mantenedores suelen responder en 1 día
-
Feature: scriptable citations / annotations on text responsesPosiblemente ocupada @abhiaiyer91 la tomó hace 3 días. Abierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
CopilotKit/aimock#547 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
CopilotKit/aimock#544 ·
Los mantenedores suelen responder en 1 día
-
Feature request: provider-native model listing, required-header validation, and non-chat endpoints (Anthropic / Gemini)Posiblemente ocupada @jpr5 la tomó hace 8 días. Abierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 14/100
CopilotKit/aimock#519 · 1 reacción · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de CopilotKit/aimock
Issues similares
-
area:editor bug issue-form:bug P0 platform:windows review: low
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
1lck/Lithe-IDEA#1388 ·
Los mantenedores suelen responder en 1 día
-
fix(api): isToolAuditEnabled swallows database read errors on auditToolOperations without loggingAbiertoarea: backend bug priority: low
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
snapotter-hq/SnapOtter#3238 ·
Los mantenedores suelen responder en 1 día
-
rig up --plan times out after 5 s and reports an UNKNOWN outcome while the daemon completes the planAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
filesystem: search_files does not expand non-wildcard excludePatterns like directory_tree doesAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
modelcontextprotocol/servers#5216 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día