mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-26 01:12:21 +00:00
fix(providers): complete Prism registration
This commit is contained in:
parent
0e045ce537
commit
b649aab02e
4 changed files with 98 additions and 0 deletions
|
|
@ -1925,6 +1925,23 @@
|
|||
"interactions": true
|
||||
}
|
||||
},
|
||||
"prism": {
|
||||
"display_name": "Prism (`prism`)",
|
||||
"url": "https://docs.litellm.ai/docs/providers/prism",
|
||||
"endpoints": {
|
||||
"chat_completions": true,
|
||||
"messages": false,
|
||||
"responses": false,
|
||||
"embeddings": false,
|
||||
"image_generations": false,
|
||||
"audio_transcriptions": false,
|
||||
"audio_speech": false,
|
||||
"moderations": false,
|
||||
"batches": false,
|
||||
"rerank": false,
|
||||
"a2a": false
|
||||
}
|
||||
},
|
||||
"recraft": {
|
||||
"display_name": "Recraft (`recraft`)",
|
||||
"url": "https://docs.litellm.ai/docs/providers/recraft",
|
||||
|
|
|
|||
|
|
@ -2721,6 +2721,34 @@
|
|||
],
|
||||
"default_model_placeholder": "gpt-3.5-turbo"
|
||||
},
|
||||
{
|
||||
"provider": "PRISM",
|
||||
"provider_display_name": "Prism",
|
||||
"litellm_provider": "prism",
|
||||
"credential_fields": [
|
||||
{
|
||||
"key": "api_base",
|
||||
"label": "API Base",
|
||||
"placeholder": "https://api.prisminference.com/v1",
|
||||
"tooltip": null,
|
||||
"required": false,
|
||||
"field_type": "text",
|
||||
"options": null,
|
||||
"default_value": null
|
||||
},
|
||||
{
|
||||
"key": "api_key",
|
||||
"label": "API Key",
|
||||
"placeholder": null,
|
||||
"tooltip": null,
|
||||
"required": true,
|
||||
"field_type": "password",
|
||||
"options": null,
|
||||
"default_value": null
|
||||
}
|
||||
],
|
||||
"default_model_placeholder": "prism/deepseek-v4-flash"
|
||||
},
|
||||
{
|
||||
"provider": "RECRAFT",
|
||||
"provider_display_name": "Recraft",
|
||||
|
|
|
|||
|
|
@ -2142,6 +2142,23 @@
|
|||
"interactions": true
|
||||
}
|
||||
},
|
||||
"prism": {
|
||||
"display_name": "Prism (`prism`)",
|
||||
"url": "https://docs.litellm.ai/docs/providers/prism",
|
||||
"endpoints": {
|
||||
"chat_completions": true,
|
||||
"messages": false,
|
||||
"responses": false,
|
||||
"embeddings": false,
|
||||
"image_generations": false,
|
||||
"audio_transcriptions": false,
|
||||
"audio_speech": false,
|
||||
"moderations": false,
|
||||
"batches": false,
|
||||
"rerank": false,
|
||||
"a2a": false
|
||||
}
|
||||
},
|
||||
"recraft": {
|
||||
"display_name": "Recraft (`recraft`)",
|
||||
"url": "https://docs.litellm.ai/docs/providers/recraft",
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
import json
|
||||
from pathlib import Path
|
||||
|
||||
import pytest
|
||||
|
||||
import litellm
|
||||
|
|
@ -58,3 +61,36 @@ def test_prism_model_cost_and_capabilities():
|
|||
assert model_info["supports_native_streaming"] is True
|
||||
assert model_info["supports_reasoning"] is True
|
||||
assert model_info["supports_response_schema"] is True
|
||||
|
||||
|
||||
def test_prism_is_available_in_add_model_form():
|
||||
fields_path = Path(litellm.__file__).parent / "proxy" / "public_endpoints" / "provider_create_fields.json"
|
||||
providers = json.loads(fields_path.read_text())
|
||||
prism = next(provider for provider in providers if provider["litellm_provider"] == "prism")
|
||||
|
||||
assert prism["provider"] == "PRISM"
|
||||
assert prism["provider_display_name"] == "Prism"
|
||||
assert prism["default_model_placeholder"] == "prism/deepseek-v4-flash"
|
||||
assert {field["key"]: field["required"] for field in prism["credential_fields"]} == {
|
||||
"api_base": False,
|
||||
"api_key": True,
|
||||
}
|
||||
|
||||
|
||||
def test_prism_supported_endpoints():
|
||||
matrix_path = Path(litellm.__file__).parent / "provider_endpoints_support_backup.json"
|
||||
providers = json.loads(matrix_path.read_text())["providers"]
|
||||
|
||||
assert providers["prism"]["endpoints"] == {
|
||||
"chat_completions": True,
|
||||
"messages": False,
|
||||
"responses": False,
|
||||
"embeddings": False,
|
||||
"image_generations": False,
|
||||
"audio_transcriptions": False,
|
||||
"audio_speech": False,
|
||||
"moderations": False,
|
||||
"batches": False,
|
||||
"rerank": False,
|
||||
"a2a": False,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue