Files
5ac63b800b feat(sarvam): add Token Factory models and move the provider to /v2 (#13896)
* feat(sarvam): add Token Factory models and move the provider to /v2

Add the open-source models Sarvam serves on /v2 (GLM 5.3, GLM 5.3 Flash,
Gemma 4, DeepSeek V4.1 Flash 1017 Standard and Interactive), add
sarvam-105b-conversations, add Sarvam Prism as a decision model on
/v2/systemone, add the provider logo, and correct sarvam-105b to the current
introductory pricing and the 128,000-token window the host publishes.

Move the provider default to https://api.sarvam.ai/v2, the base URL the
Token Factory docs publish, and point the provider docs at the Token Factory
models index. Remove sarvam-30b: the API returns 400 "has been deprecated"
on /v1 and 404 on /v2, and the provider page does not hide deprecated rows,
so keeping it would leave a dead model on the page.

sarvam-105b sets compatibility.max_tokens_field = "max_tokens": the host
rejects max_completion_tokens above 32,768 but accepts max_tokens up to the
window, and opencode sends max_completion_tokens by default.
sarvam-105b-conversations does not need the override: its window is 32,000
and max_completion_tokens=32000 returns 200.

Address the automated review: author DeepSeek reasoning as effort with none
and no toggle, cite the image caps and defaults from GET /v2/models, add
capabilities.cache to every model that prices cache reads, move citations
into the leading header blocks, drop sarvam-prism's redundant base_url, cite
the pricing page's own 94 INR per USD conversion, and correct Gemma 4 to
reasoning_effort none|low|high|max with default none plus the
reasoning_content and max_tokens compatibility fields. Sarvam Prism's lab
entry is open weights with a 131,072-token context from the 2026-11-03 blog,
and the provider entry overrides the context to the 32,768 that /v2/models
publishes.

No sync module: GET /v2/models publishes no prices and lists provisioned-only
models alongside GA ones, so a sync module would need a hand-maintained price
table and an access filter. That is a separate change.

Testing:
- bun validate: pass
- bun run v1:check: exits 1 with only the changes above
- bun run test (packages/sdk): 25 pass, 0 fail
- bun test: 857 pass, 13 pre-existing failures identical on a clean tree
- Live API: all seven chat model IDs return 200; vision on glm5.3-flash,
  gemma4, deepseekv4.1-flash-1017 and its interactive variant; tools on all
  seven chat models; reasoning effort low/high/max, none and the null toggle
  verified.
- gemma4: default and "none" return 0 reasoning tokens; low/medium/high/max
  return 200 with reasoning_content.
- sarvam-105b-conversations: max_completion_tokens=32000 returns 200; 32769
  returns 400 (max_model_len 32768).
- sarvam-prism: noul, choice and score questions all return 200 on
  POST /v2/systemone.
- sarvam-30b: 400 "has been deprecated" on /v1, 404 on /v2.
- opencode 2.3.0 with the generated catalog: lists all seven chat models and
  runs prompts through sarvam-105b, glm5.3, gemma4,
  deepseekv4.1-flash-1017 and its interactive variant.

🪷 Generated with Sarvam Code

Co-authored-by: Sarvam Code <code@sarvam.ai>

* fix(sarvam): keep the Sarvam 30B lab file, sarvam-prism family and weights link

---------

Co-authored-by: Vikash Maddi <vikashmaddi-sarvam@users.noreply.github.com>
Co-authored-by: Sarvam Code <code@sarvam.ai>
Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
2026-11-22 22:42:22 -06:00
..