feat(provider): add LibertAI GLM-5.2 models

This commit is contained in:
Moshe Malawach 2026-06-19 16:40:50 +02:00
parent 31eca17007
commit b383b89d15
3 changed files with 72 additions and 0 deletions

View file

@ -41481,6 +41481,35 @@
"supports_reasoning": true,
"source": "https://docs.libertai.io/apis/text/"
},
"libertai/glm-5.2": {
"max_tokens": 262144,
"max_input_tokens": 262144,
"max_output_tokens": 262144,
"input_cost_per_token": 1.4e-06,
"output_cost_per_token": 4.4e-06,
"litellm_provider": "libertai",
"mode": "chat",
"supports_function_calling": true,
"supports_tool_choice": true,
"supports_system_messages": true,
"supports_vision": false,
"source": "https://docs.libertai.io/apis/text/"
},
"libertai/glm-5.2-thinking": {
"max_tokens": 262144,
"max_input_tokens": 262144,
"max_output_tokens": 262144,
"input_cost_per_token": 1.4e-06,
"output_cost_per_token": 4.4e-06,
"litellm_provider": "libertai",
"mode": "chat",
"supports_function_calling": true,
"supports_tool_choice": true,
"supports_system_messages": true,
"supports_vision": false,
"supports_reasoning": true,
"source": "https://docs.libertai.io/apis/text/"
},
"libertai/bge-m3": {
"max_tokens": 8192,
"max_input_tokens": 8192,

View file

@ -41691,6 +41691,35 @@
"supports_reasoning": true,
"source": "https://docs.libertai.io/apis/text/"
},
"libertai/glm-5.2": {
"max_tokens": 262144,
"max_input_tokens": 262144,
"max_output_tokens": 262144,
"input_cost_per_token": 1.4e-06,
"output_cost_per_token": 4.4e-06,
"litellm_provider": "libertai",
"mode": "chat",
"supports_function_calling": true,
"supports_tool_choice": true,
"supports_system_messages": true,
"supports_vision": false,
"source": "https://docs.libertai.io/apis/text/"
},
"libertai/glm-5.2-thinking": {
"max_tokens": 262144,
"max_input_tokens": 262144,
"max_output_tokens": 262144,
"input_cost_per_token": 1.4e-06,
"output_cost_per_token": 4.4e-06,
"litellm_provider": "libertai",
"mode": "chat",
"supports_function_calling": true,
"supports_tool_choice": true,
"supports_system_messages": true,
"supports_vision": false,
"supports_reasoning": true,
"source": "https://docs.libertai.io/apis/text/"
},
"libertai/bge-m3": {
"max_tokens": 8192,
"max_input_tokens": 8192,

View file

@ -70,11 +70,25 @@ class TestLibertAIProviderConfig:
assert info["max_input_tokens"] == 262144
assert info["max_output_tokens"] == 262144
assert "libertai/glm-5.2" in model_cost
glm = model_cost["libertai/glm-5.2"]
assert glm["litellm_provider"] == "libertai"
assert glm["mode"] == "chat"
assert glm["max_input_tokens"] == 262144
assert glm["max_output_tokens"] == 262144
assert glm["input_cost_per_token"] == 1.4e-06
assert glm["output_cost_per_token"] == 4.4e-06
assert glm["supports_vision"] is False
# thinking variants are marked as reasoning models
assert (
model_cost["libertai/qwen3.6-27b-thinking"].get("supports_reasoning")
is True
)
assert (
model_cost["libertai/glm-5.2-thinking"].get("supports_reasoning")
is True
)
def test_libertai_router_config(self):
"""Test that libertai can be used in Router configuration"""