Skip to content

Add Sarvam AI provider (Token Factory v2) - #53

Merged
mythz merged 1 commit into
ServiceStack:mainfrom
vikashmaddi-sarvam:feat/sarvam-provider
Nov 25, 2026
Merged

mythz merged 1 commit into
ServiceStack:mainfrom
vikashmaddi-sarvam:feat/sarvam-provider

Conversation

@vikashmaddi-sarvam

@vikashmaddi-sarvam vikashmaddi-sarvam commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Sarvam AI is on models.dev (anomalyco/models.dev#13896) with the OpenAI-compatible Token Factory API at https://api.sarvam.ai/v2. This adds it the same way as IteraCompute (c70f61b):

  • llms/llms.json: enable the sarvam provider, so --update-providers keeps it
  • llms/providers.json: Sarvam's models.dev entry (7 chat models, SARVAM_API_KEY)
  • llms/ui/modules/icons.mjs: Sarvam provider icon (currentColor, from models.dev)
  • tests/test_sarvam.py: key enables the provider, /v2 chat URL, Bearer auth, model resolution, shared display names, catalog refresh, list prices

Differences from models.dev today

  • sarvam-105b and sarvam-105b-conversations use Sarvam's list price: ₹15 / ₹5 / ₹60 per 1M input / cached / output tokens (changelog), at ₹94 per USD, the rate Sarvam's pricing page uses. models.dev still has the introductory ₹10 / ₹0.25 / ₹25 rate, which ends with 2026 (pricing). A models.dev change (commit) moves its base price to the list price, so a later --update-providers keeps these values.
  • sarvam-105b-conversations output is capped at 8,192 tokens, the limit LiteLLM and Portkey use; models.dev lists 32,000.

Tests

  • python -m unittest tests.test_sarvam: 6 tests pass
  • Python compatibility set (tests.test_config tests.test_utils tests.test_windows_compat tests.test_publish_extension tests.test_web_assets): 90 tests pass
  • UI tests from python-compat.yml (test_ui_startup, test_chat_drafts, test_draft_persistence, test_plan_action, test_mcp_ui_contract): pass
  • Desktop CI test steps (tests.test_integration tests.test_windows_compat tests.test_publish_version, desktop/tests, check-version.py): pass
  • python -m unittest discover tests: no new failures compared with main
  • ruff check and ruff format --check: clean
  • CLI: with SARVAM_API_KEY set, llms -m sarvam/glm5.3 "Say hi" sends POST https://api.sarvam.ai/v2/chat/completions

Sarvam AI is on models.dev (anomalyco/models.dev#13896) with the
OpenAI-compatible Token Factory API at https://api.sarvam.ai/v2. This adds
it the same way as IteraCompute:

- llms.json: enable the `sarvam` provider, so --update-providers keeps it
- providers.json: Sarvam's models.dev entry (7 chat models, SARVAM_API_KEY)
- icons.mjs: Sarvam provider icon (currentColor, from models.dev)
- tests/test_sarvam.py: key enables the provider, /v2 chat URL, Bearer auth,
  model resolution, shared display names, catalog refresh

sarvam-105b and sarvam-105b-conversations use Sarvam's list price
(15 / 5 / 60 INR per 1M input / cached / output tokens at 94 INR per USD),
not the introductory rate that ends with 2026. sarvam-105b-conversations
returns at most 8192 output tokens.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mythz
mythz merged commit d79abcf into ServiceStack:main Nov 25, 2026
@mythz

mythz commented Nov 25, 2026

Copy link
Copy Markdown
Member

Thanks for the PR, this is now available in the latest v4.0.30 release
https://llmspy.org/docs/latest#sarvam-ai-joins-the-provider-lineup

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants