Skip to content

feat(v2): complete model APIs, packages and prices for OpenAI, Anthropic, Google, Vertex, xAI, Mistral, Cohere, DeepSeek, Perplexity and Meta - #11135

Merged
rekram1-node merged 12 commits into
devfrom
imp-labs
Oct 23, 2026
Merged

rekram1-node merged 12 commits into
devfrom
imp-labs

Conversation

@rekram1-node

@rekram1-node rekram1-node commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

The first-party lab files listed one API per model, even where the lab serves the same model on several (OpenAI Chat Completions and Responses, Anthropic's OpenAI-compatible endpoint, Gemini Interactions, and so on).

Change

Code. The v1 fix (a first table without its own aisdk uses the provider's npm; @ai-sdk/xai is Responses-default) already landed with #11136. This PR adds the matching v2 resolveProtocol change for @ai-sdk/xai, and the Mistral sync now writes FIM, Moderations and OCR tables from /v1/models capabilities (documented in sync.md).

Per provider. The first table is always what the model already published.

Provider APIs added Notes
OpenAI Chat Completions on 21 chat models (+13 pending, see below); [api.moderations] on omni-moderation-latest (was Responses) Source: each model page's Endpoints table. Responses-only models (pro, codex, daybreak) unchanged
Anthropic OpenAI-compatible Chat Completions (https://api.anthropic.com/v1) on 16 (+1 pending)
Google OpenAI-compatible Chat Completions and Interactions on 18 chat models (+2 pending); Interactions on Lyria, image and TTS models; OpenAI-compatible /embeddings on 2 embedding models Checked live
Vertex Interactions (global location) on the 7 Gemini models in the reference; Responses on 5 Grok models
xAI [api.responses] first, then Chat Completions, on 7 models; multi-agent is Responses only (Chat rejects it) Checked live. v1 unchanged thanks to the generator fix
Mistral FIM (codestral), Moderations, OCR The sync now writes these from /v1/models capabilities (completion_fim, moderation, ocr); real sync then dry run = 0 changes
Cohere Compatibility API Chat Completions on 16 models, native cohere-chat on north-mini-code Checked live; reasoning_content on the reasoning models
DeepSeek Anthropic-compatible Messages on all 4 Checked live
Meta Chat Completions (meta/chat) and Messages (meta/messages) next to Responses on all 6 Checked live
Perplexity none Sonar IDs are rejected by /v1/responses (it needs perplexity/sonar, which is the separate perplexity-agent provider)

Packages. Every new table names the most specific @opencode/ai entry that exists (openai/chat, google/interactions, google-vertex/interactions, google-vertex/responses, cohere/chat, meta/chat, meta/messages) or a generic one (openai-compatible, anthropic-compatible). Where none can call the API, it says none; those are added to the gaps note (Mistral FIM/moderations/OCR, Google Interactions with non-text output, xAI chat).

Prices. Already complete for these providers (context tiers, cache TTLs, priority/flex/fast, regional uplift, web search); nothing added. Batch is still not modeled.

Pending user approval (last commit)

Vercel symlinks 16 of these files (providers/vercel/models/openai/gpt-4o.toml -> ../../../openai/models/gpt-4o.toml, etc.), so first-party tables would leak into Vercel. The last commit replaces those 16 symlinks with copies of the current files and adds the same tables to the first-party files.

  • v1: no field changes, but those 16 models move within Vercel's model map (regular files scan in a different order than symlinks).
  • The 13 OpenAI and Claude copies are linked to their lab models with base_model (keeping only Vercel-served overrides). v1: those 13 gain canonical_model_id.
  • The next Vercel sync would start patching the copies from Vercel's catalog. A trial run changed modalities, limits, reasoning options and tiers on all 16 (for example gemini-2.5-flash context 1,048,576 -> 1,000,000).

Out of scope / report only

  • Vertex Gemini on endpoints/openapi/chat/completions needs the ID google/<id>, so it can't be listed on these files.
  • xAI /v1/messages answers but is under "Legacy & Deprecated"; Mistral Conversations API; Gemini computer-use (every API demands its tool); Gemini 2.5 TTS and 3.8 Flash-Lite TTS on Interactions (not confirmed).
  • Missing models: Meta muse-image-1.0, muse-voice-transcribe-1.0, sam-3.1; Vertex Muse Spark 1.3.
  • Possibly dead: Vertex xai/grok-4.1-fast-* (not on the partner-model list).

Verification

  • bun validate: passes.
  • bun run v1:check: byte-identical up to the pending commit; with it, only canonical_model_id added on 13 Vercel models (plus the 16-model key reorder in Vercel).
  • bun test: 717 pass, 10 fail (the same 10 as dev).
  • v2 output vs dev: API changes only (no other field changes). openai 34 models, anthropic 17, google 34 (54 APIs), vertex 12, xai 8 (first API now Responses), mistral 5, cohere 17, deepseek 4, meta 6 (12 APIs).
  • Sync dry runs (openai, anthropic, google, xai, mistral, meta): 0 updated. The Mistral real sync wrote exactly the 5 files here, and a second run changed nothing.

@github-actions

Copy link
Copy Markdown
Contributor

Action items

  • [high] [violation] providers/cohere/models/north-mini-code-1-0.toml:34 - Check: v1 default is the first [api.*] table and must not change without a sourced, listed fix. Why: This file already published [api.chat-completions] with base_url/sdk/compatibility; the diff inserts empty [api.cohere-chat] first, so v1 loses provider.npm/provider.api and interleaved.field, contradicting the PR claim that the first table is always what was already published. Action: Keep [api.chat-completions] first and list [api.cohere-chat] second, or keep the new default only with explicit v1-break justification, bun run v1:check output, and maintainer approval.
  • [high] [violation] providers/vercel/models/openai/gpt-4-turbo.toml:1 - Check: A non-lab host must use base_model; full inline definitions are only for the lab or host-unique models. Why: Vercel did not create GPT/OpenAI, Gemini, or Claude models yet 13 replacements in this patch are full copies without base_model (e.g. gpt-4-turbo, gpt-4.1, gpt-4o, o1/o3/o4-mini, claude-sonnet-4.5), freezing first-party pricing/capabilities as Vercel data where established Vercel files use base_model overlays. Action: Rewrite each as base_model = "<lab>/<model>" plus only real Vercel deltas, adding missing models/<lab>/<model>.toml first if nameable, or justify a host-unique exception.
  • [medium] [possible mistake] providers/xai/models/grok-4.3.toml:45 - Check: A table naming another aisdk must name its own opencodeai; a Chat Completions table taking the provider npm must actually be served by that SDK. Why: Anthropic's added Chat table names both aisdk = "@ai-sdk/openai-compatible" and opencodeai, while xAI's added [api.chat-completions] leaves aisdk inherited as @ai-sdk/xai (Responses-default) but overrides opencodeai to generic @opencode/ai/providers/openai-compatible, implying the SDKs disagree on the same generic endpoint. Action: Verify whether xAI Chat uses @ai-sdk/xai or @ai-sdk/openai-compatible and add explicit aisdk if needed for consistency with the Anthropic pattern.

@rekram1-node

Copy link
Copy Markdown
Collaborator Author

Thanks. Fixed the Vercel copies in 92e553ca8: the 13 full copies now use base_model with only the Vercel-served overrides (v1 adds canonical_model_id to those 13, listed under pending approval).

Declined:

  • north-mini-code-1-0: [api.chat-completions] is still the first table. [api.cohere-chat] was appended after it, and bun run v1:check is byte-identical for this file.
  • xAI chat aisdk: @ai-sdk/xai serves Chat Completions through xai.chat(), so the table inherits the provider's package on purpose. Only opencodeai differs, because @opencode/ai/providers/xai defaults to Responses and has no xai/chat entry point (noted in the gaps list).

@github-actions

Copy link
Copy Markdown
Contributor

No actionable findings.

@github-actions github-actions Bot added the reviewer: ready Automated review found no actionable items label Oct 23, 2026
@github-actions github-actions Bot removed the reviewer: ready Automated review found no actionable items label Oct 23, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Action items

  • [high] [violation] packages/core/src/generate-v2.ts:440 - Check: v1/v2 Responses-default mapping must stay symmetric. Why: This PR makes toV1Shape treat @ai-sdk/xai as Responses-default but leaves resolveProtocol (npm === "@ai-sdk/openai" || npm === "@ai-sdk/azure") unchanged, so v2 responses maps to v1 no-shape while v1 no-shape on xAI maps back to chat-completions via newModelProtocol/toApiV2. Action: Add @ai-sdk/xai to the Responses-default branch in resolveProtocol, matching translate.ts.
  • [medium] [violation] sync.md:303 - Check: Sync documentation must match sync behavior. Why: mistral.ts now writes fim/moderations/ocr APIs via withApis/v2Set for existing OCR/moderation files (see providers/mistral/models/mistral-ocr-*.toml, mistral-moderation-*.toml in PATCH 09), but sync.md still says those rows are ignored and kept unchanged. Action: Update Mistral Notes to describe authoritative API fields and preservation of other hand-authored fields.
  • [low] [possible mistake] packages/core/src/translate.ts:329 - Check: Material generator factual claim needs direct evidence. Why: v1 preservation for all new xAI [api.responses]-first files depends on the assertion that createXai().languageModel() is the Responses model, but the PR body provides no AI SDK source for it and URLs cannot be verified in review. Action: Cite the direct AI SDK source stating what @ai-sdk/xai defaults to.
  • [low] [possible mistake] providers/vercel/models/openai/gpt-5.toml:1 - Check: v1 data changes need sourced listing and maintainer approval. Why: PATCH 13 replaces 16 symlinks with base_model files, changing canonical_model_id and Vercel model-map placement; the commit message itself marks them pending approval, so bun run v1:check impact is not yet signed off. Action: Provide full v1:check output for the Vercel conversions and confirm maintainer approval.

@rekram1-node

Copy link
Copy Markdown
Collaborator Author

Fixed in the new head: resolveProtocol now treats @ai-sdk/xai as Responses-default too (no v2 output change, since every xAI file has tables), and sync.md describes the Mistral API tables. The xAI default is cited in translate.ts: createXai().languageModel is createResponsesLanguageModel in packages/xai/src/xai-provider.ts.

Vercel conversions: the full bun run v1:check lists only api canonical_model_id: added on 13 Vercel models, plus a key reorder for the 16 converted files. That's the last commit, and it's listed under pending maintainer approval.

@github-actions

Copy link
Copy Markdown
Contributor

No actionable findings.

@github-actions github-actions Bot added the reviewer: ready Automated review found no actionable items label Oct 23, 2026
…ls Vercel symlinks (pending approval)

Vercel's files for these models were symlinks to the first-party files, so the
first-party API tables would leak into Vercel. This replaces the 16 symlinks
with Vercel files (the 13 full OpenAI and Claude copies use base_model with
only the overrides), then lists the same APIs as the other first-party models.

v1: no field changes except canonical_model_id on the 13 base_model files; the
16 models also move within Vercel's model map. The next Vercel sync will start
patching these files from Vercel's catalog.
@github-actions github-actions Bot removed the reviewer: ready Automated review found no actionable items label Oct 23, 2026
@github-actions

Copy link
Copy Markdown
Contributor

No actionable findings.

@github-actions github-actions Bot added the reviewer: ready Automated review found no actionable items label Oct 23, 2026
@rekram1-node
rekram1-node merged commit d24949e into dev Oct 23, 2026
2 checks passed
@rekram1-node
rekram1-node deleted the imp-labs branch October 23, 2026 05:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

reviewer: ready Automated review found no actionable items

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant