Repository navigation
feat(providers): add Pareto Inference as OpenAI-compatible provider - #42789
dylanduyvu wants to merge 1 commit into
Conversation
Registers pareto through the JSON provider registry, so pareto/z-ai/glm-5.3-flash resolves to https://api.paretoinference.com/v1 with PARETO_API_KEY and an optional PARETO_API_BASE override. Adds LlmProviders.PARETO, the constants.py provider and endpoint lists so an api_base pointing at Pareto also resolves to the provider, the provider endpoints matrix, the Add Model provider fields, per-token pricing for pareto/z-ai/glm-5.3-flash in both cost maps, and tests.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
| "meta", # Meta Model API (Muse Spark) - JSON-configured provider | ||
| "cognition", | ||
| "scx-ai", | ||
| "pareto", |
There was a problem hiding this comment.
Chat Provider Enables Transcription
Adding Pareto to openai_compatible_providers also adds it to OPENAI_AUDIO_TRANSCRIPTION_PROVIDERS. As a result, transcription(model="pareto/...") selects the OpenAI transcription transport and sends a request to Pareto's /audio/transcriptions endpoint, even though the new capability map declares audio transcription unsupported. This should be gated by the declared capability or otherwise excluded so unsupported calls are rejected locally instead of being sent upstream.
Knowledge Base Used: Provider adapters and capabilities
TLDR
Problem this solves:
openai/model with a custom baseHow it solves it:
paretoin the JSON provider registrypareto/z-ai/glm-5.3-flashroutes tohttps://api.paretoinference.com/v1PARETO_API_KEY, with optionalPARETO_API_BASEoverrideUser Flow
Before: a developer who wants GLM 5.3 Flash from Pareto has no named provider
litellm.completion(model="pareto/z-ai/glm-5.3-flash", ...)withPARETO_API_KEYsetBadRequestError: LLM Provider NOT providedmodel="openai/z-ai/glm-5.3-flash"plus a manualapi_baseandapi_keyAfter: the same call works and is priced
litellm.completion(model="pareto/z-ai/glm-5.3-flash", ...)withPARETO_API_KEYsetAuthorization: Bearer <key>usage, and the logged spend uses $0.03 input, $0.10 output and $0.006 cached input per 1M tokensRelevant issues
Affected release
Linear ticket
Pre-Submission checklist
Screenshots / Proof of Fix
Setup:
export PARETO_API_KEY=<key from https://paretoinference.com>andexport LITELLM_LOCAL_MODEL_COST_MAP=True(the remote cost map has no Pareto entry until this merges). Real calls to the live Pareto API, no mocks.Before (1c289e5)
python -c "import litellm; litellm.completion(model='pareto/z-ai/glm-5.3-flash', messages=[{'role':'user','content':'Say hi'}])"BadRequestError: litellm.BadRequestError: LLM Provider NOT provided. Pass in the LLM provider you are trying to call. You passed model=pareto/z-ai/glm-5.3-flashAfter (c8bc6a1)
Non-streaming
r = litellm.completion(model="pareto/z-ai/glm-5.3-flash", messages=[{"role": "user", "content": "Say hi"}], max_tokens=512)r.choices[0].message.content='Hi there! 👋 How can I help you today?',r.model=pareto/z-ai/glm-5.3-flashr.usage: prompt_tokens=14, completion_tokens=44, total_tokens=58litellm.completion_cost(completion_response=r)=0.0000048200USD (14 × $0.03/1M + 44 × $0.10/1M)Streaming with usage
litellm.completion(..., max_tokens=512, stream=True, stream_options={"include_usage": True})"Hi there! It's nice to meet you. How can I help you today?"Type
🆕 New Feature
Caveats (if any)
Low