Skip to content

feat(scx-ai): add six SCX.ai models and update Qwen3.8-Max pricing - #45502

Open
bhuvan2134686 wants to merge 1 commit into
BerriAI:mainfrom
SouthernCrossAI:litellm_scx_ai_new_models
Open

bhuvan2134686 wants to merge 1 commit into
BerriAI:mainfrom
SouthernCrossAI:litellm_scx_ai_new_models

Conversation

@bhuvan2134686

Copy link
Copy Markdown
Contributor

TLDR

Problem this solves:

  • Six SCX.ai chat models have no cost map row
  • Tool calls to them fail with UnsupportedParamsError
  • Their spend is recorded as $0
  • scx-ai/Qwen3.8-Max still carries SCX.ai's old rates

How it solves it:

  • Adds cost map rows for the six models, root and backup
  • Moves scx-ai/Qwen3.8-Max to SCX.ai's current rates
  • Extends the existing root and backup sync test to the new rows

Intentional product change: scx-ai/Qwen3.8-Max spend is now reported at 1.408 / 4.235 / 0.176 USD per 1M input, output and cached tokens, down from 1.65 / 4.99 / 0.21

Rows

Rates are SCX.ai's API prices in USD per 1M tokens. Context windows come from SCX.ai's model listing. Output limits are the ones the endpoint enforces where it validates max_tokens (GLM-5.2-Fast and GLM-5.3 reject anything above 131072) and the published limit otherwise. Vision, JSON schema, tool calling and prompt caching were each checked with live requests to api.scx.ai on every model except GLM-5.3-Fast (see Caveats)

Model Input / output / cached Context Max output Vision JSON schema
scx-ai/DeepSeek-V4.1-flash 0.15 / 0.60 / 0.01 1,048,576 384,000 yes no
scx-ai/GLM-5.2-Fast 1.65 / 4.90 / 0.30 1,048,576 131,072 no yes
scx-ai/GLM-5.3 0.93 / 2.92 / 0.164 1,048,576 131,072 no no
scx-ai/GLM-5.3-Fast 2.80 / 8.80 / 0.56 1,048,576 131,072 no no
scx-ai/GLM-5.3-Flash 0.09 / 0.30 / 0.018 1,048,576 131,072 yes yes
scx-ai/Kimi-K3 2.37 / 11.87 / 0.237 1,048,576 1,048,576 yes yes
scx-ai/Qwen3.8-Max (updated) 1.408 / 4.235 / 0.176 1,000,000 131,072 yes yes

All of them support tool calling, reasoning and prompt caching. GLM-5.3 and DeepSeek-V4.1-flash are marked without JSON schema support because the endpoint does not honour response_format of type json_schema on them, while plain JSON mode works

The page listing these models on docs.litellm.ai is updated in BerriAI/litellm-docs#2204

I work at SCX.ai

User Flow

Before: a developer calling a new SCX.ai model with tools through the proxy gets a 400 and no spend is recorded

  1. They send POST http://localhost:4000/v1/chat/completions with "model": "scx-ai/GLM-5.3" and a tools array
  2. The proxy answers 400 UnsupportedParamsError: scx-ai does not support parameters: ['tools']
  3. The x-litellm-response-cost header reads 0, and GET http://localhost:4000/model/info shows no prices for the model

After: the same request returns a tool call and is charged at SCX.ai's rates

  1. They send POST http://localhost:4000/v1/chat/completions with "model": "scx-ai/GLM-5.3" and a tools array
  2. The proxy answers 200 with a get_weather tool call
  3. The x-litellm-response-cost header reads 0.0002656, which is 160 x 0.93 + 40 x 2.92 USD per 1M tokens, and GET http://localhost:4000/model/info shows those prices

Pre-Submission checklist

Please complete all items before asking a LiteLLM maintainer to review your PR

  • I have added meaningful tests
  • The handful of test files covering my change pass locally, e.g. uv run pytest tests/unit/<your_test_file>.py -v. Leave the suites (make test-unit-*, make test-unit) to CI: it finishes in ~15 minutes where a laptop takes an hour or more
  • My PR passes all required CI/CD checks (e.g., lint, schema.d.ts sync check, etc.)
  • My PR's scope is as isolated as possible; it only solves 1 specific problem
  • I have received a Greptile Confidence Score of at least 4/5 before requesting a maintainer review (Greptile reviews automatically once the PR is opened; only comment @greptileai to re-request a review after pushing changes)

Delays in PR merge?

If you're seeing a delay in your PR being merged, ping the LiteLLM Team on Slack (#pr-review).

Screenshots / Proof of Fix

Both runs use this config, with SCX_API_KEY and a random LITELLM_MASTER_KEY exported, and LITELLM_LOCAL_MODEL_COST_MAP=True so the proxy reads the cost map from the checkout

model_list:
  - model_name: scx-ai/DeepSeek-V4.1-flash
    litellm_params: {model: scx-ai/DeepSeek-V4.1-flash, api_key: os.environ/SCX_API_KEY}
  - model_name: scx-ai/GLM-5.2-Fast
    litellm_params: {model: scx-ai/GLM-5.2-Fast, api_key: os.environ/SCX_API_KEY}
  - model_name: scx-ai/GLM-5.3
    litellm_params: {model: scx-ai/GLM-5.3, api_key: os.environ/SCX_API_KEY}
  - model_name: scx-ai/GLM-5.3-Fast
    litellm_params: {model: scx-ai/GLM-5.3-Fast, api_key: os.environ/SCX_API_KEY}
  - model_name: scx-ai/GLM-5.3-Flash
    litellm_params: {model: scx-ai/GLM-5.3-Flash, api_key: os.environ/SCX_API_KEY}
  - model_name: scx-ai/Kimi-K3
    litellm_params: {model: scx-ai/Kimi-K3, api_key: os.environ/SCX_API_KEY}
  - model_name: scx-ai/Qwen3.8-Max
    litellm_params: {model: scx-ai/Qwen3.8-Max, api_key: os.environ/SCX_API_KEY}

general_settings:
  master_key: os.environ/LITELLM_MASTER_KEY
python litellm/proxy/proxy_cli.py --config config.yaml --port 4000

Before (4df5006)

Model info

  1. Ask the proxy what it knows about each model (model, input, output and cached cost per token, function calling, vision)
curl -s localhost:4000/model/info -H "Authorization: Bearer $LITELLM_MASTER_KEY" \
  | jq -r '.data[] | [.model_name, .model_info.input_cost_per_token, .model_info.output_cost_per_token, .model_info.cache_read_input_token_cost, .model_info.supports_function_calling, .model_info.supports_vision] | @tsv'
  1. Only the existing Qwen3.8-Max row has prices, at the old rates
scx-ai/DeepSeek-V4.1-flash					
scx-ai/GLM-5.2-Fast					
scx-ai/GLM-5.3					
scx-ai/GLM-5.3-Fast					
scx-ai/GLM-5.3-Flash					
scx-ai/Kimi-K3					
scx-ai/Qwen3.8-Max	0.00000165	0.00000499	2.1E-7	true	true

Tool call and spend

  1. Send one tool-calling request per model and print the status, the tool call or error, the token counts and the cost header
h=$(mktemp); b=$(mktemp)
for m in DeepSeek-V4.1-flash GLM-5.2-Fast GLM-5.3 GLM-5.3-Flash Kimi-K3 Qwen3.8-Max; do
  curl -s -D $h -o $b localhost:4000/v1/chat/completions -H "Authorization: Bearer $LITELLM_MASTER_KEY" -H "Content-Type: application/json" \
    -d "{\"model\": \"scx-ai/$m\", \"messages\": [{\"role\": \"user\", \"content\": \"What is the weather in Perth? Use the tool.\"}],
         \"tools\": [{\"type\": \"function\", \"function\": {\"name\": \"get_weather\", \"parameters\": {\"type\": \"object\", \"properties\": {\"city\": {\"type\": \"string\"}}, \"required\": [\"city\"]}}}]}"
  printf '%-28s HTTP %s  ' "scx-ai/$m" "$(head -1 $h | awk '{print $2}')"
  jq -r 'if .error then "error: \(.error.message[0:110])" else "tool_call=\(.choices[0].message.tool_calls[0].function.name)(\(.choices[0].message.tool_calls[0].function.arguments))  prompt=\(.usage.prompt_tokens) completion=\(.usage.completion_tokens)" end' $b
  printf '%-28s x-litellm-response-cost: %s\n' "" "$(grep -i '^x-litellm-response-cost:' $h | awk '{print $2}' | tr -d '\r')"
done
  1. Every new model is rejected with a 400 and costs 0. Qwen3.8-Max is charged at the old rates: 320 x 1.65 + 56 x 4.99 per 1M is 0.00080744
scx-ai/DeepSeek-V4.1-flash   HTTP 400  error: litellm.UnsupportedParamsError: scx-ai does not support parameters: ['tools'], for model=DeepSeek-V4.1-flash. 
                             x-litellm-response-cost: 0
scx-ai/GLM-5.2-Fast          HTTP 400  error: litellm.UnsupportedParamsError: scx-ai does not support parameters: ['tools'], for model=GLM-5.2-Fast. To drop
                             x-litellm-response-cost: 0
scx-ai/GLM-5.3               HTTP 400  error: litellm.UnsupportedParamsError: scx-ai does not support parameters: ['tools'], for model=GLM-5.3. To drop thes
                             x-litellm-response-cost: 0
scx-ai/GLM-5.3-Flash         HTTP 400  error: litellm.UnsupportedParamsError: scx-ai does not support parameters: ['tools'], for model=GLM-5.3-Flash. To dro
                             x-litellm-response-cost: 0
scx-ai/Kimi-K3               HTTP 400  error: litellm.UnsupportedParamsError: scx-ai does not support parameters: ['tools'], for model=Kimi-K3. To drop thes
                             x-litellm-response-cost: 0
scx-ai/Qwen3.8-Max           HTTP 200  tool_call=get_weather({"city": "Perth"})  prompt=320 completion=56
                             x-litellm-response-cost: 0.00080744

After (5c4d4e8)

Model info

  1. Same command as Before
curl -s localhost:4000/model/info -H "Authorization: Bearer $LITELLM_MASTER_KEY" \
  | jq -r '.data[] | [.model_name, .model_info.input_cost_per_token, .model_info.output_cost_per_token, .model_info.cache_read_input_token_cost, .model_info.supports_function_calling, .model_info.supports_vision] | @tsv'
  1. Every model reports the rates from the Rows table
scx-ai/DeepSeek-V4.1-flash	1.5E-7	6E-7	1E-8	true	true
scx-ai/GLM-5.2-Fast	0.00000165	0.0000049	3E-7	true	false
scx-ai/GLM-5.3	9.3E-7	0.00000292	1.64E-7	true	false
scx-ai/GLM-5.3-Fast	0.0000028	0.0000088	5.6E-7	true	false
scx-ai/GLM-5.3-Flash	9E-8	3E-7	1.8E-8	true	true
scx-ai/Kimi-K3	0.00000237	0.00001187	2.37E-7	true	true
scx-ai/Qwen3.8-Max	0.000001408	0.000004235	1.76E-7	true	true

Tool call and spend

  1. Same command as Before
h=$(mktemp); b=$(mktemp)
for m in DeepSeek-V4.1-flash GLM-5.2-Fast GLM-5.3 GLM-5.3-Flash Kimi-K3 Qwen3.8-Max; do
  curl -s -D $h -o $b localhost:4000/v1/chat/completions -H "Authorization: Bearer $LITELLM_MASTER_KEY" -H "Content-Type: application/json" \
    -d "{\"model\": \"scx-ai/$m\", \"messages\": [{\"role\": \"user\", \"content\": \"What is the weather in Perth? Use the tool.\"}],
         \"tools\": [{\"type\": \"function\", \"function\": {\"name\": \"get_weather\", \"parameters\": {\"type\": \"object\", \"properties\": {\"city\": {\"type\": \"string\"}}, \"required\": [\"city\"]}}}]}"
  printf '%-28s HTTP %s  ' "scx-ai/$m" "$(head -1 $h | awk '{print $2}')"
  jq -r 'if .error then "error: \(.error.message[0:110])" else "tool_call=\(.choices[0].message.tool_calls[0].function.name)(\(.choices[0].message.tool_calls[0].function.arguments))  prompt=\(.usage.prompt_tokens) completion=\(.usage.completion_tokens)" end' $b
  printf '%-28s x-litellm-response-cost: %s\n' "" "$(grep -i '^x-litellm-response-cost:' $h | awk '{print $2}' | tr -d '\r')"
