Skip to content

feat(providers): add TopxAI as a JSON-configured OpenAI-compatible provider - #41919

Open
UnbelievableT wants to merge 33 commits into
BerriAI:mainfrom
UnbelievableT:add-topxai-provider
Open

UnbelievableT wants to merge 33 commits into
BerriAI:mainfrom
UnbelievableT:add-topxai-provider

Conversation

@UnbelievableT

@UnbelievableT UnbelievableT commented Sep 19, 2026 •

Copy link
Copy Markdown

Update, November 19, 2026: TopxAI now offers kimi-k3.1-pro-Abliterated (Kimi K3.1 Pro with the refusal alignment removed, $3.25 input / $0.325 cache read / $6.50 output per 1M tokens), which replaces kimi-k3.1-pro; the old ID returns 403. deepseek-flash-Abliterated moved to $0.36 / $0.075 / $1.35. This PR is updated to match https://api.topxai.xyz/api/pricing.

TopxAI users currently need a custom OpenAI-compatible base URL and separate prices. This adds a named provider with TopxAI credentials, Chat Completions and Responses routing, and cost tracking for twelve current text models

Screenshots / Proof of Fix

Dashboard screenshots

On Models + Endpoints → Add Model, I searched for TopxAI on the merge base 02b4292e and on ea09b1fe. Both dashboards ran in the same Chrome tab against the same empty admin fixture, with the provider catalogue supplied by the respective checkout.

Before and after the provider was registered

Before — the provider search returned “No providers found.”

Before the change, searching for TopxAI returns no providers

After — the provider picker shows the TopxAI name and logo.

After the change, the Add Model provider picker finds TopxAI

Selecting it exposes the GPT-6.2 model IDs and the default API base. The API key field is empty in this fixture.

The selected TopxAI provider shows its model choices, API base and empty key field

Live proxy proof

On 2026-11-17 UTC I ran the proxy on the merge base 02b4292e200c6d2c8789340451fa66a0766aaf08 and on ea09b1fe8181a98a37f9227b588cc0c194b8aa4d. Both used CPython 3.13.12, Uvicorn 0.51.0, two workers, a dedicated loopback Redis 7.2.8, and the cost map shipped with their respective checkout. The merge base logged LLM Provider NOT provided for both topxai/ models, and returned HTTP 400 for all twelve requests before dispatch. The PR routes returned HTTP 200 and the text OK on each of the twelve combinations. The candidate sent the requests to TopxAI using a temporary shared-route key.

Proxy config, curl requests and observed costs
model_list:
  - model_name: gpt-6.2-astra
    litellm_params:
      model: topxai/gpt-6.2-astra
      api_key: os.environ/TOPXAI_API_KEY
      max_retries: 0
      timeout: 110
  - model_name: gpt-6.2-sol
    litellm_params:
      model: topxai/gpt-6.2-sol
      api_key: os.environ/TOPXAI_API_KEY
      max_retries: 0
      timeout: 110
litellm_settings:
  include_cost_in_streaming_usage: true
  num_retries: 0
router_settings:
  num_retries: 0
  redis_host: 127.0.0.1
  redis_port: 58335
general_settings:
  master_key: os.environ/LITELLM_MASTER_KEY
  coordination_redis:
    host: 127.0.0.1
    port: 58335
export LITELLM_LOCAL_MODEL_COST_MAP=True
# Set TOPXAI_API_KEY and LITELLM_MASTER_KEY in the shell first.
python litellm/proxy/proxy_cli.py --config candidate.yaml --host 127.0.0.1 --port 58337 --num_workers 2 --detailed_debug --reload --use_v2_migration_resolver

For each command below, set model to either gpt-6.2-astra or gpt-6.2-sol. These examples show the original request bodies. Port 58336 served the merge base.

model=gpt-6.2-astra
base=http://127.0.0.1:58337
auth="Authorization: Bearer $LITELLM_MASTER_KEY"

curl -sSNi --max-time 130 --retry 0 -X POST "$base/v1/chat/completions" \
  -H "$auth" -H "Content-Type: application/json" \
  --data-binary '{"model":"'"$model"'","stream":false,"messages":[{"role":"user","content":"Reply with exactly OK."}],"max_completion_tokens":96,"reasoning_effort":"low"}'

curl -sSNi --max-time 130 --retry 0 -X POST "$base/v1/chat/completions" \
  -H "$auth" -H "Content-Type: application/json" \
  --data-binary '{"model":"'"$model"'","stream":true,"messages":[{"role":"user","content":"Reply with exactly OK."}],"max_completion_tokens":96,"reasoning_effort":"low","stream_options":{"include_usage":true}}'

curl -sSNi --max-time 130 --retry 0 -X POST "$base/v1/responses" \
  -H "$auth" -H "Content-Type: application/json" \
  --data-binary '{"model":"'"$model"'","stream":false,"input":"Reply with exactly OK.","max_output_tokens":96,"reasoning":{"effort":"low"},"store":false}'

curl -sSNi --max-time 130 --retry 0 -X POST "$base/v1/responses" \
  -H "$auth" -H "Content-Type: application/json" \
  --data-binary '{"model":"'"$model"'","stream":true,"input":"Reply with exactly OK.","max_output_tokens":96,"reasoning":{"effort":"low"},"store":false}'

curl -sSNi --max-time 130 --retry 0 -X POST "$base/v1/messages" \
  -H "$auth" -H "Content-Type: application/json" \
  -H "anthropic-version: 2023-06-01" \
  --data-binary '{"model":"'"$model"'","stream":false,"messages":[{"role":"user","content":"Reply with exactly OK."}],"max_tokens":96}'

curl -sSNi --max-time 130 --retry 0 -X POST "$base/v1/messages" \
  -H "$auth" -H "Content-Type: application/json" \
  -H "anthropic-version: 2023-06-01" \
  --data-binary '{"model":"'"$model"'","stream":true,"messages":[{"role":"user","content":"Reply with exactly OK."}],"max_tokens":96}'

All calls used Reply with exactly OK. The table lists input and output tokens, the USD cost from x-litellm-response-cost on regular responses or final usage.cost on streams, and the proxy call ID. The response model field echoed the requested ID in every case.

Model Endpoint Stream Input Output USD x-litellm-call-id
gpt-6.2-astra /v1/chat/completions no 11 5 0.000144 35be6183-8937-4792-80a1-d2494a652af3
gpt-6.2-astra /v1/chat/completions yes 11 5 0.000144 ac60388c-8bc0-44ff-b220-2baec8cedcf3
gpt-6.2-astra /v1/responses no 24 5 0.000196 766eef99-4631-4b08-853d-424302e1e5bc
gpt-6.2-astra /v1/responses yes 24 5 0.000196 3ab41870-956c-49c3-aa47-7715aab3ee16
gpt-6.2-astra /v1/messages no 11 5 0.000144 2c9a727b-24b5-4f8c-93b1-fd47d20e8c83
gpt-6.2-astra /v1/messages yes 11 5 0.000144 7c932551-19c6-4de8-8365-2f95e637ec8f
gpt-6.2-sol /v1/chat/completions no 24 5 0.000049 1e6a06f9-96a4-46dc-b90c-802a2b617cca
gpt-6.2-sol /v1/chat/completions yes 24 5 0.000049 64ff0287-3baf-41dd-8060-a331395005c0
gpt-6.2-sol /v1/responses no 24 5 0.000049 b34b87fb-09c9-4573-b97f-61eb37df2ba7
gpt-6.2-sol /v1/responses yes 24 5 0.000049 e245bac8-2576-4d66-b090-8fee2e2ca1c6
gpt-6.2-sol /v1/messages no 24 5 0.000049 2b9ac3cb-8f0a-46e6-9378-43d2d27afab8
gpt-6.2-sol /v1/messages yes 24 5 0.000049 9682594c-4460-4caf-98b5-26051ee0df90

The last Chat Completions chunk carried the OpenAI-shaped usage, the Responses stream carried usage in response.completed.response.usage, and the Messages stream carried cost in message_delta.usage. For example, the Astra Chat stream ended with {"prompt_tokens":11,"completion_tokens":5,"total_tokens":16,"cost":0.000144} (usage excerpt). That matches 11 input tokens at $4 per million plus 5 output tokens at $20 per million, the Auto-route price on November 17. Sol matched $1 input and $5 output per million. Since November 18 these models cost $6.40 / $32 (Astra) and $1.60 / $8 (Sol), so the Astra Chat call above now costs $0.0002304 and each Sol call $0.0000784; the cost map in this PR carries those prices.

Across the twelve combinations and two extra captures of non-streaming Responses, TopxAI recorded 14 settled requests and a total wallet debit of $0.001514 after per-request quota rounding. The two extra captures replaced incomplete local transcripts of successful HTTP 200 calls. Both paid test keys were disabled and returned HTTP 401 after the run.

Details

TLDR

Problem this solves:

  • Manual routing and missing TopxAI prices

How it solves it:

  • Registers the provider in SDK, proxy and dashboard
  • Includes current models, cache prices and context tiers
  • Tests routing and billing through public LiteLLM APIs

User Flow

Before, developers configure a custom endpoint and maintain prices separately

  1. Set a TopxAI key and custom OpenAI-compatible base URL
  2. Choose a current model ID
  3. Supply its route prices separately for cost tracking

After, developers can select the named provider and its published Auto-route prices

  1. Set TOPXAI_API_KEY
  2. Use topxai/claude-sonnet-5-5 with completion, or a supported model with responses
  3. Track token, cache and applicable whole-request context-tier costs

Current catalogue

Verified against the public pricing API and model guides on November 18, 2026. Pricing API The entries follow each model's auto_route, rather than original-provider reference prices or every route sold by TopxAI

On the evening of November 18, 2026, TopxAI merged its shared-pool and official-line routes: Claude, GPT and Grok are each sold on one route at 80% of the lab's list price in every lane, long-context tiers included. GLM, Kimi and DeepSeek keep their fixed private-deployment prices. Per million tokens (input / output / cache read / cache write):

Model Standard Whole request from the tier threshold
claude-sonnet-5-5 $1.60 / $8 / $0.08 / $2 (1-hour write $3.20) none
claude-opus-5-5 $3.20 / $16 / $0.16 / $4 (1-hour write $6.40) none
claude-fable-5-2 $6.40 / $32 / $0.16 / $8 (1-hour write $12.80) none
gpt-6.2-astra $6.40 / $32 / $0.32 / $8 from 272,001: $12.80 / $48 / $0.64 / $16
gpt-6.2-sol $1.60 / $8 / $0.08 / $2 from 272,001: $3.20 / $12 / $0.16 / $4
gpt-6.1-terra $0.80 / $4 / $0.04 / $1 from 272,001: $1.60 / $6 / $0.08 / $2
grok-4.7 $1.60 / $4.80 / $0.40 / none from 200,000: $3.20 / $9.60 / $0.80 / none

On November 8 TopxAI moved its GLM, Kimi and DeepSeek models onto private deployments with fixed prices. None of the five publishes a cache-write price or a long-context tier, so their entries carry input, cache-read and output prices only, and a cache write bills as input

kimi-k3.1-pro-Abliterated (since November 19, replacing kimi-k3.1-pro) is priced at $3.25 input, $6.50 output and $0.325 cache read per million tokens, with no cache-write price. Its published context and output limits are 1,048,576 and 131,072. Chat supports vision, function calling and selecting a named function. The host ignores tool_choice: none, tool_choice: required and strict JSON schemas, so the two general LiteLLM capability flags are off. Kimi guide

deepseek-flash-Abliterated replaces the retired Flash ID at fixed $0.36 input, $1.35 output and $0.075 cache read per million tokens (the prices TopxAI set on November 19). It has 1,048,576 context and 131,072 output tokens, and does not inherit the original DeepSeek model's peak schedule. Strict response schemas are covered by published acceptance, while forced tool selection is not claimed. Retired deepseek-v4-pro is removed

deepseek-flash-fast is DeepSeek V4.1 Flash on standard weights at $0.02 input, $0.16 output and $0.004 cache read, with 1,048,576 context and 262,144 output tokens. It ignores json_schema and the none and required tool choices. Selecting a named function works. DeepSeek guide

GLM-5.3-Abliterated is $3 input, $6 output and $0.45 cache read, text only. GLM-5.3-Flash-Abliterated is $0.36 input, $1.50 output and $0.075 cache read, with text and image input, 1,048,576 context and 131,072 output tokens

gpt-6.1-terra is included at $0.80 input, $4 output, $0.04 cache read and $1 cache write per million tokens on the Auto route. From 272,001 input tokens, the full request uses $1.60 input, $6 output, $0.08 cache read and $2 cache write. The context window is 1,050,000 tokens, including up to 922,000 input tokens, with up to 128,000 output. Terra advertises vision, reasoning, prompt caching, structured output and tool choice. November 18 checks verified a forced custom tool and strict JSON schemas on Chat Completions and Responses. All three GPT rows advertise text and image input and leave PDF input disabled. Terra guide · Astra and Sol guide

claude-fable-5-2 replaces claude-fable-5-1, which TopxAI retired on November 10 with no forwarding alias (the old ID returns HTTP 403). It is $6.40 input, $32 output, $0.16 cache read, and $8 / $12.80 for 5-minute / 1-hour cache writes on the Claude route, with 1,000,000 context and 128,000 output tokens

GPT context premiums start at 272,001 input tokens and Grok's at 200,000. Claude one-hour cache writes remain included. Native Responses routing covers all three GPT models, Grok, Kimi, both DeepSeek models and GLM Flash. Claude and text-only GLM use LiteLLM’s Chat Completions conversion. Claude supports automatic tool use but rejects forced tools, so its model rows leave the unrestricted tool-choice flag off. Endpoint reference

Relevant issues

Companion documentation is BerriAI/litellm-docs#1558

Validation

Updated on November 13, 2026 at 93ce084c86: merges upstream 4dad0bc513 (457 commits). The only conflict was the TopxAI logo, which now sits in the dashboard's new location, litellm/ui/litellm-dashboard/public/assets/logos/topxai.svg. Against main the PR still only adds lines: 12 files, 960 insertions. Both cost maps stay byte-identical with no duplicate keys, and all twelve topxai/ entries match the live Auto-route prices and limits in /api/pricing today, including cache lanes and context tiers. Both endpoint maps are identical

With Python 3.12.2 and the native bridge built from this checkout, the same five test files plus test_aaamodel_prices_and_context_window_json_is_valid pass: 320 tests. litellm/scripts/generate_provider_endpoints_support.py --check and git diff --check pass. No paid requests were made

Updated on November 13, 2026 at fa65b5b, directly after 4c2f30efb1: TopxAI's API site moved to api.topxai.xyz. The previous host answers 308, and HTTP clients drop the Authorization header on that cross-host redirect, so the old default base URL fails with 401. This commit changes the host in the default base URL (litellm/constants.py, providers.json), the dashboard placeholder, the 24 source links in the two cost maps and the test's expected URLs: 37 lines in six files, each the same host substitution with the paths unchanged. Prices, limits and model IDs are untouched. The TopxAI entries in both cost maps stay identical, scripts/generate_provider_endpoints_support.py --check and git diff --check pass, and Ruff 0.15.3 reports nothing new on the changed Python files. The pytest run was not repeated for this host-only change. No paid requests were made

Updated on November 10, 2026 at 4c2f30efb1, directly after f3de0ae7e4: 35 lines in three files, no upstream merge. TopxAI repriced its three abliterated private deployments that day and retired claude-fable-5-1 in favour of claude-fable-5-2. Both cost maps change identically, stay byte-identical and have no duplicate keys. Every topxai/ entry's token, cache-read and cache-write prices and its limits were compared with the live Auto-route catalogue: twelve entries, no difference

The same five test files pass, 323 tests, with Python 3.12.16 and the native bridge built from this checkout. Restoring only the two cost maps to f3de0ae7e4 makes the metadata test fail with topxai/claude-fable-5-2 missing, and restoring this change passes. scripts/generate_provider_endpoints_support.py --check, Ruff checks and formatting on the changed test, and git diff --check pass. No paid requests were made

Updated on November 9, 2026 at f3de0ae7e4, directly after 5092788df5. This follow-up adds 43 lines in three files and does not merge unrelated upstream changes. The two price maps remain byte-identical with no duplicate keys. All eight Terra token and cache rates and both limits were checked against the live Auto-route catalogue

323 tests pass in the five affected files with Python 3.13.12 and the native bridge built from this checkout. The command was .venv/bin/python -m pytest tests/unit/llms/openai_like/test_topxai_provider.py tests/unit/test_cost_map_guard.py tests/unit/test_model_prices_and_context_window.py tests/unit/litellm_core_utils/test_get_model_cost_map.py tests/code_coverage_tests/test_generate_provider_endpoints_support.py -q. Coverage includes Terra Responses routing, normal and cached prices around the 272,001-token threshold, and backup-map parity. Restoring both cost maps to 5092788df5 makes the expanded metadata test fail with topxai/gpt-6.1-terra missing, then restoring this change passes

.venv/bin/python scripts/generate_provider_endpoints_support.py --check, Ruff checks and formatting on the changed test, and git diff --check pass. No paid requests or live proxy end-to-end run were made. External CI and reviews are still required for the updated tip

Earlier, on November 8, 2026 at 5092788df5, on top of 3b67f9607c, which merges upstream 48ff826cbc. Against that merge base the PR only adds lines: 12 files, 917 insertions, no deletions. Both price maps are byte-identical, as are both endpoint maps, and neither has a duplicate key. generate_provider_endpoints_support.py --check passes

309 tests pass locally in the five affected files: the TopxAI provider tests, the cost-map guard, the full model-price/context-window file, the cost-map loader and the endpoint-support generator. ruff check, ruff format --check and git diff --check pass. The workflow runs on 3b67f9607c were waiting for maintainer approval, so CI has not yet run on the merged tip

Earlier, on October 28 at 1241046c57: Upstream 94e4ebd63d is merged, preserving the other provider registrations added upstream alongside TopxAI. TopxAI entries in both catalogue files use max_output_tokens without the retired max_tokens alias. 161 focused tests pass: the TopxAI provider and the adjacent JSON-configured provider, JSON loader, dynamic configuration and the full model-price/context-window test file. The OSV scan on that tip reported dependencies in uv.lock and vscode-extension/package-lock.json; this PR does not change either file

Pre-Submission checklist

  • I have added meaningful tests
  • The affected test files pass locally
  • My PR passes all required CI/CD checks at the updated tip
  • The scope is the TopxAI provider integration
  • Veria completed its automated review of ea09b1fe and the CLA check passed

Caveats

Medium

  • Claude cache breakpoints use the documented anthropic/ path
  • Stateful Responses workflows are not verified

November 18 catalogue update

The two cost maps now use topxai/gpt-6.2-astra and topxai/gpt-6.2-sol. Short-context Auto-route input / output per million tokens are $6.40 / $32 for Astra and $1.60 / $8 for Sol (80% of list since the route merge below). The whole-request tier starts at 272,001 input tokens. Each model accepts up to 922,000 input tokens and 128,000 output tokens. TopxAI migration guide

Chat and text completions now require provider credentials before dispatch. To run the regression checks in a configured LiteLLM development environment, use LITELLM_LOCAL_MODEL_COST_MAP=True pytest -q tests/unit/llms/openai_like tests/unit/test_cost_map_guard.py tests/unit/rust_bridge/host/test_model_cost.py. These 855 tests passed at ea09b1fe. The live price table, 12 runtime model records and eight native Responses routes were independently checked. The new tests cover missing, configured and explicitly supplied credentials. Review fix

November 18 route merge

On the evening of November 18, 2026, TopxAI merged its shared-pool and official-line routes: Claude, GPT and Grok are each sold on one route at 80% of the lab's list price in every lane, long-context tiers included. GLM, Kimi and DeepSeek keep their fixed private-deployment prices. 6616a729 updates the twelve topxai/ entries in both cost maps from route_prices[auto_route] in the public pricing API: 96 values change, all on the seven Claude, GPT and Grok models (base, cache and long-context lanes, and Grok's two tiered_pricing bands); the five private deployments are unchanged. A new parametrized test pins each model's Auto-route input, output, cache-read and cache-write price per million tokens, so the existing boundary tests also fix the long-context rates. The merge af797dd1 brings in upstream da8c02b9 (77 commits) without conflicts. Routes and prices

With Python 3.12.13 and the locked environment, pytest tests/unit/llms/openai_like tests/unit/test_model_prices_and_context_window.py tests/unit/test_utils.py::test_aaamodel_prices_and_context_window_json_is_valid passes 909 tests; the two failures are test_aiand_provider.py timezone cases that call time.tzset, which Windows lacks, in a file this PR does not touch. The TopxAI file alone passes 101 tests, 13 of them new; with the cost map restored to the merge commit, 7 of the 13 fail, one per repriced model. litellm/scripts/ci_cd/cost_map_guard.py passes against the merge base, and Ruff 0.15.3 check and format pass on the changed test. Both cost maps stay identical for every topxai/ entry. No paid requests were made for this price-only change.

…ovider

TopxAI (https://ai.topxea.com) relays Claude, GPT, Grok, Kimi and a fine-tuned
GLM through one OpenAI-compatible endpoint at fixed USD prices. This registers
topxai/ in providers.json with the Responses API declared, adds the nine text
models to the cost map with their cache lanes and the OpenAI and Grok
whole-request long-context tiers, and registers the provider in the endpoint
matrix and the dashboard.
@CLAassistant

CLAassistant commented Sep 19, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@codspeed

codspeed Bot commented Sep 19, 2026 •

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

1 warning

⚠️ 1 benchmark is dominated by system calls

System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.

Learn more about system calls

See affected benchmarks

✅ 35 untouched benchmarks


Comparing UnbelievableT:add-topxai-provider (1241046) with main (4b0aa0f)1

Open in CodSpeed

Footnotes

  1. No successful run was found on main (d84a2d4) during the generation of this report, so 4b0aa0f was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩

@greptile-apps

greptile-apps Bot commented Sep 19, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

The PR appears safe to merge, with no outstanding correctness or repository-rule findings

Summary

This PR registers TopxAI as a JSON-configured OpenAI-compatible provider, adds model pricing and capability metadata, supports Chat Completions and Responses routing, and exposes the provider in dashboard configuration. The latest revision replaces unsupported Grok threshold fields with the repository's established tiered-pricing schema. The ranges correctly make 200,000 the first premium token under the current runtime selection semantics

Reviews (3) · Last reviewed commit: "fix(topxai): use supported schema for in..."

Comment thread litellm/constants.py Resolved
@codecov

codecov Bot commented Sep 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@UnbelievableT

Copy link
Copy Markdown
Author

@greptileai Please re-review the updated Responses tests, context boundaries, cache-write rates, source citations, and removal of the redundant provider comment.

Comment thread litellm/llms/openai_like/providers.json Resolved
@veria-ai

veria-ai Bot commented Sep 19, 2026 •

Copy link
Copy Markdown
Contributor

PR overview

All previously flagged issues have been addressed. No open security concerns remain on this pull request.

Fixed/addressed: 2 · PR risk: 0/10

Reviews

@UnbelievableT

Copy link
Copy Markdown
Author

@greptileai Please re-review the supported Grok tier schema. Runtime boundary tests and the existing cost-map schema test now pass locally.

@UnbelievableT

Copy link
Copy Markdown
Author

Reproduced the Azure fallback failure on unmodified CI base 1259378: one failed, one passed. Exact dated catalog entry contradicts fallback expectation

UnbelievableT and others added 2 commits September 28, 2026 22:11
Conflicts resolved:
- litellm/constants.py: keep upstream's new "sail" entry in
  openai_compatible_providers and add "topxai" after it.
- litellm/llms/openai_like/providers.json: keep upstream's new "sail"
  provider and append "topxai" after it.
- tests/test_litellm/llms/openai_like/test_topxai_provider.py: upstream
  moved tests/test_litellm/llms to tests/unit/llms (BerriAI#43191); the TopxAI
  test moves with it to tests/unit/llms/openai_like/.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…cing

TopxAI retired claude-fable-5, claude-opus-5, gpt-5.6-sol and grok-4.6 on
2026-09-24; its API now answers 403 for them. Their topxai/* entries are
removed, and topxai/claude-opus-5-5, topxai/gpt-6-sol and topxai/grok-4.7
take the places of their predecessors. topxai/deepseek-flash and
topxai/deepseek-v4-pro are added.

Every number comes from https://ai.topxea.com/api/pricing (2026-09-28), on
the route the existing entries already used: the model's auto route, which
is the shared pool where one exists (claude-shared, openai-shared,
grok-shared) and otherwise its single official line (kimi-official,
z-official, deepseek-official).

- gpt-6-astra: max_input_tokens follows the catalogue's 1,050,000 context
  window (was 1,000,000).
- Cache-write rates only where the catalogue publishes one. GLM and Grok
  publish none, so cache_creation_input_token_cost is dropped from
  GLM-5.3-Abliterated and not set on grok-4.7; an absent rate bills cache
  writes at the input rate, the value the removed field repeated.
- grok-4.7 has no max_output_tokens: the catalogue lists no output limit.
  Its 200K tier keeps the inclusive boundary through tiered_pricing.
- DeepSeek lists the peak lanes and an off_peak_pricing block with the
  weekday windows, the same shape as the upstream deepseek rows. Chinese
  public holidays, which TopxAI bills off-peak, cannot be expressed.

Tests follow the current models and add DeepSeek peak/off-peak costs at
pinned billing times.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
UnbelievableT and others added 2 commits September 30, 2026 20:53
Conflicts resolved:
- litellm/constants.py: keep upstream's new
  "https://api.prisminference.com/v1" entry in openai_compatible_endpoints
  and add "https://ai.topxea.com/v1" after it.
- litellm/types/utils.py: keep upstream's new LlmProviders.PRISM and add
  TOPXAI after it.

The cost maps and the other provider registry files merged cleanly.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
TopxAI retired gpt-6-sol on 2026-09-30 with no forwarding alias;
requests for it now answer HTTP 403. topxai/gpt-6.1-sol takes the place
of its entry in both cost maps.

Prices are the openai-shared route that auto_route names in
https://ai.topxea.com/api/pricing (2026-09-30), encoded the way the
gpt-6-sol entry was: input 1e-06, output 5e-06, cache read 5e-08 (half
of GPT-6 Sol's 1e-07), cache write 1.25e-06. Above 272,000 input tokens,
cache tokens included, the whole request bills 2e-06 / 7.5e-06 / 1e-07 /
2.5e-06. Context 1,050,000 and output 128,000 tokens as the catalogue
lists them; the capability flags are unchanged.

The tests follow the new id. Their catalogue comments now cite
2026-09-30, when all ten entries were checked against /api/pricing again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
UnbelievableT added a commit to UnbelievableT/litellm-docs that referenced this pull request Sep 30, 2026
TopxAI retired gpt-6-sol on 2026-09-30 with no forwarding alias;
requests for it now answer HTTP 403. The model table and the streaming,
Responses and proxy examples use topxai/gpt-6.1-sol, matching the cost
map in BerriAI/litellm#41919. The Auto-route price stays at $1 input and
$5 output per million tokens, with the whole-request $2 / $7.50 tier
from 272,001 input tokens (https://ai.topxea.com/api/pricing,
2026-09-30).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@UnbelievableT

Copy link
Copy Markdown
Author

@mateo-berri @ryan-crabbe-berri @kerry-berri @yuneng-berri friendly ping for a review, since you're the requested code owners for the cost maps. I merged main again today (b41715b, no conflicts), and the net diff is still 12 files, additions only. The PR now lists topxai/gpt-6.1-sol, because TopxAI retired gpt-6-sol on 2026-09-30. Locally the 62 TopxAI tests, tests/unit/llms/openai_like/ (258), the cost-map checks (121) and the cost-map guard pass; the only failures are the four tests/unit/interactions/test_openapi_compliance.py tests, which fail on main too. The docs page is BerriAI/litellm-docs#1558. If an internal copy is easier for you, as with Prism in #41961, that works for us as well. Thanks!

UnbelievableT and others added 8 commits October 5, 2026 22:42
TopxAI retired claude-sonnet-5 on 2026-10-02 (requests answer 403) and offers
claude-sonnet-5-5 at the same shared-pool prices
(https://ai.topxea.com/pricing/claude-sonnet-5-5).
# Conflicts:
#	ui/litellm-dashboard/src/components/provider_info_helpers.tsx
Conflicts were neighbouring additions (reka, openinfer, inferenceapis, typesafe,
nace) next to the TopxAI entries; both sides kept. The TopxAI endpoint-support
rows gain the new "interactions": false key.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
TopxAI corrected the shared-pool lane on 2026-10-23; GET
https://ai.topxea.com/api/pricing now lists claude-shared cache_read 0.05,
half of Anthropic's $0.10, like the other lanes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts:
#	litellm/constants.py
#	litellm/llms/openai_like/providers.json
#	litellm/types/utils.py
TopxAI moved its GLM, Kimi and DeepSeek models onto private deployments
with fixed prices on 2026-11-08 (route_prices[auto_route] at
https://ai.topxea.com/api/pricing). Both price maps change identically:

- kimi-k3.1-pro: $0.50 input, $0.30 cache read, $5 output per million
  tokens, and no cache-write price
- GLM-5.3-Abliterated: $2 / $0.30 / $4
- deepseek-flash-Abliterated: $0.28 / $0.07 / $1, 131,072 output tokens
- new GLM-5.3-Flash-Abliterated: $0.24 / $0.08 / $1, text and images,
  1,048,576 context, 131,072 output
- new deepseek-flash-fast: $0.02 / $0.004 / $0.16, 1,048,576 context,
  262,144 output; no response-schema or forced tool-choice claim

The tests drop Kimi from the cache-write routes, cover both new models
in the metadata, Responses and backup-sync cases, and check fixed
prices at all hours for both DeepSeek models.
TopxAI repriced its three abliterated private deployments on 2026-11-10
(USD per 1M input / output / cache read): GLM-5.3-Abliterated 3 / 6 / 0.45,
GLM-5.3-Flash-Abliterated 0.36 / 1.50 / 0.075, deepseek-flash-Abliterated
0.42 / 1.50 / 0.105. The same day Claude Fable 5.2 replaced Fable 5.1 with
no forwarding alias, so topxai/claude-fable-5-1 becomes
topxai/claude-fable-5-2 at the shared-pool price (4 / 20 / 0.10, cache
writes 5 and 8 for 5 minutes and 1 hour), with the same limits and flags.

Both cost maps change identically and stay byte-identical; every topxai
entry matches https://ai.topxea.com/api/pricing as read on 2026-11-10.
….xyz

TopxAI's API site moved on 2026-11-13. The previous host answers 308,
and HTTP clients drop the Authorization header on that cross-host
redirect, so the old default base URL fails with 401.
Comment thread litellm/llms/openai_like/providers.json Resolved
@UnbelievableT

Copy link
Copy Markdown
Author

@kerry-berri could you review the TopxAI cost entries and approve the fork CI run for ea09b1f? GitHub lists 14 workflows awaiting approval. The live proxy returned HTTP 200 on all 12 combinations of Astra/Sol, Chat/Responses/Messages, and streaming/non-streaming. The merge base returned 400 on those same calls. The request examples and observed costs are in the PR description. The 855 relevant tests passed locally, the CLA check passed, and Veria cleared the credential fallback finding.

The companion provider guide uses the native provider introduced here. Its docs workflow and Vercel preview also need BerriAI approval. Landing the guide with or just after the implementation would keep the examples usable. Thanks for taking a look.

TopxAI merged its shared and official routes on 2026-11-18: Claude, GPT and
Grok are each sold on one route at 80% of the lab's list price in every lane,
long-context tiers included. Update the twelve cost-map entries (root and
backup) from route_prices[auto_route] in https://api.topxai.xyz/api/pricing
and pin the Auto-route prices per million tokens in the provider test. The
GLM, Kimi and DeepSeek private deployments keep their fixed prices.
…ek-flash-Abliterated reprice

TopxAI replaced kimi-k3.1-pro with kimi-k3.1-pro-Abliterated on 2026-11-19
($3.25 input / $0.325 cache read / $6.50 output per 1M tokens; json_schema
works on it) and repriced deepseek-flash-Abliterated to $0.36 / $0.075 / $1.35.
Source: https://api.topxai.xyz/api/pricing (2026-11-19).

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.

2 participants