Repository navigation
Add Sarvam AI provider (Token Factory v2) - #53
Merged
Merged
Conversation
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 <[email protected]>
Member
|
Thanks for the PR, this is now available in the latest v4.0.30 release |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 thesarvamprovider, so--update-providerskeeps itllms/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,/v2chat URL, Bearer auth, model resolution, shared display names, catalog refresh, list pricesDifferences from models.dev today
sarvam-105bandsarvam-105b-conversationsuse 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-providerskeeps these values.sarvam-105b-conversationsoutput 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 passtests.test_config tests.test_utils tests.test_windows_compat tests.test_publish_extension tests.test_web_assets): 90 tests passpython-compat.yml(test_ui_startup,test_chat_drafts,test_draft_persistence,test_plan_action,test_mcp_ui_contract): passtests.test_integration tests.test_windows_compat tests.test_publish_version,desktop/tests,check-version.py): passpython -m unittest discover tests: no new failures compared withmainruff checkandruff format --check: cleanSARVAM_API_KEYset,llms -m sarvam/glm5.3 "Say hi"sendsPOST https://api.sarvam.ai/v2/chat/completions