done
  1. Every request returns a tool call, and each cost header equals prompt x input rate plus completion x output rate, for example GLM-5.3 at 160 x 0.93 + 40 x 2.92 per 1M is 0.0002656 and Qwen3.8-Max at 320 x 1.408 + 49 x 4.235 per 1M is 0.000658075
scx-ai/DeepSeek-V4.1-flash   HTTP 200  tool_call=get_weather({"city": "Perth"})  prompt=289 completion=94
                             x-litellm-response-cost: 9.974999999999999e-05
scx-ai/GLM-5.2-Fast          HTTP 200  tool_call=get_weather({"city": "Perth"})  prompt=160 completion=36
                             x-litellm-response-cost: 0.00044039999999999997
scx-ai/GLM-5.3               HTTP 200  tool_call=get_weather({"city": "Perth"})  prompt=160 completion=40
                             x-litellm-response-cost: 0.0002656
scx-ai/GLM-5.3-Flash         HTTP 200  tool_call=get_weather({"city": "Perth"})  prompt=160 completion=36
                             x-litellm-response-cost: 2.5199999999999996e-05
scx-ai/Kimi-K3               HTTP 200  tool_call=get_weather({"city":"Perth"})  prompt=165 completion=119
                             x-litellm-response-cost: 0.00180358
scx-ai/Qwen3.8-Max           HTTP 200  tool_call=get_weather({"city": "Perth"})  prompt=320 completion=49
                             x-litellm-response-cost: 0.0006580749999999999

Type

New Feature

Caveats (if any)

Low

  • GLM-5.3-Fast is missing from the live run: the test key lacks access
    • Its limits and capability flags match GLM-5.3 and were not checked live

Final Attestation

  • The tests check the right things, including the edge cases, and regressions in the respective real-world customer use-cases are not possible after this PR

Add cost map rows for DeepSeek-V4.1-flash, GLM-5.2-Fast, GLM-5.3,
GLM-5.3-Fast, GLM-5.3-Flash and Kimi-K3, and move scx-ai/Qwen3.8-Max to
SCX.ai's current rates. Without a row, LiteLLM routes these models but
rejects tool calls and records zero spend.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-09T04:05:00.375455Z 5c4d4e8 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@greptile-apps

greptile-apps Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 4/5

[Medium impact] Adds new AI models and updates pricing data.

The PR needs behavioral regression tests and live proof for GLM-5.3-Fast before merging to meet repository requirements

Findings

  1. P2 Tests miss tools and spend ▶
  2. P2 One model lacks live proof ▶

Summary

Adds six SCX.ai model rows to both cost maps and lowers scx-ai/Qwen3.8-Max prices

  • LiteLLM lists prices and capabilities for six more SCX.ai models.
  • Qwen3.8-Max requests use SCX.ai's updated token prices.

bhuvan2134686 explicitly describes the Qwen price reduction as intentional because the provider's rates changed

Reviews (1) · Last reviewed commit: "feat(scx-ai): add six SCX.ai models and ..." · Reviewed by Greptile

Comment on lines +143 to +149
"scx-ai/DeepSeek-V4.1-flash",
"scx-ai/GLM-5.2",
"scx-ai/GLM-5.2-Fast",
"scx-ai/GLM-5.3",
"scx-ai/GLM-5.3-Fast",
"scx-ai/GLM-5.3-Flash",
"scx-ai/Kimi-K3",

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.

P2 Tests miss tools and spend

The expanded test only compares maps. AGENTS.md requires regression coverage before merging; add tool-support and cached-cost tests using loaded rates

Context Used: AGENTS.md (source)

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

"scx-ai/GLM-5.2",
"scx-ai/GLM-5.2-Fast",
"scx-ai/GLM-5.3",
"scx-ai/GLM-5.3-Fast",

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.

P2 One model lacks live proof

GLM-5.3-Fast lacks live QA because the key lacks access. Repository rules require real-provider proof before merging; add proxy results with an authorized key

Rule Used: Flag if the PR has no proof of e2e testing (if e2e testing is applicable here. If it's like an AGENTS.md change or something then probably no need to have e2e test proof) that either doesn't exist, claims that the box that it was trying to run in doe... (source)

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

@codspeed

codspeed Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 31 untouched benchmarks


Comparing SouthernCrossAI:litellm_scx_ai_new_models (5c4d4e8) with main (4df5006)

Open in CodSpeed

@codecov

codecov Bot commented Oct 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant