mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-12 08:42:18 +00:00
feat(providers): name Umans AI's DeepSeek V4.1 Flash entry by its dated 1017 id
umans-deepseek-v4.1-flash is Umans AI's floating id, which follows future DeepSeek V4.1 Flash updates. umans-deepseek-v4.1-flash-1017 pins the DeepSeek-V4.1-Flash-1017 weights that these limits and prices describe, so the cost map entry, the Add Model default and the tests use the dated id.
This commit is contained in:
parent
cbeba59c8e
commit
f05a577775
4 changed files with 23 additions and 23 deletions
|
|
@ -83134,7 +83134,7 @@
|
|||
"supports_function_calling": true,
|
||||
"source": "https://tokenfactory.nebius.com/api/public/models_info"
|
||||
},
|
||||
"umans-ai/umans-deepseek-v4.1-flash": {
|
||||
"umans-ai/umans-deepseek-v4.1-flash-1017": {
|
||||
"cache_read_input_token_cost": 2.8e-08,
|
||||
"input_cost_per_token": 1.5e-07,
|
||||
"litellm_provider": "umans-ai",
|
||||
|
|
|
|||
|
|
@ -3973,7 +3973,7 @@
|
|||
"default_value": null
|
||||
}
|
||||
],
|
||||
"default_model_placeholder": "umans-ai/umans-deepseek-v4.1-flash"
|
||||
"default_model_placeholder": "umans-ai/umans-deepseek-v4.1-flash-1017"
|
||||
},
|
||||
{
|
||||
"provider": "V0",
|
||||
|
|
|
|||
|
|
@ -83134,7 +83134,7 @@
|
|||
"supports_function_calling": true,
|
||||
"source": "https://tokenfactory.nebius.com/api/public/models_info"
|
||||
},
|
||||
"umans-ai/umans-deepseek-v4.1-flash": {
|
||||
"umans-ai/umans-deepseek-v4.1-flash-1017": {
|
||||
"cache_read_input_token_cost": 2.8e-08,
|
||||
"input_cost_per_token": 1.5e-07,
|
||||
"litellm_provider": "umans-ai",
|
||||
|
|
|
|||
|
|
@ -17,13 +17,13 @@ def test_umans_ai_provider_resolution(monkeypatch: pytest.MonkeyPatch):
|
|||
monkeypatch.setenv("UMANS_AI_API_KEY", "umans-test-key")
|
||||
|
||||
model, provider, api_key, api_base = get_llm_provider(
|
||||
model="umans-ai/umans-deepseek-v4.1-flash",
|
||||
model="umans-ai/umans-deepseek-v4.1-flash-1017",
|
||||
custom_llm_provider=None,
|
||||
api_base=None,
|
||||
api_key=None,
|
||||
)
|
||||
|
||||
assert model == "umans-deepseek-v4.1-flash"
|
||||
assert model == "umans-deepseek-v4.1-flash-1017"
|
||||
assert provider == "umans-ai"
|
||||
assert api_key == "umans-test-key"
|
||||
assert api_base == "https://api.code.umans.ai/v1"
|
||||
|
|
@ -35,7 +35,7 @@ def test_umans_ai_provider_keeps_explicit_credentials(monkeypatch: pytest.Monkey
|
|||
monkeypatch.setenv("UMANS_AI_API_KEY", "umans-env-key")
|
||||
|
||||
_, provider, api_key, api_base = get_llm_provider(
|
||||
model="umans-ai/umans-deepseek-v4.1-flash",
|
||||
model="umans-ai/umans-deepseek-v4.1-flash-1017",
|
||||
custom_llm_provider=None,
|
||||
api_base="https://umans.internal.example/v1",
|
||||
api_key="umans-explicit-key",
|
||||
|
|
@ -53,7 +53,7 @@ def test_umans_ai_is_available_in_add_model_form():
|
|||
|
||||
assert umans["provider"] == "UMANS_AI"
|
||||
assert umans["provider_display_name"] == "Umans AI"
|
||||
assert umans["default_model_placeholder"] == "umans-ai/umans-deepseek-v4.1-flash"
|
||||
assert umans["default_model_placeholder"] == "umans-ai/umans-deepseek-v4.1-flash-1017"
|
||||
assert {field["key"]: field["required"] for field in umans["credential_fields"]} == {
|
||||
"api_base": False,
|
||||
"api_key": True,
|
||||
|
|
@ -88,7 +88,7 @@ def test_umans_ai_chat_completion_request():
|
|||
"id": "chatcmpl_umans",
|
||||
"object": "chat.completion",
|
||||
"created": 1_789_550_000,
|
||||
"model": "umans-deepseek-v4.1-flash",
|
||||
"model": "umans-deepseek-v4.1-flash-1017",
|
||||
"choices": [
|
||||
{
|
||||
"index": 0,
|
||||
|
|
@ -100,7 +100,7 @@ def test_umans_ai_chat_completion_request():
|
|||
},
|
||||
)
|
||||
response: Final = litellm.completion(
|
||||
model="umans-ai/umans-deepseek-v4.1-flash",
|
||||
model="umans-ai/umans-deepseek-v4.1-flash-1017",
|
||||
messages=[{"role": "user", "content": "Say hello"}],
|
||||
api_key="umans-test-key",
|
||||
)
|
||||
|
|
@ -110,7 +110,7 @@ def test_umans_ai_chat_completion_request():
|
|||
assert route.call_count == 1
|
||||
assert str(request.url) == "https://api.code.umans.ai/v1/chat/completions"
|
||||
assert request.headers["authorization"] == "Bearer umans-test-key"
|
||||
assert body["model"] == "umans-deepseek-v4.1-flash"
|
||||
assert body["model"] == "umans-deepseek-v4.1-flash-1017"
|
||||
assert body["messages"] == [{"role": "user", "content": "Say hello"}]
|
||||
assert response.choices[0].message.content == "Hello from Umans AI"
|
||||
|
||||
|
|
@ -123,7 +123,7 @@ def test_umans_ai_responses_request():
|
|||
"id": "resp_umans",
|
||||
"object": "response",
|
||||
"created_at": 1_789_550_000,
|
||||
"model": "umans-deepseek-v4.1-flash",
|
||||
"model": "umans-deepseek-v4.1-flash-1017",
|
||||
"status": "completed",
|
||||
"output": [
|
||||
{
|
||||
|
|
@ -138,7 +138,7 @@ def test_umans_ai_responses_request():
|
|||
},
|
||||
)
|
||||
response: Final = litellm.responses(
|
||||
model="umans-ai/umans-deepseek-v4.1-flash",
|
||||
model="umans-ai/umans-deepseek-v4.1-flash-1017",
|
||||
input="Say hello",
|
||||
api_key="umans-test-key",
|
||||
)
|
||||
|
|
@ -148,7 +148,7 @@ def test_umans_ai_responses_request():
|
|||
assert route.call_count == 1
|
||||
assert str(request.url) == "https://api.code.umans.ai/v1/responses"
|
||||
assert request.headers["authorization"] == "Bearer umans-test-key"
|
||||
assert body["model"] == "umans-deepseek-v4.1-flash"
|
||||
assert body["model"] == "umans-deepseek-v4.1-flash-1017"
|
||||
assert body["input"] == "Say hello"
|
||||
assert response.output[0].content[0].text == "Hello from Umans AI"
|
||||
|
||||
|
|
@ -164,7 +164,7 @@ async def test_umans_ai_anthropic_messages_request(monkeypatch: pytest.MonkeyPat
|
|||
"id": "msg_umans",
|
||||
"type": "message",
|
||||
"role": "assistant",
|
||||
"model": "umans-deepseek-v4.1-flash",
|
||||
"model": "umans-deepseek-v4.1-flash-1017",
|
||||
"content": [{"type": "text", "text": "Hello from Umans AI"}],
|
||||
"stop_reason": "end_turn",
|
||||
"stop_sequence": None,
|
||||
|
|
@ -172,7 +172,7 @@ async def test_umans_ai_anthropic_messages_request(monkeypatch: pytest.MonkeyPat
|
|||
},
|
||||
)
|
||||
response: Final = await litellm.anthropic.messages.acreate(
|
||||
model="umans-ai/umans-deepseek-v4.1-flash",
|
||||
model="umans-ai/umans-deepseek-v4.1-flash-1017",
|
||||
messages=[{"role": "user", "content": "Say hello"}],
|
||||
max_tokens=32,
|
||||
api_key="umans-test-key",
|
||||
|
|
@ -184,7 +184,7 @@ async def test_umans_ai_anthropic_messages_request(monkeypatch: pytest.MonkeyPat
|
|||
assert str(request.url) == "https://api.code.umans.ai/v1/messages"
|
||||
assert request.headers["authorization"] == "Bearer umans-test-key"
|
||||
assert request.headers["anthropic-version"] == "2023-06-01"
|
||||
assert body["model"] == "umans-deepseek-v4.1-flash"
|
||||
assert body["model"] == "umans-deepseek-v4.1-flash-1017"
|
||||
assert body["messages"] == [{"role": "user", "content": "Say hello"}]
|
||||
assert response["content"][0]["text"] == "Hello from Umans AI"
|
||||
|
||||
|
|
@ -219,7 +219,7 @@ def test_umans_ai_default_model_is_priced():
|
|||
|
||||
|
||||
def test_umans_ai_usage_is_billed_at_cost_map_rates():
|
||||
model: Final = "umans-ai/umans-deepseek-v4.1-flash"
|
||||
model: Final = "umans-ai/umans-deepseek-v4.1-flash-1017"
|
||||
entry: Final = _umans_cost_entries()[model]
|
||||
input_cost: Final = entry["input_cost_per_token"]
|
||||
output_cost: Final = entry["output_cost_per_token"]
|
||||
|
|
@ -249,7 +249,7 @@ def test_umans_ai_chat_completion_streaming_request():
|
|||
"id": "chatcmpl_umans",
|
||||
"object": "chat.completion.chunk",
|
||||
"created": 1_789_550_000,
|
||||
"model": "umans-deepseek-v4.1-flash",
|
||||
"model": "umans-deepseek-v4.1-flash-1017",
|
||||
}
|
||||
stream_body: Final = _sse(
|
||||
{
|
||||
|
|
@ -265,7 +265,7 @@ def test_umans_ai_chat_completion_streaming_request():
|
|||
)
|
||||
chunks: Final = list(
|
||||
litellm.completion(
|
||||
model="umans-ai/umans-deepseek-v4.1-flash",
|
||||
model="umans-ai/umans-deepseek-v4.1-flash-1017",
|
||||
messages=[{"role": "user", "content": "Say hello"}],
|
||||
api_key="umans-test-key",
|
||||
stream=True,
|
||||
|
|
@ -284,7 +284,7 @@ def test_umans_ai_responses_streaming_request():
|
|||
"id": "resp_umans",
|
||||
"object": "response",
|
||||
"created_at": 1_789_550_000,
|
||||
"model": "umans-deepseek-v4.1-flash",
|
||||
"model": "umans-deepseek-v4.1-flash-1017",
|
||||
"status": "in_progress",
|
||||
"output": [],
|
||||
}
|
||||
|
|
@ -322,7 +322,7 @@ def test_umans_ai_responses_streaming_request():
|
|||
)
|
||||
events: Final = list(
|
||||
litellm.responses(
|
||||
model="umans-ai/umans-deepseek-v4.1-flash",
|
||||
model="umans-ai/umans-deepseek-v4.1-flash-1017",
|
||||
input="Say hello",
|
||||
api_key="umans-test-key",
|
||||
stream=True,
|
||||
|
|
@ -350,7 +350,7 @@ async def test_umans_ai_anthropic_messages_streaming_request(monkeypatch: pytest
|
|||
"id": "msg_umans",
|
||||
"type": "message",
|
||||
"role": "assistant",
|
||||
"model": "umans-deepseek-v4.1-flash",
|
||||
"model": "umans-deepseek-v4.1-flash-1017",
|
||||
"content": [],
|
||||
"stop_reason": None,
|
||||
"stop_sequence": None,
|
||||
|
|
@ -372,7 +372,7 @@ async def test_umans_ai_anthropic_messages_streaming_request(monkeypatch: pytest
|
|||
200, content=stream_body, headers={"content-type": "text/event-stream"}
|
||||
)
|
||||
stream: Final = await litellm.anthropic.messages.acreate(
|
||||
model="umans-ai/umans-deepseek-v4.1-flash",
|
||||
model="umans-ai/umans-deepseek-v4.1-flash-1017",
|
||||
messages=[{"role": "user", "content": "Say hello"}],
|
||||
max_tokens=32,
|
||||
api_key="umans-test-key",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue