Skip to content

fix(registry): add Gemini Omni 1.1 Flash, xAI grok-imagine image models, Mistral cache-read pricing, GLM 5.3 Flash + Kimi K2.7 Code entries - #38560

Merged
mateo-berri merged 11 commits into
litellm_internal_stagingfrom
devin/1787857843-registry-audit-rolling
Aug 28, 2026
Merged

fix(registry): add Gemini Omni 1.1 Flash, xAI grok-imagine image models, Mistral cache-read pricing, GLM 5.3 Flash + Kimi K2.7 Code entries#38560
mateo-berri merged 11 commits into
litellm_internal_stagingfrom
devin/1787857843-registry-audit-rolling

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

TLDR

Problem this solves:

  • Registry is missing several provider models and pricing fields
  • Gemini Omni 1.1 Flash, xAI grok-imagine image models, Mistral cache pricing absent
  • New GLM 5.3 Flash and Kimi K2.7 Code endpoints unmapped
  • xAI grok-imagine-image-pro lacked its announced retirement date

How it solves it:

  • Adds the Gemini Omni 1.1 Flash entry
  • Adds xAI grok-imagine image models and grok-4.20 undated/latest aliases
  • Adds Mistral cache_read_input_token_cost from the official pricing page
  • Absorbs the verified entries from registry PRs feat(model_prices): add zai/glm-5.3-flash pricing #38627, feat(model_prices): add databricks/databricks-glm-5-3-flash #38583, feat: add moonshot/kimi-k2.7-code pricing #38576
  • Adds deprecation_date: 2026-05-15 to xai/grok-imagine-image-pro
  • Lets the registry validation test's supported_endpoints enum accept /v1beta/interactions, the Interactions API path the two Gemini Omni entries now declare
  • Makes the image cost router fall back to the request's quality and WxH size when the provider's image response omits them (xAI's do), so quality: low on xai/grok-imagine-image-2.0 is billed at its $0.04 tier instead of the $0.06 default; a non-WxH size such as auto is ignored as before
  • Corrects entries the audit found wrong against the live provider APIs: both Gemini Omni entries are Interactions-API-only with 131072 / 65536 limits, the grok-4.20 multi-agent aliases are Responses-API-only and reject client-side tools, kimi-k2.7-code gets its tool, reasoning, and vision flags, and grok-imagine-image-2.0 gets its $0.04 low quality tier

User Flow

Before: a developer whose gateway routes the new Gemini, xAI, Z.AI, and Moonshot models sees $0 spend for them, and Mistral prompt-cache hits are billed at the full input rate

  1. The proxy admin adds gemini/gemini-omni-1.1-flash, xai/grok-imagine-image, zai/glm-5.3-flash, moonshot/kimi-k2.7-code, and databricks/databricks-glm-5-3-flash to the proxy config and restarts it
  2. They GET https://litellm-domain/model/info and the new entries come back with no prices, no context window, and no capability flags
  3. A developer sends POST https://litellm-domain/v1beta/interactions with model: gemini/gemini-omni-1.1-flash (the only API Google serves this model on) and gets a normal 200 with no x-litellm-response-cost header and x-litellm-response-cost-original: 0.0; the same happens on POST https://litellm-domain/v1/chat/completions for the Z.AI and Moonshot models. POST https://litellm-domain/v1/responses with model: xai/grok-4.20-multi-agent is priced only because xAI's reply names the dated -0309 slug, and GET https://litellm-domain/health?model=xai/grok-4.20-multi-agent fails with Multi Agent requests are not allowed on chat completions
  4. They send POST https://litellm-domain/v1/images/generations with model: xai/grok-imagine-image or xai/grok-imagine-image-2.0, get their image back with no cost header, and the spend log row says $0
  5. They send POST https://litellm-domain/v1/chat/completions with model: mistral/mistral-large-latest twice with the same long prefix; when the second reply reports cached prompt tokens, the cost header still charges them at the full input rate
  6. https://litellm-domain/ui/?page=logs shows the Gemini, xAI, Z.AI, and Moonshot requests at $0 and the cached Mistral request overcharged

After: the same requests are priced from the official provider rates

  1. The proxy admin adds gemini/gemini-omni-1.1-flash, xai/grok-imagine-image, zai/glm-5.3-flash, moonshot/kimi-k2.7-code, and databricks/databricks-glm-5-3-flash to the proxy config and restarts it
  2. They GET https://litellm-domain/model/info and each new entry carries its official prices, context window, and capability flags: the Gemini Omni entries list /v1beta/interactions as their endpoint, the multi-agent aliases list /v1/responses with function calling off, and moonshot/kimi-k2.7-code reports tool calling, reasoning, and vision (the Databricks entry carries limits and capabilities only, since Databricks has not published a rate)
  3. A developer sends POST https://litellm-domain/v1beta/interactions with model: gemini/gemini-omni-1.1-flash and the x-litellm-response-cost header carries the real cost at the official per-token rates; the same holds for the Z.AI and Moonshot chat requests, the multi-agent Responses request keeps its price, and GET https://litellm-domain/health?model=xai/grok-4.20-multi-agent passes
  4. They send POST https://litellm-domain/v1/images/generations with model: xai/grok-imagine-image and the cost header reads $0.02 per generated image; xai/grok-imagine-image-2.0 reads $0.06, or $0.04 when the request carries quality: low
  5. They send the same two Mistral requests and, when the second reply reports cached prompt tokens, those are billed at the cached rate, 10% of the input rate
  6. https://litellm-domain/ui/?page=logs shows real spend for each request and the lower cost on a cached Mistral reply

Changes by provider (all values from official docs)

Gemini, https://ai.google.dev/gemini-api/docs/pricing

  • gemini/gemini-omni-1.1-flash (new, GA of gemini-omni-flash-preview): input $1.50/M (text/image/video/audio), output $9.00/M text, $17.50/M video
  • Token limits: the model pages do not publish them (detail page 404s), but GET /v1beta/models/gemini-omni-1.1-flash reports inputTokenLimit: 131072 and outputTokenLimit: 65536, and live Interactions API probes agree (a 100k-token input is accepted, 130k and above are rejected with 400 Invalid input received.), so max_input_tokens: 131072 and max_output_tokens: 65536 are set from the API. gemini/gemini-omni-flash-preview reports the same limits from the models API and behaves the same on the probes, so its 1,048,576 input limit (copied from the docs when it was added) is corrected to 131072 / 65536 as well
  • Endpoint: generateContent answers both omni models with 400 This model only supports Interactions API., so supported_endpoints on both entries is /v1beta/interactions (the proxy route and the playground label for the Interactions API) instead of the /v1/chat/completions they carried before. mode stays chat because the registry schema's mode enum has no interactions value
  • Google no longer publishes per-model RPM/TPM in docs (rate limits are now per-account in AI Studio), so tpm/rpm follow the repo's existing convention: matches gemini-omni-flash-preview (800000/2000)
  • gemini-3.5-transcribe / -live were added here originally but have since landed on litellm_internal_staging with matching prices, so this PR now defers to the upstream entries

xAI, https://docs.x.ai/docs/models and https://docs.x.ai/developers/migration/may-15-retirement

  • xai/grok-imagine-image, xai/grok-imagine-image-2026-03-02 (new): $0.02 per generated image
  • xai/grok-imagine-image-quality, -quality-20260403, -quality-latest, xai/grok-imagine-image-pro (new): $0.05 per generated image
  • xai/grok-imagine-image-2.0 (new): $0.06 per generated image at the default 1K resolution / medium quality tier (the API's image_price for the model), plus a low/1024-x-1024/grok-imagine-image-2.0 entry at $0.04 that the image cost calculator picks up when the request carries quality: low, following the low/1024-x-1024/gpt-image-1 convention. The 2K tiers ($0.06 low, $0.08 medium) key on xAI's resolution parameter, which the cost calculator does not see, so they are not encoded
  • Per-image pricing is stored in input_cost_per_image because xAI image generation is priced by the default per-image calculator, which reads that key (same convention as gpt-image-1). xAI's separate $0.002 image-input (edit/reference) rate has no representable key on this path, so it is not encoded
  • xai/grok-4.20, -reasoning, -reasoning-latest, -non-reasoning, -non-reasoning-latest, -multi-agent, -multi-agent-latest (new): official aliases of the existing dated grok-4.20-*-0309 entries, same pricing ($1.25/M in, $2.50/M out, $0.20/M cached)
  • -multi-agent and -multi-agent-latest match the dated entry's mode: responses and /v1/responses as the only endpoint (xAI serves the multi-agent model on the Responses API only), and all three multi-agent entries now carry supports_function_calling: false and supports_tool_choice: false: a Responses request with a function tool is rejected with 400 Client-side tools for multi-agent models require beta access
  • xai/grok-imagine-image-pro: deprecation_date: 2026-05-15 added; the retirement page lists it in the May 15, 2026 batch (redirects to grok-imagine-image-quality afterwards). The other seven retired slugs on that page already carry 2026-05-15 in the registry
  • Not added: grok-imagine-video / grok-imagine-video-1.5 (pricing is per-second per resolution tier, no flat rate representable), grok-tts / grok-stt / grok-voice-* (no pricing published)

Mistral, https://docs.mistral.ai/inference/pricing

Added cache_read_input_token_cost (10% of input price, per pricing page "Cached input" column):

  • mistral-large-2512 / mistral-large-3 / mistral-large-latest: $0.05/M
  • mistral-medium-2604 / mistral-medium-3-5 / mistral-medium-latest: $0.15/M
  • mistral-small-2603 / mistral-small-latest: $0.015/M
  • ministral-3-14b-2512: $0.02/M; ministral-3-8b-2512 / ministral-8b-2512 / ministral-8b-latest: $0.015/M; ministral-3-3b-2512: $0.01/M
  • codestral-2508 / codestral-latest: $0.03/M; codestral-embed / codestral-embed-2505: $0.015/M

Not changed: OCR cached-page pricing (no registry key for cached OCR pages), mistral-embed price (not listed on the current pricing page), voxtral-mini-realtime (no published rate found). The codestral-embed cached price is published and encoded for completeness, but embedding responses never report cached tokens, so it does not affect spend

Z.AI (absorbed from #38627), https://docs.z.ai/guides/overview/pricing

  • zai/glm-5.3-flash (new): input $0.15/M, cached input $0.03/M, output $0.50/M (list prices; the page's 50% promo ending 2026-09-09 is not encoded), 1M context / 128K max output per https://docs.z.ai/guides/llm/glm-5.3-flash
  • supports_vision: true added on top of the source PR: the model page lists Video / Image / Text / File input modality

Databricks (absorbed from #38583), https://docs.databricks.com/aws/en/machine-learning/foundation-model-apis/supported-models

  • databricks/databricks-glm-5-3-flash (new): 1,048,576 input context, text+image input, function calling, reasoning, prompt caching; 131,072 max output matching the sibling databricks-glm-5-2 entry
  • Databricks has not published pay-per-token rates for it, so cost fields are omitted with a metadata note (same as the source PR)

Moonshot (absorbed from #38576), https://platform.kimi.ai/docs/pricing/chat-k27-code

  • moonshot/kimi-k2.7-code (new): input $0.95/M (cache miss), cache hit $0.19/M, output $4.00/M, 262,144 context, all read from the raw pricing table and cross-checked via r.jina.ai
  • On top of the source PR: supports_function_calling, supports_tool_choice, supports_reasoning, supports_response_schema, supports_vision, supports_video_input, and max_output_tokens: 262144, matching the existing moonshot/kimi-k2.6 entry. The model page lists text, image, and video input, thinking mode, tool calls, and JSON mode, and a live tool call returned finish_reason: tool_calls with reasoning tokens

Absorption of other open registry PRs

Absorbed (verified against official docs, field-level): #38627, #38583, #38576, now superseded and closed

Re-verified and dropped as unverifiable (left open, not absorbed):

Code/behavior PRs #36233 and #29898 touch the registry only in support of their code change; left alone, not absorbed. #30383 does not touch the registry

Audit notes (checked, no change needed)

  • xAI chat model prices (grok-4.6/4.5/4.3/4.20/code-fast) match docs.x.ai exactly
  • Gemini robotics ER 1.6/2/2-streaming entries match the pricing page
  • gemini-embedding-2, gemini-3.1-flash-image, Mistral OCR 4.x, Voxtral, Ministral 3, Leanstral entries already present and correct

Relevant issues

Fixes #38608

Deprecation dates use the deprecation_date key that #26900 surfaces through GET /model/deprecations, matching the 586 existing entries that already carry it

Linear ticket

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/test_litellm/<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
    • Registry: tests/test_litellm/test_model_prices_schema.py, tests/test_litellm/test_model_cost_aliases.py, and tests/test_litellm/test_xai_grok_4_3_model_metadata.py pass (36 passed), ci_cd/check_files_match.py passes with the backup JSON in sync, and ci_cd/generate_model_prices_schema.py produces no diff
    • Cost fallback: uv run pytest tests/test_litellm/litellm_core_utils/llm_cost_calc/test_llm_cost_calc_utils.py -k falls_back_to_requested (7 passed); dropping the size guard makes the auto case fail with ValueError: invalid literal for int() with base 10: 'auto'
  • 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 legs boot a real proxy (--num_workers 2, Postgres spend logging, LITELLM_LOCAL_MODEL_COST_MAP=True so each tree prices from its own registry) from the named commit with the same config: the eleven models named in the User Flow plus mistral/mistral-large-latest, real provider keys for Gemini, xAI, Moonshot, and Mistral. Before is the merge base ca0b951a43 (port 30782 on this boot), After is the PR tip b8f91235a6 (port 42311). $KEY is the proxy master key. Long response ids are truncated

Before (ca0b951)

### GET /model/info (registry fields the proxy serves for each configured model)
$ curl -sS http://127.0.0.1:30782/model/info -H 'Authorization: Bearer $KEY' | jq -c '.data[] | {...}'
{"model":"gemini/gemini-omni-1.1-flash","mode":null,"endpoints":null,"in":0,"out":0,"cached":null,"per_image":null,"max_in":null,"max_out":null,"fn":null,"tool_choice":null,"vision":null,"deprecation":null}
{"model":"gemini/gemini-omni-flash-preview","mode":"chat","endpoints":["/v1/chat/completions"],"in":0.0000015,"out":0.000009,"cached":null,"per_image":null,"max_in":1048576,"max_out":65535,"fn":null,"tool_choice":null,"vision":true,"deprecation":null}
{"model":"xai/grok-imagine-image","mode":null,"endpoints":null,"in":0,"out":0,"cached":null,"per_image":null,"max_in":null,"max_out":null,"fn":null,"tool_choice":null,"vision":null,"deprecation":null}
{"model":"xai/grok-imagine-image-2.0","mode":null,"endpoints":null,"in":0,"out":0,"cached":null,"per_image":null,"max_in":null,"max_out":null,"fn":null,"tool_choice":null,"vision":null,"deprecation":null}
{"model":"xai/grok-imagine-image-pro","mode":null,"endpoints":null,"in":0,"out":0,"cached":null,"per_image":null,"max_in":null,"max_out":null,"fn":null,"tool_choice":null,"vision":null,"deprecation":null}
{"model":"xai/grok-4.20","mode":null,"endpoints":null,"in":0,"out":0,"cached":null,"per_image":null,"max_in":null,"max_out":null,"fn":null,"tool_choice":null,"vision":null,"deprecation":null}
{"model":"xai/grok-4.20-multi-agent","mode":null,"endpoints":null,"in":0,"out":0,"cached":null,"per_image":null,"max_in":null,"max_out":null,"fn":null,"tool_choice":null,"vision":null,"deprecation":null}
{"model":"moonshot/kimi-k2.7-code","mode":null,"endpoints":null,"in":0,"out":0,"cached":null,"per_image":null,"max_in":null,"max_out":null,"fn":null,"tool_choice":null,"vision":null,"deprecation":null}
{"model":"mistral/mistral-large-latest","mode":"chat","endpoints":null,"in":5E-7,"out":0.0000015,"cached":null,"per_image":null,"max_in":262144,"max_out":262144,"fn":true,"tool_choice":true,"vision":true,"deprecation":null}
{"model":"zai/glm-5.3-flash","mode":null,"endpoints":null,"in":0,"out":0,"cached":null,"per_image":null,"max_in":null,"max_out":null,"fn":null,"tool_choice":null,"vision":null,"deprecation":null}
{"model":"databricks/databricks-glm-5-3-flash","mode":null,"endpoints":null,"in":0,"out":0,"cached":null,"per_image":null,"max_in":null,"max_out":null,"fn":null,"tool_choice":null,"vision":null,"deprecation":null}

### POST /v1beta/interactions gemini/gemini-omni-1.1-flash
$ curl -sS -D - http://127.0.0.1:30782/v1beta/interactions -H 'Authorization: Bearer $KEY' -H 'Content-Type: application/json' -d '{"model":"gemini/gemini-omni-1.1-flash","input":"Say hi in five words"}'
HTTP/1.1 200 OK
x-litellm-call-id: 2d83ce20-d46e-453e-8b8a-266e7a436ea5
x-litellm-response-cost-original: 0.0
x-litellm-response-cost-discount-amount: 0.0
x-litellm-response-cost-margin-amount: 0.0
x-litellm-response-cost-margin-percent: 0.0
x-litellm-response-cost-input: 0.0
x-litellm-response-cost-output: 0.0
x-litellm-response-cost-tool-usage: 0.0
{"id":"v1_ChYzcmFSYXB5REJhQ3JzT0lQX0o2NU9BEhYzcmFSYXB5REJhQ3JzT0lQX0o2NU9B","status":"completed","model":"gemini/gemini-omni-1.1-flash","usage":{"total_tokens":445,"total_input_tokens":6,"input_tokens_by_modality":[{"modality":"text","tokens":6}],"total_cached_tokens":0,"total_output_tokens":7,"tota ...(truncated)

### POST /v1/chat/completions gemini/gemini-omni-1.1-flash (what the old registry endpoint claimed)
$ curl -sS -D - http://127.0.0.1:30782/v1/chat/completions -H 'Authorization: Bearer $KEY' -H 'Content-Type: application/json' -d '{"model":"gemini/gemini-omni-1.1-flash","messages":[{"role":"user","content":"Say hi in five words"}]}'
HTTP/1.1 400 Bad Request
x-litellm-call-id: 49a189a3-9d34-4386-b2fa-3ee2e9405774
x-litellm-response-cost: 0
{"error":"litellm.BadRequestError: GeminiException BadRequestError - {\n  \"error\": {\n    \"code\": 400,\n    \"message\": \"This model only supports Interactions API.\",\n    \"status\": \"INVALID_ARGUMENT\"\n  }\n}\n. Receive","text":null}

### POST /v1/images/generations xai/grok-imagine-image
$ curl -sS -D - http://127.0.0.1:30782/v1/images/generations -H 'Authorization: Bearer $KEY' -H 'Content-Type: application/json' -d '{"model":"xai/grok-imagine-image","prompt":"a red bicycle leaning on a white wall","n":1}'
HTTP/1.1 200 OK
x-litellm-call-id: 838d907e-f816-4cec-915b-f40718cc25b0
{"created":1787934440,"n":1,"has_url":true,"has_b64":false,"usage":{"total_tokens":0,"input_tokens":0,"input_tokens_details":{"image_tokens":0,"text_tokens":0},"output_tokens":0,"output_tokens_details":null,"cost_in_usd_ticks":200000000}}

### POST /v1/images/generations xai/grok-imagine-image-2.0 (default quality)
$ curl -sS -D - http://127.0.0.1:30782/v1/images/generations -H 'Authorization: Bearer $KEY' -H 'Content-Type: application/json' -d '{"model":"xai/grok-imagine-image-2.0","prompt":"a red bicycle leaning on a white wall","n":1}'
HTTP/1.1 200 OK
x-litellm-call-id: cd249d5e-f7a4-493b-9f48-415c5290e0b2
{"created":1787934498,"n":1,"has_url":true,"has_b64":false,"usage":{"total_tokens":0,"input_tokens":0,"input_tokens_details":{"image_tokens":0,"text_tokens":0},"output_tokens":0,"output_tokens_details":null,"cost_in_usd_ticks":600000000}}

### POST /v1/images/generations xai/grok-imagine-image-2.0 quality=low
$ curl -sS -D - http://127.0.0.1:30782/v1/images/generations -H 'Authorization: Bearer $KEY' -H 'Content-Type: application/json' -d '{"model":"xai/grok-imagine-image-2.0","prompt":"a red bicycle leaning on a white wall","n":1,"quality":"low"}'
HTTP/1.1 200 OK
x-litellm-call-id: e01b53ad-5691-445c-a075-f5a4022a52f3
{"created":1787934513,"n":1,"has_url":true,"has_b64":false,"usage":{"total_tokens":0,"input_tokens":0,"input_tokens_details":{"image_tokens":0,"text_tokens":0},"output_tokens":0,"output_tokens_details":null,"cost_in_usd_ticks":400000000}}

### POST /v1/responses xai/grok-4.20-multi-agent
$ curl -sS -D - http://127.0.0.1:30782/v1/responses -H 'Authorization: Bearer $KEY' -H 'Content-Type: application/json' -d '{"model":"xai/grok-4.20-multi-agent","input":"Say hi in five words"}'
HTTP/1.1 200 OK
x-litellm-call-id: 94be9e46-53eb-4a8b-9d8e-c98d0f7fc34b
x-litellm-response-cost: 0.01733045
x-litellm-response-cost-original: 0.01733045
x-litellm-response-cost-discount-amount: 0.0
x-litellm-response-cost-margin-amount: 0.0
x-litellm-response-cost-margin-percent: 0.0
x-litellm-response-cost-input: 0.005266250000000001
x-litellm-response-cost-output: 0.009325
x-litellm-response-cost-cache-read: 0.0027392
x-litellm-response-cost-reasoning: 0.009275
x-litellm-response-cost-tool-usage: 0.0
{"id":"resp_cUEpXhe-6IhHOiBjc34Sira9k9dfQ5TfM5LZh4vM5Aop0tQas-N_DjikJrzcAwLnwZrV3F2Qdf72xSxRfCsM1nkzpoUHJ7YOALz0hoovX_tTLbqUK2t5KlZO1m1qoKgsCM4CkJl5PeSR-DxJmbGAFbc6twU5rD0X4LEFMkgDQvUCTRJZDyKykb1OXIupBxfFo7VSG-nPYPyDCK2aRjWaX19T2giKLaR-kRuKGSSTAAVATajBESfrgqPBbEGYW-urGFez9zEA4H8BrTmKFc9oeLD5WcCOjKIH ...(truncated)

### POST /v1/responses xai/grok-4.20-multi-agent with a function tool
$ curl -sS -D - http://127.0.0.1:30782/v1/responses -H 'Authorization: Bearer $KEY' -H 'Content-Type: application/json' -d '{"model":"xai/grok-4.20-multi-agent","input":"Call get_weather for Paris.","tools":[{"type":"function","name":"get_weather","description":"Get weather","parameters":{"type":"ob ...(truncated)
HTTP/1.1 400 Bad Request
x-litellm-call-id: 71bcb203-dc52-4b0c-be67-390c237f579c
x-litellm-response-cost: 0
{"error":"litellm.BadRequestError: XaiException - {\"code\":\"invalid-argument\",\"error\":\"Client-side tools for multi-agent models require beta access\"}. Received Model Group=xai/grok-4.20-multi-agent\nAvailable Mod","status":null,"output_types":[]}

### POST /v1/chat/completions moonshot/kimi-k2.7-code
$ curl -sS -D - http://127.0.0.1:30782/v1/chat/completions -H 'Authorization: Bearer $KEY' -H 'Content-Type: application/json' -d '{"model":"moonshot/kimi-k2.7-code","messages":[{"role":"user","content":"Say hi in five words"}],"max_tokens":100}'
HTTP/1.1 200 OK
x-litellm-call-id: 75ddafe8-cb5b-4363-8698-f1a4b5478027
x-litellm-response-cost-original: 0.0
x-litellm-response-cost-discount-amount: 0.0
x-litellm-response-cost-margin-amount: 0.0
x-litellm-response-cost-margin-percent: 0.0
x-litellm-response-cost-input: 0.0
x-litellm-response-cost-output: 0
x-litellm-response-cost-tool-usage: 0.0
{"model":"moonshot/kimi-k2.7-code","usage":{"prompt_tokens":12,"completion_tokens":100},"finish":"length","text":""}

### POST /v1/chat/completions moonshot/kimi-k2.7-code with a function tool
$ curl -sS -D - http://127.0.0.1:30782/v1/chat/completions -H 'Authorization: Bearer $KEY' -H 'Content-Type: application/json' -d '{"model":"moonshot/kimi-k2.7-code","messages":[{"role":"user","content":"Call get_weather for Paris."}],"tools":[{"type":"function","function":{"name":"get_weather","des ...(truncated)
HTTP/1.1 200 OK
x-litellm-call-id: c1d4b90a-fe4b-496e-955f-dd59c16cbffe
x-litellm-response-cost-original: 0.0
x-litellm-response-cost-discount-amount: 0.0
x-litellm-response-cost-margin-amount: 0.0
x-litellm-response-cost-margin-percent: 0.0
x-litellm-response-cost-input: 0.0
x-litellm-response-cost-output: 0
x-litellm-response-cost-tool-usage: 0.0
{"finish":"tool_calls","tool_calls":["get_weather"],"error":null}

### POST /v1/chat/completions mistral/mistral-large-latest, call 2 of 2 with the same ~3.5k-token system prefix
$ curl -sS -D - http://127.0.0.1:30782/v1/chat/completions -H 'Authorization: Bearer $KEY' -H 'Content-Type: application/json' -d @mistral_body.json
HTTP/1.1 200 OK
x-litellm-call-id: 12a5a10f-023a-4671-838b-79f9086b3925
x-litellm-response-cost: 0.001769
x-litellm-response-cost-original: 0.001769
x-litellm-response-cost-discount-amount: 0.0
x-litellm-response-cost-margin-amount: 0.0
x-litellm-response-cost-margin-percent: 0.0
x-litellm-response-cost-input: 0.001766
x-litellm-response-cost-output: 3e-06
x-litellm-response-cost-tool-usage: 0.0
{"model":"mistral/mistral-large-latest","usage":{"completion_tokens":2,"prompt_tokens":3532,"total_tokens":3534,"prompt_tokens_details":{"cached_tokens":0},"service_tier":"standard"},"text":"OK"}

### GET /spend/logs?request_id=<x-litellm-call-id> for the gemini interactions, image-2.0 low, multi-agent, kimi, and second mistral calls
$ curl -sS "http://127.0.0.1:30782/spend/logs?request_id=2d83ce20-d46e-453e-8b8a-266e7a436ea5" -H 'Authorization: Bearer $KEY'
$ curl -sS "http://127.0.0.1:30782/spend/logs?request_id=e01b53ad-5691-445c-a075-f5a4022a52f3" -H 'Authorization: Bearer $KEY'
{"request_id":"e01b53ad-5691-445c-a075-f5a4022a52f3","model":"xai/grok-imagine-image-2.0","spend":0.0,"prompt_tokens":0,"completion_tokens":0,"call_type":"aimage_generation"}
$ curl -sS "http://127.0.0.1:30782/spend/logs?request_id=94be9e46-53eb-4a8b-9d8e-c98d0f7fc34b" -H 'Authorization: Bearer $KEY'
$ curl -sS "http://127.0.0.1:30782/spend/logs?request_id=75ddafe8-cb5b-4363-8698-f1a4b5478027" -H 'Authorization: Bearer $KEY'
$ curl -sS "http://127.0.0.1:30782/spend/logs?request_id=12a5a10f-023a-4671-838b-79f9086b3925" -H 'Authorization: Bearer $KEY'

After (b8f9123)

### GET /model/info (registry fields the proxy serves for each configured model)
$ curl -sS http://127.0.0.1:42311/model/info -H 'Authorization: Bearer $KEY' | jq -c '.data[] | {...}'
{"model":"gemini/gemini-omni-1.1-flash","mode":"chat","endpoints":["/v1beta/interactions"],"in":0.0000015,"out":0.000009,"cached":null,"per_image":null,"max_in":131072,"max_out":65536,"fn":null,"tool_choice":null,"vision":true,"deprecation":null}
{"model":"gemini/gemini-omni-flash-preview","mode":"chat","endpoints":["/v1beta/interactions"],"in":0.0000015,"out":0.000009,"cached":null,"per_image":null,"max_in":131072,"max_out":65536,"fn":null,"tool_choice":null,"vision":true,"deprecation":null}
{"model":"xai/grok-imagine-image","mode":"image_generation","endpoints":["/v1/images/generations"],"in":0,"out":0,"cached":null,"per_image":0.02,"max_in":null,"max_out":null,"fn":null,"tool_choice":null,"vision":null,"deprecation":null}
{"model":"xai/grok-imagine-image-2.0","mode":"image_generation","endpoints":["/v1/images/generations"],"in":0,"out":0,"cached":null,"per_image":0.06,"max_in":null,"max_out":null,"fn":null,"tool_choice":null,"vision":null,"deprecation":null}
{"model":"xai/grok-imagine-image-pro","mode":"image_generation","endpoints":["/v1/images/generations"],"in":0,"out":0,"cached":null,"per_image":0.05,"max_in":null,"max_out":null,"fn":null,"tool_choice":null,"vision":null,"deprecation":null}
{"model":"xai/grok-4.20","mode":"chat","endpoints":null,"in":0.00000125,"out":0.0000025,"cached":2E-7,"per_image":null,"max_in":1000000,"max_out":1000000,"fn":true,"tool_choice":true,"vision":true,"deprecation":null}
{"model":"xai/grok-4.20-multi-agent","mode":"responses","endpoints":["/v1/responses"],"in":0.00000125,"out":0.0000025,"cached":2E-7,"per_image":null,"max_in":1000000,"max_out":1000000,"fn":false,"tool_choice":false,"vision":true,"deprecation":null}
{"model":"moonshot/kimi-k2.7-code","mode":"chat","endpoints":null,"in":9.5E-7,"out":0.000004,"cached":1.9E-7,"per_image":null,"max_in":262144,"max_out":262144,"fn":true,"tool_choice":true,"vision":true,"deprecation":null}
{"model":"mistral/mistral-large-latest","mode":"chat","endpoints":null,"in":5E-7,"out":0.0000015,"cached":5E-8,"per_image":null,"max_in":262144,"max_out":262144,"fn":true,"tool_choice":true,"vision":true,"deprecation":null}
{"model":"zai/glm-5.3-flash","mode":"chat","endpoints":null,"in":1.5E-7,"out":5E-7,"cached":3E-8,"per_image":null,"max_in":1048576,"max_out":128000,"fn":true,"tool_choice":true,"vision":true,"deprecation":null}
{"model":"databricks/databricks-glm-5-3-flash","mode":"chat","endpoints":null,"in":0,"out":0,"cached":null,"per_image":null,"max_in":1048576,"max_out":131072,"fn":true,"tool_choice":true,"vision":true,"deprecation":null}

### POST /v1beta/interactions gemini/gemini-omni-1.1-flash
$ curl -sS -D - http://127.0.0.1:42311/v1beta/interactions -H 'Authorization: Bearer $KEY' -H 'Content-Type: application/json' -d '{"model":"gemini/gemini-omni-1.1-flash","input":"Say hi in five words"}'
HTTP/1.1 200 OK
x-litellm-call-id: a4ca3b06-010a-4a64-8a71-dfe1c00b43d4
x-litellm-response-cost: 0.002448
x-litellm-response-cost-original: 0.002448
x-litellm-response-cost-discount-amount: 0.0
x-litellm-response-cost-margin-amount: 0.0
x-litellm-response-cost-margin-percent: 0.0
x-litellm-response-cost-input: 9e-06
x-litellm-response-cost-output: 0.002439
x-litellm-response-cost-reasoning: 0.002376
x-litellm-response-cost-tool-usage: 0.0
{"id":"v1_Chc5cnlSYXJtaEhibXItOFlQaXVXWGtRRRIXOXJ5UmFybWhIYm1yLThZUGl1V1hrUUU","status":"completed","model":"gemini/gemini-omni-1.1-flash","usage":{"total_tokens":277,"total_input_tokens":6,"input_tokens_by_modality":[{"modality":"text","tokens":6}],"total_cached_tokens":0,"total_output_tokens":7,"t ...(truncated)

### POST /v1/chat/completions gemini/gemini-omni-1.1-flash (what the old registry endpoint claimed)
$ curl -sS -D - http://127.0.0.1:42311/v1/chat/completions -H 'Authorization: Bearer $KEY' -H 'Content-Type: application/json' -d '{"model":"gemini/gemini-omni-1.1-flash","messages":[{"role":"user","content":"Say hi in five words"}]}'
HTTP/1.1 400 Bad Request
x-litellm-call-id: 599a4a92-47cd-41a6-81ec-d7c1ee175845
x-litellm-response-cost: 0
{"error":"litellm.BadRequestError: GeminiException BadRequestError - {\n  \"error\": {\n    \"code\": 400,\n    \"message\": \"This model only supports Interactions API.\",\n    \"status\": \"INVALID_ARGUMENT\"\n  }\n}\n. Receive","text":null}

### POST /v1/images/generations xai/grok-imagine-image
$ curl -sS -D - http://127.0.0.1:42311/v1/images/generations -H 'Authorization: Bearer $KEY' -H 'Content-Type: application/json' -d '{"model":"xai/grok-imagine-image","prompt":"a red bicycle leaning on a white wall","n":1}'
HTTP/1.1 200 OK
x-litellm-call-id: 4af9060b-1b09-4e04-8f91-1e8ae082c344
x-litellm-response-cost: 0.02
{"created":1787936001,"n":1,"has_url":true,"has_b64":false,"usage":{"total_tokens":0,"input_tokens":0,"input_tokens_details":{"image_tokens":0,"text_tokens":0},"output_tokens":0,"output_tokens_details":null,"cost_in_usd_ticks":200000000}}

### POST /v1/images/generations xai/grok-imagine-image-2.0 (default quality)
$ curl -sS -D - http://127.0.0.1:42311/v1/images/generations -H 'Authorization: Bearer $KEY' -H 'Content-Type: application/json' -d '{"model":"xai/grok-imagine-image-2.0","prompt":"a red bicycle leaning on a white wall","n":1}'
HTTP/1.1 200 OK
x-litellm-call-id: 057bb0fb-43cd-4d44-acc0-e03598edbcb8
x-litellm-response-cost: 0.06
{"created":1787936069,"n":1,"has_url":true,"has_b64":false,"usage":{"total_tokens":0,"input_tokens":0,"input_tokens_details":{"image_tokens":0,"text_tokens":0},"output_tokens":0,"output_tokens_details":null,"cost_in_usd_ticks":600000000}}

### POST /v1/images/generations xai/grok-imagine-image-2.0 quality=low
$ curl -sS -D - http://127.0.0.1:42311/v1/images/generations -H 'Authorization: Bearer $KEY' -H 'Content-Type: application/json' -d '{"model":"xai/grok-imagine-image-2.0","prompt":"a red bicycle leaning on a white wall","n":1,"quality":"low"}'
HTTP/1.1 200 OK
x-litellm-call-id: 3debfc3b-7fcf-42c3-aadc-3ac8d54e932e
x-litellm-response-cost: 0.04
{"created":1787936086,"n":1,"has_url":true,"has_b64":false,"usage":{"total_tokens":0,"input_tokens":0,"input_tokens_details":{"image_tokens":0,"text_tokens":0},"output_tokens":0,"output_tokens_details":null,"cost_in_usd_ticks":400000000}}

### POST /v1/responses xai/grok-4.20-multi-agent
$ curl -sS -D - http://127.0.0.1:42311/v1/responses -H 'Authorization: Bearer $KEY' -H 'Content-Type: application/json' -d '{"model":"xai/grok-4.20-multi-agent","input":"Say hi in five words"}'
HTTP/1.1 200 OK
x-litellm-call-id: dfef8094-e951-444b-bd25-25604d3d198d
x-litellm-response-cost: 0.0154555
x-litellm-response-cost-original: 0.0154555
x-litellm-response-cost-discount-amount: 0.0
x-litellm-response-cost-margin-amount: 0.0
x-litellm-response-cost-margin-percent: 0.0
x-litellm-response-cost-input: 0.0044425
x-litellm-response-cost-output: 0.008965
x-litellm-response-cost-cache-read: 0.002048
x-litellm-response-cost-reasoning: 0.008915000000000001
x-litellm-response-cost-tool-usage: 0.0
{"id":"resp_A3zLWpHMgsdmRjfw2W03f_TuXTjUGazSZKlFQplhVBzD6dcNIgHrundQmd4lgKKvd2lXUkTBEmF1UnfKtnIzk2Ryhn9wqSFDrNCe67x_Fo2gXCURC_R9guHh4mvRHy9vIn4B9M49yVD_WTk6yDvP9qpllzDbVj3OLyx6DZPB8F9h5XO8PN9wk1XKFS5D7dvQVF-L5xBxayoYhY4waq-72IILb1y1KJrfCMlgDe_3a8l3KTSyk4jcXW75Iv5qOwooVlcESHIgeWg6iCz_DAumwD1-tqZjlC26 ...(truncated)

### POST /v1/responses xai/grok-4.20-multi-agent with a function tool
$ curl -sS -D - http://127.0.0.1:42311/v1/responses -H 'Authorization: Bearer $KEY' -H 'Content-Type: application/json' -d '{"model":"xai/grok-4.20-multi-agent","input":"Call get_weather for Paris.","tools":[{"type":"function","name":"get_weather","description":"Get weather","parameters":{"type":"ob ...(truncated)
HTTP/1.1 400 Bad Request
x-litellm-call-id: 68ad5c7e-8f42-4126-a3f7-d5f9b102312d
x-litellm-response-cost: 0
{"error":"litellm.BadRequestError: XaiException - {\"code\":\"invalid-argument\",\"error\":\"Client-side tools for multi-agent models require beta access\"}. Received Model Group=xai/grok-4.20-multi-agent\nAvailable Mod","status":null,"output_types":[]}

### POST /v1/chat/completions moonshot/kimi-k2.7-code
$ curl -sS -D - http://127.0.0.1:42311/v1/chat/completions -H 'Authorization: Bearer $KEY' -H 'Content-Type: application/json' -d '{"model":"moonshot/kimi-k2.7-code","messages":[{"role":"user","content":"Say hi in five words"}],"max_tokens":100}'
HTTP/1.1 200 OK
x-litellm-call-id: 3d8ec5a1-042d-4961-9fe6-3471c09261d4
x-litellm-response-cost: 0.00025828
x-litellm-response-cost-original: 0.00025828
x-litellm-response-cost-discount-amount: 0.0
x-litellm-response-cost-margin-amount: 0.0
x-litellm-response-cost-margin-percent: 0.0
x-litellm-response-cost-input: 0.0
x-litellm-response-cost-output: 0.000256
x-litellm-response-cost-cache-read: 2.28e-06
x-litellm-response-cost-reasoning: 0.00021999999999999998
x-litellm-response-cost-tool-usage: 0.0
{"model":"moonshot/kimi-k2.7-code","usage":{"prompt_tokens":12,"completion_tokens":64},"finish":"stop","text":"Hello! How are you today?"}

### POST /v1/chat/completions moonshot/kimi-k2.7-code with a function tool
$ curl -sS -D - http://127.0.0.1:42311/v1/chat/completions -H 'Authorization: Bearer $KEY' -H 'Content-Type: application/json' -d '{"model":"moonshot/kimi-k2.7-code","messages":[{"role":"user","content":"Call get_weather for Paris."}],"tools":[{"type":"function","function":{"name":"get_weather","des ...(truncated)
HTTP/1.1 200 OK
x-litellm-call-id: 5cc2398f-434f-447b-880d-98166bb623e6
x-litellm-response-cost: 0.00018968999999999998
x-litellm-response-cost-original: 0.00018968999999999998
x-litellm-response-cost-discount-amount: 0.0
x-litellm-response-cost-margin-amount: 0.0
x-litellm-response-cost-margin-percent: 0.0
x-litellm-response-cost-input: 0.0
x-litellm-response-cost-output: 0.00017999999999999998
x-litellm-response-cost-cache-read: 9.69e-06
x-litellm-response-cost-reasoning: 0.000108
x-litellm-response-cost-tool-usage: 0.0
{"finish":"tool_calls","tool_calls":["get_weather"],"error":null}

### POST /v1/chat/completions mistral/mistral-large-latest, call 2 of 2 with the same ~3.5k-token system prefix
$ curl -sS -D - http://127.0.0.1:42311/v1/chat/completions -H 'Authorization: Bearer $KEY' -H 'Content-Type: application/json' -d @mistral_body.json
HTTP/1.1 200 OK
x-litellm-call-id: 9aeaed1a-5e99-4611-8aaf-47cf5d4d1cdc
x-litellm-response-cost: 0.001769
x-litellm-response-cost-original: 0.001769
x-litellm-response-cost-discount-amount: 0.0
x-litellm-response-cost-margin-amount: 0.0
x-litellm-response-cost-margin-percent: 0.0
x-litellm-response-cost-input: 0.001766
x-litellm-response-cost-output: 3e-06
x-litellm-response-cost-tool-usage: 0.0
{"model":"mistral/mistral-large-latest","usage":{"completion_tokens":2,"prompt_tokens":3532,"total_tokens":3534,"prompt_tokens_details":{"cached_tokens":0},"service_tier":"standard"},"text":"OK"}

### GET /spend/logs?request_id=<response id, or x-litellm-call-id for images> for the gemini interactions, image-2.0 low, multi-agent, kimi, and second mistral calls
$ curl -sS "http://127.0.0.1:42311/spend/logs?request_id=v1_Chc5cnlSYXJtaEhibXItOFlQaXVXWGtRRRIXOXJ5UmFybWhIYm1yLThZUGl1V1hrUUU" -H 'Authorization: Bearer $KEY'
{"request_id":"v1_Chc5cnlSYXJtaEhibXItOFlQaXVXWGtRRRIXOXJ5UmFybWhIYm1yLThZUGl1V1hrUUU","model":"gemini/gemini-omni-1.1-flash","spend":0.002448,"prompt_tokens":6,"completion_tokens":271,"call_type":"acreate_interaction"}
$ curl -sS "http://127.0.0.1:42311/spend/logs?request_id=3debfc3b-7fcf-42c3-aadc-3ac8d54e932e" -H 'Authorization: Bearer $KEY'
{"request_id":"3debfc3b-7fcf-42c3-aadc-3ac8d54e932e","model":"xai/grok-imagine-image-2.0","spend":0.04,"prompt_tokens":0,"completion_tokens":0,"call_type":"aimage_generation"}
$ curl -sS "http://127.0.0.1:42311/spend/logs?request_id=resp_A3zLWpHMgsdmRjfw2W03f_TuXTjUGazSZKlFQplhVBzD6dcNIgHrundQmd4lgKKvd2lXUkTBEmF1UnfKtnIzk2Ryhn9wqSFDrNCe67x_Fo2gXCURC_R9guHh4mvRHy9vIn4B9M49yVD_WTk6yDvP9qpllzDbVj3OLyx6DZPB8F9h5XO8PN9wk1XKFS5D7dvQVF-L5xBxayoYhY4waq-72IILb1y1KJrfCMlgDe_3a8l3KT ...(truncated)
{"request_id":"resp_A3zLWpHMgsdmRjfw2W03f_TuXTjUGazSZKlFQplhVBzD6dcNIgHrundQmd4lgKKvd2lXUkTBEmF1UnfKtnIzk2Ryhn9wqSFDrNCe67x_Fo2gXCURC_R9guHh4mvRHy9vIn4B9M49yVD_WTk6yDvP9qpllzDbVj3OLyx6DZPB8F9h5XO8PN9wk1XKFS5D7dvQVF-L5xBxayoYhY4waq-72IILb1y1KJrfCMlgDe_3a8l3KTSyk4jcXW75Iv5qOwooVlcESHIgeWg6iCz_DAumwD1- ...(truncated)
$ curl -sS "http://127.0.0.1:42311/spend/logs?request_id=chatcmpl-6a91bd6ac87237c10e3dd960" -H 'Authorization: Bearer $KEY'
{"request_id":"chatcmpl-6a91bd6ac87237c10e3dd960","model":"moonshot/kimi-k2.7-code","spend":0.00025828,"prompt_tokens":12,"completion_tokens":64,"call_type":"acompletion"}
$ curl -sS "http://127.0.0.1:42311/spend/logs?request_id=ae9968bd5fa0464da67fdf26e4e27f49" -H 'Authorization: Bearer $KEY'
{"request_id":"ae9968bd5fa0464da67fdf26e4e27f49","model":"mistral/mistral-large-latest","spend":0.001769,"prompt_tokens":3532,"completion_tokens":2,"call_type":"acompletion"}

Live PR risk A/B, same two proxies (Before ca0b951 on 25661, After b8f9123 on 42311)

Verdict: PASS

Breaking: none observed. Backward incompatible: the image cost router now reads quality and a WxH size from the request when the provider's image response omits them, so tiered image requests to providers whose responses omit those fields (xAI, dall-e-3) are billed at their registry tier instead of the standard 1024x1024 price; intended, listed under Caveats. Regression risk: dall-e-3 quality: hd and 1792x1024 requests could not be exercised live (OpenAI retired DALL-E 2 and 3 on 2026-05-12 and answers The model 'dall-e-3' does not exist on both legs; Azure's catalog no longer lists it), so that path rests on the parametrized unit tests. Dependency graph, verified live on both legs: /model/info and /model_group/info (registry fields and router capability flags), /utils/supported_openai_params (the multi-agent alias gains reasoning_effort from supports_reasoning: true, moonshot/kimi-k2.7-code unchanged), /v1/models (unchanged), /health (the multi-agent probe moves to the Responses API and passes; both Gemini Omni entries still fail with This model only supports Interactions API. on both legs), and the cost headers plus spend rows on the interactions, chat, responses, and image routes above. Untested: GET /model/deprecations (read-only listing of deprecation_date). Not verified: zai/glm-5.3-flash and databricks/databricks-glm-5-3-flash requests (no credentials on this box; both entries are checked through /model/info only), Mistral cached-token billing (Mistral reported cached_tokens: 0 on both calls of both legs), dall-e-3

### GET /model_group/info (router capability flags derived from the registry)
$ curl -sS http://127.0.0.1:25661/model_group/info -H 'Authorization: Bearer $KEY' | jq -c '.data[] | {model_group, mode, supports_function_calling, supports_vision, max_input_tokens, input_cost_per_token}'
{"model_group":"gemini/gemini-omni-1.1-flash","mode":null,"supports_function_calling":false,"supports_vision":false,"max_input_tokens":null,"input_cost_per_token":0.0}
{"model_group":"gemini/gemini-omni-flash-preview","mode":"chat","supports_function_calling":false,"supports_vision":true,"max_input_tokens":1048576.0,"input_cost_per_token":0.0000015}
{"model_group":"xai/grok-imagine-image","mode":null,"supports_function_calling":false,"supports_vision":false,"max_input_tokens":null,"input_cost_per_token":0.0}
{"model_group":"xai/grok-imagine-image-2.0","mode":null,"supports_function_calling":false,"supports_vision":false,"max_input_tokens":null,"input_cost_per_token":0.0}
{"model_group":"xai/grok-imagine-image-pro","mode":null,"supports_function_calling":false,"supports_vision":false,"max_input_tokens":null,"input_cost_per_token":0.0}
{"model_group":"xai/grok-4.20","mode":null,"supports_function_calling":false,"supports_vision":false,"max_input_tokens":null,"input_cost_per_token":0.0}
{"model_group":"xai/grok-4.20-multi-agent","mode":null,"supports_function_calling":false,"supports_vision":false,"max_input_tokens":null,"input_cost_per_token":0.0}
{"model_group":"moonshot/kimi-k2.7-code","mode":null,"supports_function_calling":false,"supports_vision":false,"max_input_tokens":null,"input_cost_per_token":0.0}
{"model_group":"mistral/mistral-large-latest","mode":"chat","supports_function_calling":true,"supports_vision":true,"max_input_tokens":262144.0,"input_cost_per_token":5E-7}
{"model_group":"zai/glm-5.3-flash","mode":null,"supports_function_calling":false,"supports_vision":false,"max_input_tokens":null,"input_cost_per_token":0.0}
{"model_group":"databricks/databricks-glm-5-3-flash","mode":null,"supports_function_calling":false,"supports_vision":false,"max_input_tokens":null,"input_cost_per_token":0.0}

### GET /utils/supported_openai_params?model=xai/grok-4.20-multi-agent
$ curl -sS "http://127.0.0.1:25661/utils/supported_openai_params?model=xai/grok-4.20-multi-agent" -H 'Authorization: Bearer $KEY' | jq -c .
{"supported_openai_params":["logit_bias","logprobs","max_tokens","n","parallel_tool_calls","presence_penalty","response_format","seed","stream","stream_options","temperature","tool_choice","tools","top_logprobs","top_p","user","web_search_options"]}

### GET /health?model=gemini/gemini-omni-1.1-flash (health check picks the probe from the registry mode)
$ curl -sS --max-time 120 "http://127.0.0.1:25661/health?model=gemini/gemini-omni-1.1-flash" -H 'Authorization: Bearer $KEY' | jq -c '{healthy_count, unhealthy_count, error: (.unhealthy_endpoints[0].error // null | tostring | .[0:200])}'
{"healthy_count":0,"unhealthy_count":1,"error":"litellm.BadRequestError: GeminiException BadRequestError - {\n  \"error\": {\n    \"code\": 400,\n    \"message\": \"This model only supports Interactions API.\",\n    \"status\": \"INVALID_ARGUMENT\"\n  }\n}\n\nstack tr"}

### GET /health?model=xai/grok-4.20-multi-agent (health check picks the probe from the registry mode)
$ curl -sS --max-time 120 "http://127.0.0.1:25661/health?model=xai/grok-4.20-multi-agent" -H 'Authorization: Bearer $KEY' | jq -c '{healthy_count, unhealthy_count, error: (.unhealthy_endpoints[0].error // null | tostring | .[0:200])}'
{"healthy_count":0,"unhealthy_count":1,"error":"litellm.BadRequestError: XaiException - \"Multi Agent requests are not allowed on chat completions\"\nstack trace: Traceback (most recent call last):\n  File \"/Users/mateo/Development/litellm-wt-38560-bas"}
### GET /model_group/info (router capability flags derived from the registry)
$ curl -sS http://127.0.0.1:42311/model_group/info -H 'Authorization: Bearer $KEY' | jq -c '.data[] | {model_group, mode, supports_function_calling, supports_vision, max_input_tokens, input_cost_per_token}'
{"model_group":"gemini/gemini-omni-1.1-flash","mode":"chat","supports_function_calling":false,"supports_vision":true,"max_input_tokens":131072.0,"input_cost_per_token":0.0000015}
{"model_group":"gemini/gemini-omni-flash-preview","mode":"chat","supports_function_calling":false,"supports_vision":true,"max_input_tokens":131072.0,"input_cost_per_token":0.0000015}
{"model_group":"xai/grok-imagine-image","mode":"image_generation","supports_function_calling":false,"supports_vision":false,"max_input_tokens":null,"input_cost_per_token":0.0}
{"model_group":"xai/grok-imagine-image-2.0","mode":"image_generation","supports_function_calling":false,"supports_vision":false,"max_input_tokens":null,"input_cost_per_token":0.0}
{"model_group":"xai/grok-imagine-image-pro","mode":"image_generation","supports_function_calling":false,"supports_vision":false,"max_input_tokens":null,"input_cost_per_token":0.0}
{"model_group":"xai/grok-4.20","mode":"chat","supports_function_calling":true,"supports_vision":true,"max_input_tokens":1000000.0,"input_cost_per_token":0.00000125}
{"model_group":"xai/grok-4.20-multi-agent","mode":"responses","supports_function_calling":false,"supports_vision":true,"max_input_tokens":1000000.0,"input_cost_per_token":0.00000125}
{"model_group":"moonshot/kimi-k2.7-code","mode":"chat","supports_function_calling":true,"supports_vision":true,"max_input_tokens":262144.0,"input_cost_per_token":9.5E-7}
{"model_group":"mistral/mistral-large-latest","mode":"chat","supports_function_calling":true,"supports_vision":true,"max_input_tokens":262144.0,"input_cost_per_token":5E-7}
{"model_group":"zai/glm-5.3-flash","mode":"chat","supports_function_calling":true,"supports_vision":true,"max_input_tokens":1048576.0,"input_cost_per_token":1.5E-7}
{"model_group":"databricks/databricks-glm-5-3-flash","mode":"chat","supports_function_calling":true,"supports_vision":true,"max_input_tokens":1048576.0,"input_cost_per_token":0.0}

### GET /utils/supported_openai_params?model=xai/grok-4.20-multi-agent
$ curl -sS "http://127.0.0.1:42311/utils/supported_openai_params?model=xai/grok-4.20-multi-agent" -H 'Authorization: Bearer $KEY' | jq -c .
{"supported_openai_params":["logit_bias","logprobs","max_tokens","n","parallel_tool_calls","presence_penalty","response_format","seed","stream","stream_options","temperature","tool_choice","tools","top_logprobs","top_p","user","web_search_options","reasoning_effort"]}

### GET /health?model=gemini/gemini-omni-1.1-flash (health check picks the probe from the registry mode)
$ curl -sS --max-time 120 "http://127.0.0.1:42311/health?model=gemini/gemini-omni-1.1-flash" -H 'Authorization: Bearer $KEY' | jq -c '{healthy_count, unhealthy_count, error: (.unhealthy_endpoints[0].error // null | tostring | .[0:200])}'
{"healthy_count":0,"unhealthy_count":1,"error":"litellm.BadRequestError: GeminiException BadRequestError - {\n  \"error\": {\n    \"code\": 400,\n    \"message\": \"This model only supports Interactions API.\",\n    \"status\": \"INVALID_ARGUMENT\"\n  }\n}\n\nstack tr"}

### GET /health?model=xai/grok-4.20-multi-agent (health check picks the probe from the registry mode)
$ curl -sS --max-time 120 "http://127.0.0.1:42311/health?model=xai/grok-4.20-multi-agent" -H 'Authorization: Bearer $KEY' | jq -c '{healthy_count, unhealthy_count, error: (.unhealthy_endpoints[0].error // null | tostring | .[0:200])}'
{"healthy_count":1,"unhealthy_count":0,"error":"null"}

/health for the xAI image model on the same two proxies (issue #26184's symptom):

### GET /health?model=xai/grok-imagine-image (before, port 25661)
$ curl -sS 'http://127.0.0.1:25661/health?model=xai/grok-imagine-image' -H 'Authorization: Bearer $KEY' | jq -c '{healthy_count, unhealthy_count, unhealthy: [.unhealthy_endpoints[]? | {model, error: (.error // "" | tostring | .[:200])}]}'
{"healthy_count":0,"unhealthy_count":1,"unhealthy":[{"model":"xai/grok-imagine-image","error":"litellm.BadRequestError: XaiException - {\"code\":\"invalid-argument\",\"error\":\"Model not found: grok-imagine-image\"}\nstack trace: Traceback (most recent call last):\n  File \"/Users/mateo/Development/litel"}]}

### GET /health?model=xai/grok-imagine-image (after, port 42311)
$ curl -sS 'http://127.0.0.1:42311/health?model=xai/grok-imagine-image' -H 'Authorization: Bearer $KEY' | jq -c '{healthy_count, unhealthy_count, unhealthy: [.unhealthy_endpoints[]? | {model, error: (.error // "" | tostring | .[:200])}]}'
{"healthy_count":1,"unhealthy_count":0,"unhealthy":[]}

Verdict: PASS

  • Multi-agent and grok-4.20 already priced before via dated slug
  • Mistral returned cached_tokens 0 both calls; cached rate unobserved
  • Gemini Omni /health still 400s with mode chat, both legs
  • Multi-agent function tool 400s at xAI on both legs
  • Before leg looked spend up by call id; only image row matched
  • dall-e-3 not verified: OpenAI says the model does not exist
  • Z.AI and Databricks routes not called: no credentials here

Type

🆕 New Feature
🐛 Bug Fix

Caveats (if any)

Low

  • databricks/databricks-glm-5-3-flash logs $0 spend until Databricks publishes a rate: the Databricks pricing page lists GLM 5.2 only, so there is nothing to encode, the gap exists with or without this PR, and a deployment can set input_cost_per_token / output_cost_per_token in litellm_params in the meantime
  • Both Gemini Omni entries keep mode: chat even though only the Interactions API serves them, so a /health check on them fails (observed on both QA legs); a dedicated mode needs a schema change and health-check support, out of scope for a registry PR
  • xAI's grok-imagine-image-2.0 2K tiers ($0.06 low, $0.08 medium) and the $0.01 per input image rate are not encoded, since neither the resolution parameter nor image inputs reach the image cost calculator; the older xAI image models' $0.002 image-input rate is left out for the same reason
  • Z.AI's 50% promo through 2026-09-09 is not encoded; list prices are used
  • Mistral cached OCR pages stay at full price, no registry key for them
  • The image cost fallback also reaches dall-e-3 and any other provider whose image response omits quality / size: a quality: hd or 1792x1024 request is now looked up under its hd/1024-x-1024/dall-e-3 or standard/1792-x-1024/dall-e-3 registry key ($0.08, OpenAI's list price) instead of the standard 1024x1024 price ($0.04) it was under-billed at; requests that set neither are unchanged. Not exercised live: OpenAI shut DALL-E 2 and 3 down on 2026-05-12 (the API now answers The model 'dall-e-3' does not exist) and dall-e-3 is no longer in Azure's model catalog, so only a lingering Azure deployment can still reach this path
  • xai/grok-imagine-image-pro gets deprecation_date: 2026-05-15, which is already in the past; the proxy only surfaces the field through GET /model/deprecations and never blocks routing on it
  • /utils/supported_openai_params?model=xai/grok-4.20-multi-agent now lists reasoning_effort, derived from the supports_reasoning: true the alias shares with the dated entry

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

Link to Devin session: https://app.devin.ai/sessions/0c7c623504ce4aacab9c05f3d974140a
Open in Devin Desktop: https://app.devin.ai/desktop/session/0c7c623504ce4aacab9c05f3d974140a?variant=devin

…imagine image models and grok-4.20 aliases, mistral cache-read pricing

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@CLAassistant

CLAassistant commented Aug 27, 2026

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ mateo-berri
❌ devin-ai-integration[bot]
You have signed the CLA already but the status is still pending? Let us recheck it.

@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

PR #38560 (BerriAI/litellm, author devin-ai-integration[bot]) has no labels — the enterprise label is absent, so it's out of scope. No GitHub or Linear changes made.

@greptile-apps

greptile-apps Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR expands the model registry with Gemini, xAI, Mistral, Z.AI, Databricks, and Moonshot metadata and pricing, while completing the prior fix for generated-image accounting.

  • Registers new model aliases, capabilities, context limits, endpoints, prices, and deprecation metadata.
  • Adds Mistral cached-input rates and synchronizes the primary and backup registries.
  • Resolves image size, quality, and count from explicit arguments, response metadata, or validated request parameters before default cost calculation.
  • Adds focused image-cost routing tests and permits Gemini’s Interactions API endpoint in registry validation.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
litellm/litellm_core_utils/llm_cost_calc/utils.py Adds validated request-parameter fallbacks for image-cost tier selection and consistently forwards the resolved size, quality, and count.
model_prices_and_context_window.json Adds and corrects provider model metadata and uses the per-image field consumed by the default image calculator for the new xAI models.
litellm/model_prices_and_context_window_backup.json Keeps the backup registry synchronized with the primary registry changes.
tests/test_litellm/litellm_core_utils/llm_cost_calc/test_llm_cost_calc_utils.py Adds focused coverage for request-quality and valid-size fallback behavior in image cost routing.
tests/test_litellm/test_utils.py Extends registry endpoint validation to accept Gemini’s Interactions API path.

Reviews (6): Last reviewed commit: "fix(cost): only let a WxH request size d..." | Re-trigger Greptile

Comment thread model_prices_and_context_window.json Outdated
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@codecov

codecov Bot commented Aug 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@codspeed-hq

codspeed-hq Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 31 untouched benchmarks


Comparing devin/1787857843-registry-audit-rolling (b8f9123) with litellm_internal_staging (ca0b951)1

Open in CodSpeed

Footnotes

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

…upstream gemini 3.5 transcribe entries

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…_per_image for default calculator

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration devin-ai-integration Bot changed the title fix(registry): add Gemini 3.5 Transcribe/Omni 1.1 Flash, xAI grok-imagine image models, Mistral cache-read pricing fix(registry): add Gemini Omni 1.1 Flash, xAI grok-imagine image models, Mistral cache-read pricing Aug 27, 2026
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

Fixed in afe61aa: generated-image price now lives in input_cost_per_image, the key default_image_cost_calculator reads, matching the gpt-image-1 convention

…hot/kimi-k2.7-code; xai grok-imagine-image-pro deprecation date

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration devin-ai-integration Bot changed the title fix(registry): add Gemini Omni 1.1 Flash, xAI grok-imagine image models, Mistral cache-read pricing fix(registry): add Gemini Omni 1.1 Flash, xAI grok-imagine image models, Mistral cache-read pricing, GLM 5.3 Flash + Kimi K2.7 Code entries Aug 28, 2026
…code entries

Gemini omni 1.1 flash and omni flash preview only answer on the Interactions
API, so both now list /v1beta/interactions as their endpoint and 1.1 flash
gets the 131072 / 65536 limits the models API reports.

grok-4.20-multi-agent and -latest now match the dated entry (mode responses,
/v1/responses only), and all three drop function calling and tool choice
since the API rejects client-side tools outside a beta.

kimi-k2.7-code gets the capability flags kimi-k2.6 carries (tools, reasoning,
JSON mode, image and video input) plus max_output_tokens.

grok-imagine-image-2.0 gets a low quality tier at $0.04 so quality=low is
not billed at the $0.06 default.
@mateo-berri

Copy link
Copy Markdown
Contributor

@greptileai

… API

The models API reports 131072 input / 65536 output for the preview model
and the Interactions API accepts 100k tokens but rejects 130k, so the
1,048,576 input limit copied from the docs was wrong.
@mateo-berri

Copy link
Copy Markdown
Contributor

@greptileai

@mateo-berri

Copy link
Copy Markdown
Contributor

@greptileai

@mateo-berri

Copy link
Copy Markdown
Contributor

@greptileai

@mateo-berri

Copy link
Copy Markdown
Contributor

bugbot run

@mateo-berri

Copy link
Copy Markdown
Contributor

@greptileai

Comment thread model_prices_and_context_window.json
@mateo-berri

Copy link
Copy Markdown
Contributor

bugbot run

@cursor cursor Bot left a comment

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.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit b8f9123. Configure here.

@mateo-berri mateo-berri left a comment

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.

LGTM

@mateo-berri
mateo-berri merged commit 5bcd494 into litellm_internal_staging Aug 28, 2026
81 checks passed
@mateo-berri
mateo-berri deleted the devin/1787857843-registry-audit-rolling branch August 28, 2026 17:18
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.

Add "GLM-5.3-Flash" in "model_prices_and_context_window.json"

2 participants