Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
5763b4a
feat(providers): add CoralBricks as a native provider
Oct 5, 2026
88814a9
test(coralbricks): harden cost map consistency tests
Oct 5, 2026
5f5db59
test(coralbricks): type cost helpers, read cost maps from disk, cover…
Oct 6, 2026
f8568e3
test(coralbricks): drop Final on loop-rebound names
Oct 6, 2026
c789c5c
test(coralbricks): add the provider audit cells, the Add Model browse…
mateo-berri Oct 6, 2026
07dc9e8
Merge remote-tracking branch 'origin/main' into litellm_coralbricks_p…
Oct 8, 2026
430c736
test(coralbricks): derive UI spend from model info, type browser rows…
Oct 8, 2026
9f9a8be
test(coralbricks): release held upstream before the wire server joins…
Oct 8, 2026
35f9b6f
test(coralbricks): number forwarded chats with itertools.count instea…
Oct 8, 2026
18ffd76
fix(coralbricks): drop retired glm-5.3-flash-fp4 and test against dee…
Oct 8, 2026
1dfd035
test(coralbricks): pin retries, await the respawned worker, read the …
mateo-berri Oct 9, 2026
cb1a23d
fix(coralbricks): price the current model names and the new DeepSeek …
mateo-berri Oct 10, 2026
efb24af
fix(coralbricks): keep pricing for the deprecated fp4 slugs CoralBric…
mateo-berri Oct 10, 2026
a4fb718
fix(coralbricks): list the catalog rows for wildcard deployments and …
mateo-berri Oct 12, 2026
93c5048
Merge remote-tracking branch 'origin/main' into litellm_coralbricks_p…
mateo-berri Oct 12, 2026
d5bbab5
fix(coralbricks): price the deprecated glm-5.3 and deepseek-v4.1-flas…
mateo-berri Oct 12, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,7 @@ Set `LITELLM_PROXY_API_BASE` and `LITELLM_PROXY_API_KEY` and every model call th
| [Cohere Chat (`cohere_chat`)](https://docs.litellm.ai/docs/providers/cohere) | ✅ | ✅ | ✅ | | | | | | | |
| [CometAPI (`cometapi`)](https://docs.litellm.ai/docs/providers/cometapi) | ✅ | ✅ | ✅ | ✅ | | | | | | |
| [CompactifAI (`compactifai`)](https://docs.litellm.ai/docs/providers/compactifai) | ✅ | ✅ | ✅ | | | | | | | |
| [CoralBricks (`coralbricks`)](https://docs.litellm.ai/docs/providers/coralbricks) | ✅ | ✅ | ✅ | | | | | | | |
| [Custom (`custom`)](https://docs.litellm.ai/docs/providers/custom_llm_server) | ✅ | ✅ | ✅ | | | | | | | |
| [Custom OpenAI (`custom_openai`)](https://docs.litellm.ai/docs/providers/openai_compatible) | ✅ | ✅ | ✅ | | | ✅ | ✅ | ✅ | ✅ | |
| [Dashscope (`dashscope`)](https://docs.litellm.ai/docs/providers/dashscope) | ✅ | ✅ | ✅ | ✅ | | | | | | ✅ |
Expand Down
2 changes: 2 additions & 0 deletions litellm/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -970,6 +970,7 @@
"https://api.meta.ai/v1",
"https://api.sailresearch.com/v1",
"https://api.cognition.ai/v1",
"https://inference.coralbricks.ai/v1",
"https://api.cortecs.ai/v1",
"https://api.scx.ai/v1",
"https://api.prisminference.com/v1",
Expand Down Expand Up @@ -1046,6 +1047,7 @@
"darkbloom",
"meta", # Meta Model API (Muse Spark) - JSON-configured provider
"cognition",
"coralbricks",
"cortecs",
"scx-ai",
"prism",
Expand Down
6 changes: 6 additions & 0 deletions litellm/llms/openai_like/providers.json
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,12 @@
"api_key_env": "COGNITION_API_KEY",
"api_base_env": "COGNITION_API_BASE"
},
"coralbricks": {
"base_url": "https://inference.coralbricks.ai/v1",
"api_key_env": "CORALBRICKS_API_KEY",
"api_base_env": "CORALBRICKS_API_BASE",
"supported_endpoints": ["/v1/chat/completions", "/v1/responses", "/v1/messages"]
},
"cortecs": {
"base_url": "https://api.cortecs.ai/v1",
"api_key_env": "CORTECS_API_KEY",
Expand Down
69 changes: 69 additions & 0 deletions litellm/model_prices_and_context_window_backup.json
Original file line number Diff line number Diff line change
Expand Up @@ -16429,6 +16429,75 @@
"supports_function_calling": true,
"supports_tool_choice": true
},
"coralbricks/glm-5.3-fp4": {
"cache_creation_input_token_cost": 1.68e-06,
"cache_read_input_token_cost": 0.0,
"input_cost_per_token": 1.12e-06,
"litellm_provider": "coralbricks",
"max_input_tokens": 1048576,
"max_tokens": 1048576,
"mode": "chat",
"output_cost_per_token": 4.4e-06,
"source": "https://www.coralbricks.ai/pricing",
"supported_endpoints": [
"/v1/chat/completions",
"/v1/responses",
"/v1/messages"
],
"supports_function_calling": true,
"supports_native_streaming": true,
"supports_prompt_caching": true,
"supports_reasoning": true,
"supports_system_messages": true,
"supports_tool_choice": true,
"supports_vision": false
},
"coralbricks/glm-5.3-flash-fp4": {
"cache_creation_input_token_cost": 2.3e-07,
"cache_read_input_token_cost": 0.0,
"input_cost_per_token": 1.5e-07,
"litellm_provider": "coralbricks",
"max_input_tokens": 1048576,
"max_tokens": 1048576,
"mode": "chat",
"output_cost_per_token": 5e-07,
"source": "https://www.coralbricks.ai/pricing",
"supported_endpoints": [
"/v1/chat/completions",
"/v1/responses",
"/v1/messages"
],
"supports_function_calling": true,
"supports_native_streaming": true,
"supports_prompt_caching": true,
"supports_reasoning": true,
"supports_system_messages": true,
"supports_tool_choice": true,
"supports_vision": true
},
"coralbricks/deepseek-v4.1-flash-fast-fp4": {
"cache_creation_input_token_cost": 9e-08,
"cache_read_input_token_cost": 0.0,
"input_cost_per_token": 3e-07,
"litellm_provider": "coralbricks",
"max_input_tokens": 1048576,
"max_tokens": 1048576,
"mode": "chat",
"output_cost_per_token": 1.2e-06,
"source": "https://www.coralbricks.ai/pricing",
"supported_endpoints": [
"/v1/chat/completions",
"/v1/responses",
"/v1/messages"
],
"supports_function_calling": true,
"supports_native_streaming": true,
"supports_prompt_caching": true,
"supports_reasoning": true,
"supports_system_messages": true,
"supports_tool_choice": true,
"supports_vision": true
},
"computer-use-preview": {
"deprecation_date": "2026-07-23",
"input_cost_per_token": 3e-06,
Expand Down
18 changes: 18 additions & 0 deletions litellm/provider_endpoints_support_backup.json
Original file line number Diff line number Diff line change
Expand Up @@ -618,6 +618,24 @@
"interactions": true
}
},
"coralbricks": {
"display_name": "CoralBricks (`coralbricks`)",
"url": "https://docs.litellm.ai/docs/providers/coralbricks",
"endpoints": {
"chat_completions": true,
"messages": true,
"responses": true,
"embeddings": false,
"image_generations": false,
"audio_transcriptions": false,
"audio_speech": false,
"moderations": false,
"batches": false,
"rerank": false,
"a2a": false,
"interactions": false
}
},
"cortecs": {
"display_name": "Cortecs (`cortecs`)",
"url": "https://docs.litellm.ai/docs/providers/cortecs",
Expand Down
28 changes: 28 additions & 0 deletions litellm/proxy/public_endpoints/provider_create_fields.json
Original file line number Diff line number Diff line change
Expand Up @@ -1015,6 +1015,34 @@
],
"default_model_placeholder": "gpt-3.5-turbo"
},
{
"provider": "CORALBRICKS",
"provider_display_name": "CoralBricks",
"litellm_provider": "coralbricks",
"credential_fields": [
{
"key": "api_base",
"label": "API Base",
"placeholder": "https://inference.coralbricks.ai/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": "coralbricks/glm-5.3-fp4"
},
{
"provider": "CORTECS",
"provider_display_name": "Cortecs",
Expand Down
1 change: 1 addition & 0 deletions litellm/types/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -4263,6 +4263,7 @@ class LlmProviders(str, Enum):
LIBERTAI = "libertai"
PINSTRIPES = "pinstripes"
COGNITION = "cognition"
CORALBRICKS = "coralbricks"
Comment thread
devin-ai-integration[bot] marked this conversation as resolved.
Resolved
CORTECS = "cortecs"
SCX_AI = "scx-ai"
PRISM = "prism"
Expand Down
69 changes: 69 additions & 0 deletions model_prices_and_context_window.json
Original file line number Diff line number Diff line change
Expand Up @@ -16429,6 +16429,75 @@
"supports_function_calling": true,
"supports_tool_choice": true
},
"coralbricks/glm-5.3-fp4": {
Comment thread
greptile-apps[bot] marked this conversation as resolved.
Resolved
"cache_creation_input_token_cost": 1.68e-06,
"cache_read_input_token_cost": 0.0,
"input_cost_per_token": 1.12e-06,
"litellm_provider": "coralbricks",
"max_input_tokens": 1048576,
"max_tokens": 1048576,
"mode": "chat",
"output_cost_per_token": 4.4e-06,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Reasoning-heavy calls inflate CoralBricks spend

When reasoning tokens exceed completion tokens, coralbricks bills every reasoning token at the new output rate. generic_cost_per_token adds that count without limiting it to reported output. Non-streaming spend and budget deductions exceed the vendor's cost

Learn more

CoralBricks can return a chat usage block where completion_tokens_details.reasoning_tokens exceeds completion_tokens. The new pricing rows send that usage through generic_cost_per_token, which bills the whole reasoning count separately at the output rate even when it exceeds the output total. The same calculation feeds the response-cost header and spend logs. Streaming usage follows a different normalization path, so identical requests can have different bills.

Example: A response reporting 10 completion tokens and 12 reasoning tokens bills 12 output tokens, rather than the vendor's 10, even before any text tokens are counted

Recommended fix: Normalize CoralBricks reasoning details against completion_tokens before pricing non-stream responses, without changing other providers' accounting. Add a regression with reasoning tokens greater than completion tokens and compare the billed amount to the vendor cost

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CoralBricks nests reasoning inside its output count (35 of 39 tokens in the proof). The arithmetic is the shared calculator every OpenAI-style provider uses

"source": "https://www.coralbricks.ai/pricing",
"supported_endpoints": [
"/v1/chat/completions",
"/v1/responses",
"/v1/messages"
],
"supports_function_calling": true,
"supports_native_streaming": true,
"supports_prompt_caching": true,
"supports_reasoning": true,
"supports_system_messages": true,
"supports_tool_choice": true,
"supports_vision": false
},
"coralbricks/glm-5.3-flash-fp4": {
"cache_creation_input_token_cost": 2.3e-07,
"cache_read_input_token_cost": 0.0,
"input_cost_per_token": 1.5e-07,
"litellm_provider": "coralbricks",
"max_input_tokens": 1048576,
"max_tokens": 1048576,
"mode": "chat",
"output_cost_per_token": 5e-07,
"source": "https://www.coralbricks.ai/pricing",
"supported_endpoints": [
"/v1/chat/completions",
"/v1/responses",
"/v1/messages"
],
"supports_function_calling": true,
"supports_native_streaming": true,
"supports_prompt_caching": true,
"supports_reasoning": true,
"supports_system_messages": true,
"supports_tool_choice": true,
"supports_vision": true
},
"coralbricks/deepseek-v4.1-flash-fast-fp4": {
"cache_creation_input_token_cost": 9e-08,
"cache_read_input_token_cost": 0.0,
"input_cost_per_token": 3e-07,
"litellm_provider": "coralbricks",
"max_input_tokens": 1048576,
"max_tokens": 1048576,
"mode": "chat",
"output_cost_per_token": 1.2e-06,
"source": "https://www.coralbricks.ai/pricing",
"supported_endpoints": [
"/v1/chat/completions",
"/v1/responses",
"/v1/messages"
],
"supports_function_calling": true,
"supports_native_streaming": true,
"supports_prompt_caching": true,
"supports_reasoning": true,
"supports_system_messages": true,
"supports_tool_choice": true,
"supports_vision": true
},
"computer-use-preview": {
"deprecation_date": "2026-07-23",
"input_cost_per_token": 3e-06,
Expand Down
18 changes: 18 additions & 0 deletions provider_endpoints_support.json
Original file line number Diff line number Diff line change
Expand Up @@ -672,6 +672,24 @@
"interactions": true
}
},
"coralbricks": {
"display_name": "CoralBricks (`coralbricks`)",
"url": "https://docs.litellm.ai/docs/providers/coralbricks",
"endpoints": {
"chat_completions": true,
"messages": true,
"responses": true,
"embeddings": false,
"image_generations": false,
"audio_transcriptions": false,
"audio_speech": false,
"moderations": false,
"batches": false,
"rerank": false,
"a2a": false,
"interactions": false
}
},
"cortecs": {
"display_name": "Cortecs (`cortecs`)",
"url": "https://docs.litellm.ai/docs/providers/cortecs",
Expand Down
Loading
Loading