mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-07 08:26:10 +00:00
feat(friendli): add zai-org/GLM-5.3 model pricing
Per https://api.friendli.ai/serverless/v1/models: - $1.40 input / $4.40 output / $0.26 cached input per MTok - 1M context, 1M max output, reasoning with effort low/high/max (per HF chat_template.jinja: low/high honored, anything else -> max) - tool calling, parallel tool calls, structured output, prompt caching - text-only (no vision), flagship GLM model
This commit is contained in:
parent
5e4b3838aa
commit
e7bfe99cd3
2 changed files with 60 additions and 0 deletions
|
|
@ -19564,6 +19564,30 @@
|
|||
"supports_system_messages": true,
|
||||
"supports_tool_choice": true
|
||||
},
|
||||
"friendliai/zai-org/GLM-5.3": {
|
||||
"litellm_provider": "friendliai",
|
||||
"supports_reasoning": true,
|
||||
"supports_function_calling": true,
|
||||
"max_input_tokens": 1048576,
|
||||
"max_tokens": 1048576,
|
||||
"max_output_tokens": 1048576,
|
||||
"input_cost_per_token": 1.4e-06,
|
||||
"output_cost_per_token": 4.4e-06,
|
||||
"cache_read_input_token_cost": 2.6e-07,
|
||||
"supports_prompt_caching": true,
|
||||
"supports_max_reasoning_effort": true,
|
||||
"supports_low_reasoning_effort": true,
|
||||
"supports_parallel_function_calling": true,
|
||||
"supports_response_schema": true,
|
||||
"supports_native_structured_output": true,
|
||||
"supports_system_messages": true,
|
||||
"supports_tool_choice": true,
|
||||
"mode": "chat",
|
||||
"comment": "Flagship GLM model for long-horizon coding, agents, and complex project delivery",
|
||||
"source": "https://api.friendli.ai/serverless/v1/models",
|
||||
"supports_vision": false,
|
||||
"supports_image_input": false
|
||||
},
|
||||
"ft:babbage-002": {
|
||||
"deprecation_date": "2026-10-23",
|
||||
"input_cost_per_token": 1.6e-06,
|
||||
|
|
|
|||
36
tests/test_litellm/test_friendli_glm_5_3_model_metadata.py
Normal file
36
tests/test_litellm/test_friendli_glm_5_3_model_metadata.py
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
import json
|
||||
from pathlib import Path
|
||||
|
||||
from litellm.litellm_core_utils.get_llm_provider_logic import get_llm_provider
|
||||
|
||||
|
||||
def test_friendli_glm_5_3_model_info():
|
||||
model = "friendliai/zai-org/GLM-5.3"
|
||||
json_path = Path(__file__).parents[2] / "model_prices_and_context_window.json"
|
||||
with open(json_path) as f:
|
||||
model_cost = json.load(f)
|
||||
|
||||
info = model_cost.get(model)
|
||||
assert (
|
||||
info is not None
|
||||
), f"{model} not found in model_prices_and_context_window.json"
|
||||
assert info["litellm_provider"] == "friendliai"
|
||||
assert info["mode"] == "chat"
|
||||
assert info["input_cost_per_token"] == 1.4e-06
|
||||
assert info["output_cost_per_token"] == 4.4e-06
|
||||
assert info["cache_read_input_token_cost"] == 2.6e-07
|
||||
assert info["max_input_tokens"] == 1048576
|
||||
assert info["max_output_tokens"] == 1048576
|
||||
assert info["supports_function_calling"] is True
|
||||
assert info["supports_reasoning"] is True
|
||||
assert info["supports_low_reasoning_effort"] is True
|
||||
assert info["supports_max_reasoning_effort"] is True
|
||||
assert info["supports_tool_choice"] is True
|
||||
assert info["supports_prompt_caching"] is True
|
||||
# GLM-5.3 (non-flash) is text-only on Friendli's catalog
|
||||
assert info["supports_vision"] is False
|
||||
assert info["supports_image_input"] is False
|
||||
|
||||
routed_model, provider, _, _ = get_llm_provider(model=model)
|
||||
assert routed_model == "zai-org/GLM-5.3"
|
||||
assert provider == "friendliai"
|
||||
Loading…
Add table
Reference in a new issue