mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-08 03:08:45 +00:00
fix(prices): add baseten/zai-org/GLM-5.3-Fast pricing (#42764)
* fix(prices): add baseten/zai-org/GLM-5.3-Fast pricing with cost tracking e2e Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * test(e2e): assert message instead of comment on breakdown row Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * test(baseten): drop the live e2e cost tracking test Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: kerry <kerry@berri.ai>
This commit is contained in:
parent
c2b388ebe6
commit
1c289e5ecd
3 changed files with 66 additions and 0 deletions
|
|
@ -64063,6 +64063,30 @@
|
|||
"supports_tool_choice": true,
|
||||
"supports_vision": true
|
||||
},
|
||||
"baseten/zai-org/GLM-5.3-Fast": {
|
||||
"cache_read_input_token_cost": 2.1e-07,
|
||||
"input_cost_per_token": 2.1e-06,
|
||||
"litellm_provider": "baseten",
|
||||
"max_input_tokens": 1048576,
|
||||
"max_output_tokens": 262144,
|
||||
"max_tokens": 262144,
|
||||
"mode": "chat",
|
||||
"output_cost_per_token": 6.6e-06,
|
||||
"source": "https://www.baseten.co/library/glm-53-fast/",
|
||||
"supported_modalities": [
|
||||
"text",
|
||||
"image"
|
||||
],
|
||||
"supported_output_modalities": [
|
||||
"text"
|
||||
],
|
||||
"supports_function_calling": true,
|
||||
"supports_prompt_caching": true,
|
||||
"supports_reasoning": true,
|
||||
"supports_response_schema": true,
|
||||
"supports_tool_choice": true,
|
||||
"supports_vision": true
|
||||
},
|
||||
"openrouter/minimax/minimax-m3": {
|
||||
"input_cost_per_token": 3e-07,
|
||||
"output_cost_per_token": 1.2e-06,
|
||||
|
|
|
|||
|
|
@ -64063,6 +64063,30 @@
|
|||
"supports_tool_choice": true,
|
||||
"supports_vision": true
|
||||
},
|
||||
"baseten/zai-org/GLM-5.3-Fast": {
|
||||
"cache_read_input_token_cost": 2.1e-07,
|
||||
"input_cost_per_token": 2.1e-06,
|
||||
"litellm_provider": "baseten",
|
||||
"max_input_tokens": 1048576,
|
||||
"max_output_tokens": 262144,
|
||||
"max_tokens": 262144,
|
||||
"mode": "chat",
|
||||
"output_cost_per_token": 6.6e-06,
|
||||
"source": "https://www.baseten.co/library/glm-53-fast/",
|
||||
"supported_modalities": [
|
||||
"text",
|
||||
"image"
|
||||
],
|
||||
"supported_output_modalities": [
|
||||
"text"
|
||||
],
|
||||
"supports_function_calling": true,
|
||||
"supports_prompt_caching": true,
|
||||
"supports_reasoning": true,
|
||||
"supports_response_schema": true,
|
||||
"supports_tool_choice": true,
|
||||
"supports_vision": true
|
||||
},
|
||||
"openrouter/minimax/minimax-m3": {
|
||||
"input_cost_per_token": 3e-07,
|
||||
"output_cost_per_token": 1.2e-06,
|
||||
|
|
|
|||
|
|
@ -4635,6 +4635,24 @@ def test_gemini_live_native_audio_limits_and_capabilities_match_vendor_model_car
|
|||
assert info["supports_pdf_input"] is False
|
||||
|
||||
|
||||
def test_baseten_glm_5_3_fast_is_priced_from_registry(_local_model_cost_map: None) -> None:
|
||||
model: Final = "baseten/zai-org/GLM-5.3-Fast"
|
||||
prompt_tokens: Final = 1000
|
||||
completion_tokens: Final = 500
|
||||
|
||||
prompt_usd, completion_usd = litellm.cost_per_token(
|
||||
model=model,
|
||||
prompt_tokens=prompt_tokens,
|
||||
completion_tokens=completion_tokens,
|
||||
)
|
||||
|
||||
entry: Final = litellm.model_cost[model]
|
||||
assert prompt_usd == pytest.approx(prompt_tokens * entry["input_cost_per_token"])
|
||||
assert completion_usd == pytest.approx(completion_tokens * entry["output_cost_per_token"])
|
||||
assert prompt_usd > 0
|
||||
assert completion_usd > 0
|
||||
|
||||
|
||||
def test_completion_cost_charges_explicit_per_token_rates_over_registered_ones(
|
||||
monkeypatch: pytest.MonkeyPatch,
|
||||
) -> None:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue