Repository navigation
feat(providers): add Prism provider - #40914
rajitkhanna wants to merge 17 commits into
Conversation
…nd Model Hub UI Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…mutation Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…eat-prism-provider
…eat-prism-provider
…eat-prism-provider
…eat-prism-provider
…eat-prism-provider
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
…ow read fails Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…iption feat(model_hub): surface model_info.description in Model Hub
…ip_save_on_failed_read fix(health): skip background health check DB writes when the latest-row read fails
Greptile SummaryThis PR registers Prism as a declarative OpenAI-compatible provider, adds two model catalog entries, and exposes Prism through provider and endpoint metadata
Confidence Score: 4/5The provider registration appears correct, but the repository’s required functional-test standard must be satisfied before merging No concrete runtime defect was established, but the tests only resolve the new Responses and Messages configurations instead of exercising their request behavior Files Needing Attention: tests/test_litellm/llms/openai_like/test_prism_provider.py
|
| Filename | Overview |
|---|---|
| litellm/llms/openai_like/providers.json | Adds a consistent declarative Prism configuration for credentials, base URL, and three supported endpoint families |
| litellm/constants.py | Registers Prism’s provider slug and API base with the OpenAI-compatible routing lists |
| litellm/types/utils.py | Adds the Prism provider enum needed by typed provider configuration lookup |
| model_prices_and_context_window.json | Adds schema-compatible pricing, limits, endpoints, and capability metadata for two Prism models |
| provider_endpoints_support.json | Advertises Prism support for Chat Completions, Responses, and Messages consistently with the declarative provider definition |
| litellm/proxy/public_endpoints/provider_create_fields.json | Adds Prism API key and optional API base fields to the provider creation metadata |
| tests/test_litellm/llms/openai_like/test_prism_provider.py | Covers registration, credentials, costs, metadata, and configuration lookup, but lacks functional Responses and Messages request coverage |
Reviews (1): Last reviewed commit: "feat(providers): add DeepSeek V4.1 Flash..." | Re-trigger Greptile
| assert JSONProviderRegistry.supports_responses_api("prism") is True | ||
| responses_config = ProviderConfigManager.get_provider_responses_api_config( | ||
| provider="prism", | ||
| model="deepseek-v4-flash", | ||
| ) | ||
| messages_config = ProviderConfigManager.get_provider_anthropic_messages_config( | ||
| provider=litellm.LlmProviders.PRISM, | ||
| model="deepseek-v4-flash", | ||
| ) | ||
|
|
||
| assert responses_config is not None | ||
| assert responses_config.custom_llm_provider == "prism" | ||
| assert isinstance(messages_config, JSONProviderAnthropicMessagesConfig) |
There was a problem hiding this comment.
Endpoint Tests Only Resolve Configs
These tests never execute Responses or Messages requests, violating the repository requirement for meaningful functional endpoint tests before merging
Context Used: CLAUDE.md (source)
Knowledge Base Used: Provider adapters and capabilities
There was a problem hiding this comment.
Replaced config-resolution assertions with functional Responses and async Messages requests that verify endpoint routing, authentication, payloads, and parsed responses.
5c64475 to
7f93254
Compare
* feat(providers): add Prism provider * fix(providers): complete Prism registration * feat(providers): expose Prism responses and messages * feat(providers): add DeepSeek V4.1 Flash to Prism * test(providers): exercise Prism endpoint requests * fix(providers): align Prism pricing and limits with the live catalog deepseek-v4.1-flash bills 0.17/0.63 USD per 1M input/output tokens and takes image input; deepseek-v4-flash bills 0.17/0.21 and caps output at 384000 tokens, per GET /v1/models * test(prism): assert cost-map invariants instead of pinning catalog facts * test(prism): derive the asserted model list from the cost map instead of pinning it * test(prism): capture requests through respx instead of appending to a list and swapping the client transport --------- Co-authored-by: rajitkhanna <rajitskhanna@gmail.com> Co-authored-by: mateo-berri <277851410+mateo-berri@users.noreply.github.com> Co-authored-by: ryan <ryan@berri.ai>
TLDR
Problem this solves:
How it solves it:
User Flow
Before: a developer cannot route Prism requests through LiteLLM
PRISM_API_KEYand configureprism/deepseek-v4.1-flashAfter: the same requests route to Prism with correct model pricing
PRISM_API_KEYand configureprism/deepseek-v4.1-flashhttps://api.prisminference.com/v1Relevant issues
Linear ticket
Pre-Submission checklist
Screenshots / Proof of Fix
Live proof is pending deployment verification
Type
New Feature
Caveats (if any)
Low
Final Attestation