chore: sync model metadata from OpenRouter - #1048
Conversation
🚀 Changeset Version Preview23 package(s) bumped directly, 29 bumped as dependents. 🟥 Major bumps
🟨 Minor bumps
🟩 Patch bumps
|
|
View your CI Pipeline Execution ↗ for commit 64a758d
☁️ Nx Cloud last updated this comment at |
harshlocham
left a comment
There was a problem hiding this comment.
Request changes — CI is red after this model sync
Ran the PR quality checks locally. Passing: sherif, knip, docs, kiira, oxlint, test:dts. Failing: test:types, test:lib, build/test:build.
1. Blocking — OpenRouter prediction breaks @tanstack/ai-openrouter:build / test:types
OpenRouter now advertises supported_parameters: ["prediction"] for:
mistralai/codestral-2508openai/gpt-4oopenai/gpt-4o-2024-05-13openai/gpt-4o-2024-08-06openai/gpt-4o-2024-11-20openai/gpt-4o-miniopenai/gpt-4o-mini-2024-07-18
The converter generates:
Pick<OpenRouterBaseOptions, ..., 'prediction', ...>OpenRouterBaseOptions is derived from @openrouter/sdk's ChatRequest, which does not expose a prediction field. This causes TS2344 during build and cascades into the OpenRouter type tests.
The converter already documents the intended behavior: parameters not supported by the SDK should be excluded because they are stripped by the outbound schema.
Suggested fix: add 'prediction' to excludedParams in scripts/convert-openrouter-models.ts, regenerate model-meta.ts, and verify @tanstack/ai-openrouter:build and test:types pass.
2. Blocking — Anthropic tool capability map is incomplete
claude-opus-5 and claude-opus-5-fast were added to:
ANTHROPIC_MODELSAnthropicChatModelProviderOptionsByNameAnthropicModelInputModalitiesByName
but not to AnthropicChatModelToolCapabilitiesByName.
As a result, the exhaustiveness check in tools-per-model-type-safety.test.ts fails.
Suggested fix: add tool capability entries for the new models and verify any other manually maintained capability maps remain exhaustive.
3. Blocking — Grok unit test is stale
GROK_CHAT_MODELS now includes grok-4.5, but grok-adapter.test.ts still asserts the previous list:
expect(GROK_CHAT_MODELS).toEqual([
'grok-build-0.1',
'grok-4.3',
])Suggested fix: update the expected model list to include grok-4.5.
End with the last suggested fix and nothing else.
a5ca6a3 to
fcb5d2d
Compare
c5c66ce to
5929856
Compare
dc0f690 to
7435a46
Compare
@tanstack/ai
@tanstack/ai-acp
@tanstack/ai-angular
@tanstack/ai-anthropic
@tanstack/ai-bedrock
@tanstack/ai-byteplus
@tanstack/ai-claude-code
@tanstack/ai-client
@tanstack/ai-code-mode
@tanstack/ai-code-mode-snippets
@tanstack/ai-codex
@tanstack/ai-cohere
@tanstack/ai-devtools-core
@tanstack/ai-durable-stream
@tanstack/ai-elevenlabs
@tanstack/ai-event-client
@tanstack/ai-fal
@tanstack/ai-gemini
@tanstack/ai-grok
@tanstack/ai-grok-build
@tanstack/ai-groq
@tanstack/ai-isolate-cloudflare
@tanstack/ai-isolate-daytona
@tanstack/ai-isolate-node
@tanstack/ai-isolate-quickjs
@tanstack/ai-isolate-quickjs-bun
@tanstack/ai-mcp
@tanstack/ai-memory
@tanstack/ai-mistral
@tanstack/ai-ollama
@tanstack/ai-openai
@tanstack/ai-opencode
@tanstack/ai-openrouter
@tanstack/ai-perplexity
@tanstack/ai-persistence
@tanstack/ai-preact
@tanstack/ai-react
@tanstack/ai-react-ui
@tanstack/ai-sandbox
@tanstack/ai-sandbox-cloudflare
@tanstack/ai-sandbox-daytona
@tanstack/ai-sandbox-docker
@tanstack/ai-sandbox-local-process
@tanstack/ai-sandbox-sprites
@tanstack/ai-sandbox-vercel
@tanstack/ai-solid
@tanstack/ai-solid-ui
@tanstack/ai-svelte
@tanstack/ai-utils
@tanstack/ai-vercel-gateway
@tanstack/ai-vue
@tanstack/ai-vue-ui
@tanstack/openai-base
@tanstack/preact-ai-devtools
@tanstack/react-ai-devtools
@tanstack/solid-ai-devtools
commit: |
64a758d to
f5ea8d1
Compare
f5ea8d1 to
50c7df0
Compare
- Image: add grok-imagine-image-2.0 (xAI's recommended model) with the
2.0-only quality provider option ('low' | 'medium').
- Video: drop the stale image-to-video-only guard on grok-imagine-video-1.5
(it now supports text-to-video with native 1080p); add reference-to-video
(role:'reference' image parts -> reference_images, preset voices via
modelOptions.reference_audios, max 3); add edit/extend modes via a source
video prompt part + modelOptions.mode ('edit' -> /v1/videos/edits,
'extend' -> /v1/videos/extensions with duration = added tail).
- Voice: add grok-voice-think-fast-2.0 (current recommended) and the
grok-voice-latest alias; move realtime token/adapter defaults off the
deprecated 1.0 ids.
- Fix the stale GROK_CHAT_MODELS test expectation broken by the #1048
model-metadata sync.
- Update docs, media-generation skill, and example apps accordingly.
Closes #1133
…ated model options (#1135) The OpenRouter model-metadata sync (#1048) started emitting 'prediction' in the generated per-model option Picks, but @openrouter/sdk's ChatRequest does not declare that field (its outbound schema would strip it at runtime), so packages/ai-openrouter no longer compiled and main CI went red. Add 'prediction' to the generator's excludedParams set (same rationale as the existing entries) and strip it from the generated model-meta. Also update the stale GROK_CHAT_MODELS test expectation that the same sync commit broke by adding grok-4.5 / grok-4.6.
- Image: add grok-imagine-image-2.0 (xAI's recommended model) with the
2.0-only quality provider option ('low' | 'medium').
- Video: drop the stale image-to-video-only guard on grok-imagine-video-1.5
(it now supports text-to-video with native 1080p); add reference-to-video
(role:'reference' image parts -> reference_images, preset voices via
modelOptions.reference_audios, max 3); add edit/extend modes via a source
video prompt part + modelOptions.mode ('edit' -> /v1/videos/edits,
'extend' -> /v1/videos/extensions with duration = added tail).
- Voice: add grok-voice-think-fast-2.0 (current recommended) and the
grok-voice-latest alias; move realtime token/adapter defaults off the
deprecated 1.0 ids.
- Fix the stale GROK_CHAT_MODELS test expectation broken by the #1048
model-metadata sync.
- Update docs, media-generation skill, and example apps accordingly.
Closes #1133
…1136) * feat(ai-grok): catch up Grok Imagine image, video, and voice modes - Image: add grok-imagine-image-2.0 (xAI's recommended model) with the 2.0-only quality provider option ('low' | 'medium'). - Video: drop the stale image-to-video-only guard on grok-imagine-video-1.5 (it now supports text-to-video with native 1080p); add reference-to-video (role:'reference' image parts -> reference_images, preset voices via modelOptions.reference_audios, max 3); add edit/extend modes via a source video prompt part + modelOptions.mode ('edit' -> /v1/videos/edits, 'extend' -> /v1/videos/extensions with duration = added tail). - Voice: add grok-voice-think-fast-2.0 (current recommended) and the grok-voice-latest alias; move realtime token/adapter defaults off the deprecated 1.0 ids. - Fix the stale GROK_CHAT_MODELS test expectation broken by the #1048 model-metadata sync. - Update docs, media-generation skill, and example apps accordingly. Closes #1133 * fix(ai-grok): harden video mode routing and per-model options after review Address /review-pr findings on #1136: - Reject unknown modelOptions.mode values instead of silently misrouting a source-video body to /videos/generations (wrong endpoint, wrong billing). - Stop leaking raw duration/aspect_ratio/resolution from modelOptions into edit/extend bodies: edit rejects any duration (output inherits the source clip's length) and both modes reject size/aspect_ratio/resolution, matching the documented inherit-from-source semantics instead of sending fields the API ignores. Extend still snaps its added-tail duration. - Hoist mode-exclusivity checks into a dedicated edit/extend path so error messages never give generation-path advice for mode requests. - Throw on unknown image metadata.role strings instead of silently dropping the part (roles arrive untrusted from JSON callers). - Gate reference inputs to grok-imagine-video-1.5 at runtime, and split the provider options per model (GrokVideoBaseProviderOptions vs the 1.5 shape) so v1.0 no longer advertises reference fields at compile time. - Extract GROK_DEFAULT_REALTIME_MODEL so the token issuer and client adapter can't drift apart on future default bumps. - Comment/doc accuracy fixes: 'character' role alias documented, stale xAI URL and file headers refreshed, create-response JSDoc covers all three endpoints, deprecated 1.0 voice ids named in docs, example now requests the native 1080p it advertises. - 10 new tests: unknown mode/role rejection, edit duration/size rejection, extend snapping (modelOptions + generic), combined start-frame+reference body, explicit reference_images override, v1.0 reference gating, 1080p T2V body assertion, realtime token default model. * fix(ai-grok): restrict edit/extend to grok-imagine-video and reject mixed modes * fix(ai-anthropic): add opus-5 models to the tool-capabilities map * fix(ai-grok): normalize JSON-null options and name endpoints in failures Re-applies the review residuals on top of the rebased branch: - Treat JSON-serialized null / empty-array values for duration and the reference fields as unset on every path: the generation branch no longer sends "duration": null or empty reference arrays, and null reference fields no longer trip the v1.0 reference gate; edit/extend destructure the reference fields out of the passthrough so no known key can leak into those bodies. - Name the actual endpoint in create-job failure messages so a failed edit/extension no longer reports as a 'video generation' failure. - Type-tie GROK_VIDEO_REFERENCE_MODELS / GROK_VIDEO_SOURCE_MODELS to the per-model options map so a typo or an unlisted future capable model is a compile error. - Sync the media-generation skill with the current contract (v1.0-only edit/extend, reference caps, 720p reference cap, 1080p on 1.5 only, edit/extend option rejections). - Tests: null-duration strip, null/empty reference normalization, endpoint-named edit failure (124 total). --------- Co-authored-by: Alem Tuzlak <t.zlak@hotmail.com>
Automated daily sync of model metadata from the OpenRouter API.