Skip to content

fix(router): keep chat and other non-batch calls off Azure batch-only deployments in mixed groups - #53454

Merged
mateo-berri merged 12 commits into
BerriAI:mainfrom
drewv19:litellm_skip_batch_only_deployments_for_chat
Nov 23, 2026
Merged

mateo-berri merged 12 commits into
BerriAI:mainfrom
drewv19:litellm_skip_batch_only_deployments_for_chat

Conversation

@drewv19

@drewv19 drewv19 commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Handwritten 1-3 sentence description

When a model group mixed a normal Azure deployment with an Azure batch-only one, about half the chat calls went to the batch one and got Azure's 400. Now every non-batch call stays on the normal deployments, while batch jobs and file uploads still use the batch one

Details

TLDR

Problem this solves:

  • Chat calls on a mixed Azure group get Azure's 400 from the batch-only deployment

How it solves it:

  • Non-batch calls skip Azure mode: batch deployments, never other providers' ones, when the group has others
  • Batch, file, fine-tuning, vector store and container calls still pick them
  • Chat retries and cooldowns act as if the chat deployment were alone
  • A batch or file call's 429 moves only those calls to the batch-only deployment
Decisions
  • Only Azure and Azure AI mode: batch deployments are skipped
    • Alternative: skip any provider's mode: batch deployment
    • Rejected because only Azure splits chat and batch into separate deployments, which is the rule batch creates already follow
  • The skip applies only while the group has a deployment that is not batch-only
    • Alternative: always skip, which turns a pure-batch group's chat call into a "no deployments" error
    • Kept that group as it was, since nothing about it changed
  • The skip reads the whole group, not just the deployments that are not cooling down
    • Alternative: fall back to the batch deployment while the chat one cools down
    • Rejected because that is a certain 400 that hides the chat deployment's real 429
  • Batch creates, the batch and file calls (retrieve, cancel, upload, content, delete, list) and the fine-tuning job calls keep the batch deployment
    • Alternative: keep it only for batch creates
    • Rejected because a job's input file and status calls must still be able to reach the deployment that runs it, and Azure runs fine-tuning per resource, so a file or job held on the batch deployment must stay reachable
  • Vector store and container calls keep the batch deployment too
    • Alternative: route them like chat calls
    • Rejected because Azure keeps vector stores and containers per resource, so one made through the batch deployment must stay reachable
  • A call pinned to one deployment keeps it, even a batch-only one
    • Alternative: drop a pinned batch-only deployment for non-batch calls
    • Rejected because the pin names the deployment that holds the object, so dropping it sends the call where that object is not
  • The fix applies by default, with no setting to turn on
    • Alternative: ask admins to set enforce_supported_endpoints with only /v1/batch on the batch deployment
    • Rejected because every mixed group would keep failing about half its chat calls until its admin found that setting, and an Azure batch-only deployment never serves chat
  • Chat calls on a mixed group stop being balanced over the batch deployment
  • Retries and weighted failover count only the deployments the call can use
    • Alternative: count the whole group, batch-only deployments included
    • Rejected because then a chat call's retry is skipped, and a failover hop is tried that can only end in the same error
  • A failed chat call counts only the deployments that can take chat when deciding a cooldown
    • Alternative: count the whole group, batch-only deployments included
    • Rejected because then one 429 cools down the lone chat deployment, which a chat-only group never does
  • A failed batch or file call on the lone chat deployment beside a batch-only one cools it for batch and file calls only
    • Alternative: cool it for every call
    • Rejected because chat calls then get no deployment until the cooldown ends
    • Alternative: never cool it
    • Rejected because batch and file calls then keep hitting the rate-limited deployment, and 10 of 20 file deletes failed in a router probe against 1 of 20 before this PR
  • The skip runs before callback filters, plugins, pre-call checks and tags
    • Alternative: run it last, after every other filter
    • Rejected because a check that drops only the chat deployment then ends in a "no deployments" 429, so a too-long prompt never reaches its context window fallback
  • The skip is decided, and the batch-only deployments dropped, before the web search, route, cooldown and health-check filters
    • Alternative: drop them after those filters
    • Rejected because a filter that dropped only the chat deployment then sent the call to the batch-only one for Azure's 400, or left no deployment where the chat one alone is still tried
  • A batch create refused by a pre-call check counts as a batch call
    • Alternative: count it like a chat failure
    • Rejected because that cooled the deployment for every call, and 9 of 20 batch creates were refused in a router test against 1 of 20 before this PR
  • A listed pass-through pick keeps the batch-only deployment, as before
    • Alternative: drop it like every other pick
    • Rejected because that pick names only the model, so it can't tell a chat call from a batch or file call, and in the proxy only the Vertex pass-through route makes it
  • order fallback levels skip batch-only levels the same way, so a fallback never goes there either

User Flow

Before: about half the chat calls on a group mixing Azure chat and batch-only deployments get a 400

  1. The proxy admin lists an Azure mode: chat and an Azure mode: batch deployment under one model name
  2. The developer sends many POST https://litellm-domain/v1/chat/completions calls with that model name
  3. About half get Azure's 400, with the batch deployment's id in x-litellm-model-id

After: every chat call succeeds, and batch jobs still run on the batch deployment

  1. The admin and the developer repeat steps 1 and 2 above
  2. Every call comes back 200 from the chat deployment
  3. Batch files and jobs sent to POST /v1/files and /v1/batches still run on the batch deployment

Pre-Submission checklist

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

  • I have added meaningful tests
  • The handful of test files covering my change pass locally, e.g. uv run pytest tests/unit/<your_test_file>.py -v. Leave the suites (make test-unit-*, make test-unit) to CI: it finishes in ~15 minutes where a laptop takes an hour or more
  • My PR passes all required CI/CD checks (e.g., lint, schema.d.ts sync check, etc.)
  • My PR's scope is as isolated as possible; it only solves 1 specific problem
  • Every automated review on my PR's latest commit has finished, and I have addressed or replied to each of its findings before requesting a maintainer review

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

Each leg ran two proxies with two workers on real Azure, one shared Redis, no database, alternating requests. In x-litellm-model-id, e10d08ef... is the chat deployment and 4d993f7d... the batch-only one

Case Before (c345f50) After (73934cc)
10 chat calls 4 got 400 10 got 200
6 streaming chat calls 3 got 400 6 got 200
6 Responses calls 3 got 400 6 got 200
6 /v1/messages calls 3 got 400 6 got 200
Batch upload, create, retrieve all 200 all 200
10 vector store creates 6 batch-only, 4 chat 6 batch-only, 4 chat
6 too-long prompts 6 got 400 6 got 200, fallback
6 embeddings calls 3 got 400 6 got 200
4 rate-limited chats beside batch-only 3 got 400 1 Azure 429, rest 200
4 rate-limited chats alone 1 Azure 429, rest 200 2 Azure 429, rest 200
4 unsupported web searches 4 Azure 400 4 got 429, as alone
Proxy command and env vars

Env vars: AZURE_FOUNDRY_API_BASE, AZURE_FOUNDRY_API_KEY, LITELLM_MASTER_KEY. Each leg starts redis-server --port <redis port> --save '' then this on two ports

PYTHON_DOTENV_DISABLED=1 .venv/bin/python -m litellm.proxy.proxy_cli --config config.yaml --port <port> --num_workers 2 --timeout_worker_healthcheck 300
Proxy and worker PIDs

Each leg printed both proxy PIDs and their two worker PIDs once both proxies answered

leg before at c345f50f1c, proxies :26820 and :21772 (2 workers each), redis :30316
port 26820 proxy pid 144074, worker pids: 146731 146732 
port 21772 proxy pid 144075, worker pids: 146786 146787 
leg before at c345f50f1c, proxies :21549 and :20827 (2 workers each), redis :26925
port 21549 proxy pid 144143, worker pids: 146681 146682 
port 20827 proxy pid 144144, worker pids: 146656 146657 
leg before at c345f50f1c, proxies :25632 and :20211 (2 workers each), redis :28666
port 25632 proxy pid 144245, worker pids: 146620 146621 
port 20211 proxy pid 144247, worker pids: 146744 146745 
leg before at c345f50f1c, proxies :28541 and :25979 (2 workers each), redis :27043
port 28541 proxy pid 144302, worker pids: 146677 146678 
port 25979 proxy pid 144303, worker pids: 146709 146710 
leg after at 73934ccd5e, proxies :24886 and :27444 (2 workers each), redis :29561
port 24886 proxy pid 180312, worker pids: 181084 181085 
port 27444 proxy pid 180314, worker pids: 181156 181157 
leg after at 73934ccd5e, proxies :32057 and :24026 (2 workers each), redis :24277
port 32057 proxy pid 180381, worker pids: 181076 181077 
port 24026 proxy pid 180382, worker pids: 181127 181128 
leg after at 73934ccd5e, proxies :32199 and :27088 (2 workers each), redis :32158
port 32199 proxy pid 180452, worker pids: 181137 181138 
port 27088 proxy pid 180453, worker pids: 181152 181153 
leg after at 73934ccd5e, proxies :30036 and :27536 (2 workers each), redis :32188
port 30036 proxy pid 180493, worker pids: 181244 181245 
port 27536 proxy pid 180494, worker pids: 181315 181316 
Why the command differs from the repo's QA command

--reload is left out because uvicorn then runs one worker. --detailed_debug is left out to keep the logs short. --use_v2_migration_resolver is left out because the legs run without a database. general_settings.coordination_redis is left out because it carries spend, budget and rate-limit counters this PR does not touch, while router cooldowns go through the router_settings Redis both proxies share. The 300 s worker healthcheck lets workers take over a minute to boot on the loaded host, and this PR does not touch worker startup

config.yaml and batch.jsonl
model_list:
  - model_name: litellm-qa-batch-mix
    litellm_params:
      model: azure/gpt-5.4-mini
      api_base: os.environ/AZURE_FOUNDRY_API_BASE
      api_key: os.environ/AZURE_FOUNDRY_API_KEY
      api_version: "2025-04-01-preview"
    model_info:
      mode: chat
  - model_name: litellm-qa-batch-mix
    litellm_params:
      model: azure/gpt-5.4-mini-batch
      api_base: os.environ/AZURE_FOUNDRY_API_BASE
      api_key: os.environ/AZURE_FOUNDRY_API_KEY
      api_version: "2025-04-01-preview"
    model_info:
      mode: batch
router_settings:
  redis_host: 127.0.0.1
  redis_port: <redis port>
litellm_settings:
  enable_loadbalancing_on_batch_endpoints: true
general_settings:
  master_key: os.environ/LITELLM_MASTER_KEY
{"custom_id": "req-1", "method": "POST", "url": "/chat/completions", "body": {"model": "litellm-qa-batch-mix", "messages": [{"role": "user", "content": "Say hi"}], "max_completion_tokens": 20}}
config-ctx.yaml

The too-long prompt case ran this config, where 415772d7... is batch-only and 46fc47aa... the fallback

model_list:
  - model_name: litellm-qa-ctx-mix
    litellm_params:
      model: azure/gpt-5.4-mini
      api_base: os.environ/AZURE_FOUNDRY_API_BASE
      api_key: os.environ/AZURE_FOUNDRY_API_KEY
      api_version: "2025-04-01-preview"
    model_info:
      mode: chat
      max_input_tokens: 50
  - model_name: litellm-qa-ctx-mix
    litellm_params:
      model: azure/gpt-5.4-mini-batch
      api_base: os.environ/AZURE_FOUNDRY_API_BASE
      api_key: os.environ/AZURE_FOUNDRY_API_KEY
      api_version: "2025-04-01-preview"
    model_info:
      mode: batch
  - model_name: litellm-qa-ctx-large
    litellm_params:
      model: azure/gpt-5.4-mini
      api_base: os.environ/AZURE_FOUNDRY_API_BASE
      api_key: os.environ/AZURE_FOUNDRY_API_KEY
      api_version: "2025-04-01-preview"
    model_info:
      mode: chat
router_settings:
  redis_host: 127.0.0.1
  redis_port: <redis port>
  enable_pre_call_checks: true
  context_window_fallbacks: [{"litellm-qa-ctx-mix": ["litellm-qa-ctx-large"]}]
general_settings:
  master_key: os.environ/LITELLM_MASTER_KEY
config-429.yaml

In x-litellm-model-id, b1188214... is the chat deployment that takes one request a minute, e9310981... its batch-only peer, dd623ba0... the same chat deployment in a group of its own, 177fdbf2... the embeddings deployment and 1d5fbb63... its batch-only peer.

model_list:
  - model_name: litellm-qa-429-mix
    litellm_params:
      model: azure/gpt-5.4-mini-qa-429
      api_base: os.environ/AZURE_FOUNDRY_API_BASE
      api_key: os.environ/AZURE_FOUNDRY_API_KEY
      api_version: "2025-04-01-preview"
    model_info:
      mode: chat
  - model_name: litellm-qa-429-mix
    litellm_params:
      model: azure/gpt-5.4-mini-batch
      api_base: os.environ/AZURE_FOUNDRY_API_BASE
      api_key: os.environ/AZURE_FOUNDRY_API_KEY
      api_version: "2025-04-01-preview"
    model_info:
      mode: batch
  - model_name: litellm-qa-429-alone
    litellm_params:
      model: azure/gpt-5.4-mini-qa-429
      api_base: os.environ/AZURE_FOUNDRY_API_BASE
      api_key: os.environ/AZURE_FOUNDRY_API_KEY
      api_version: "2025-04-01-preview"
    model_info:
      mode: chat
  - model_name: litellm-qa-embed-mix
    litellm_params:
      model: azure/text-embedding-3-small
      api_base: os.environ/AZURE_FOUNDRY_API_BASE
      api_key: os.environ/AZURE_FOUNDRY_API_KEY
      api_version: "2025-04-01-preview"
    model_info:
      mode: embedding
  - model_name: litellm-qa-embed-mix
    litellm_params:
      model: azure/gpt-5.4-mini-batch
      api_base: os.environ/AZURE_FOUNDRY_API_BASE
      api_key: os.environ/AZURE_FOUNDRY_API_KEY
      api_version: "2025-04-01-preview"
    model_info:
      mode: batch
router_settings:
  redis_host: 127.0.0.1
  redis_port: <redis port>
  num_retries: 1
litellm_settings:
  enable_loadbalancing_on_batch_endpoints: true
general_settings:
  master_key: os.environ/LITELLM_MASTER_KEY
config-ws.yaml

Both groups use the same chat deployment, which sets supports_web_search: false. litellm-qa-ws-alone is the control: its answer is what a web search call on the mixed group should get. In x-litellm-model-id, 494911ef... is the batch-only deployment

model_list:
  - model_name: litellm-qa-ws-mix
    litellm_params:
      model: azure/gpt-5.4-mini
      api_base: os.environ/AZURE_FOUNDRY_API_BASE
      api_key: os.environ/AZURE_FOUNDRY_API_KEY
      api_version: "2025-04-01-preview"
    model_info:
      mode: chat
      supports_web_search: false
  - model_name: litellm-qa-ws-mix
    litellm_params:
      model: azure/gpt-5.4-mini-batch
      api_base: os.environ/AZURE_FOUNDRY_API_BASE
      api_key: os.environ/AZURE_FOUNDRY_API_KEY
      api_version: "2025-04-01-preview"
    model_info:
      mode: batch
  - model_name: litellm-qa-ws-alone
    litellm_params:
      model: azure/gpt-5.4-mini
      api_base: os.environ/AZURE_FOUNDRY_API_BASE
      api_key: os.environ/AZURE_FOUNDRY_API_KEY
      api_version: "2025-04-01-preview"
    model_info:
      mode: chat
      supports_web_search: false
router_settings:
  redis_host: 127.0.0.1
  redis_port: <redis port>
general_settings:
  master_key: os.environ/LITELLM_MASTER_KEY

Before (c345f50)

Chat completions

$ for i in 1 2 3 4 5 6 7 8 9 10; do port=$(( i % 2 ? 26820 : 21772 )); curl -s -o /tmp/chat-26820.json -w "call $i on :$port -> %{http_code} %header{x-litellm-model-id} " http://localhost:$port/v1/chat/completions -H "Authorization: Bearer $LITELLM_MASTER_KEY" -H 'Content-Type: application/json' -d '{"model": "litellm-qa-batch-mix", "messages": [{"role": "user", "content": "Say hi"}], "max_completion_tokens": 20}'; jq -r '.choices[0].message.content // .error.message[0:75]' /tmp/chat-26820.json; done
call 1 on :26820 -> 200 e10d08efe54db553700ecf3317f1fe8bf6b4374a418336511fcbfd2ebd930dd3 Hi!
call 2 on :21772 -> 200 e10d08efe54db553700ecf3317f1fe8bf6b4374a418336511fcbfd2ebd930dd3 Hi!
call 3 on :26820 -> 400 4d993f7d2f5299abe0ccea3cfab15bc3ff41edd870e27f16db728ad1c78cb18a litellm.BadRequestError: AzureException - The current operation is not allo
call 4 on :21772 -> 200 e10d08efe54db553700ecf3317f1fe8bf6b4374a418336511fcbfd2ebd930dd3 Hi!
call 5 on :26820 -> 400 4d993f7d2f5299abe0ccea3cfab15bc3ff41edd870e27f16db728ad1c78cb18a litellm.BadRequestError: AzureException - The current operation is not allo
call 6 on :21772 -> 200 e10d08efe54db553700ecf3317f1fe8bf6b4374a418336511fcbfd2ebd930dd3 Hi!
call 7 on :26820 -> 200 e10d08efe54db553700ecf3317f1fe8bf6b4374a418336511fcbfd2ebd930dd3 Hi!
call 8 on :21772 -> 200 e10d08efe54db553700ecf3317f1fe8bf6b4374a418336511fcbfd2ebd930dd3 Hi!
call 9 on :26820 -> 400 4d993f7d2f5299abe0ccea3cfab15bc3ff41edd870e27f16db728ad1c78cb18a litellm.BadRequestError: AzureException - The current operation is not allo
call 10 on :21772 -> 400 4d993f7d2f5299abe0ccea3cfab15bc3ff41edd870e27f16db728ad1c78cb18a litellm.BadRequestError: AzureException - The current operation is not allo
Streaming chat completions
$ for i in 1 2 3 4 5 6; do port=$(( i % 2 ? 26820 : 21772 )); curl -sN -o /tmp/stream-26820.txt -w "call $i on :$port -> %{http_code} %header{x-litellm-model-id} " http://localhost:$port/v1/chat/completions -H "Authorization: Bearer $LITELLM_MASTER_KEY" -H 'Content-Type: application/json' -d '{"model": "litellm-qa-batch-mix", "messages": [{"role": "user", "content": "Say hi"}], "max_completion_tokens": 20, "stream": true}'; (grep '^data: {' /tmp/stream-26820.txt | sed 's/^data: //' | jq -rj '.choices[0].delta.content // empty'; grep -q '\[DONE\]' /tmp/stream-26820.txt && echo ' [DONE]' || jq -r '.error.message[0:75]' /tmp/stream-26820.txt 2>/dev/null || head -c 150 /tmp/stream-26820.txt); done
call 1 on :26820 -> 200 e10d08efe54db553700ecf3317f1fe8bf6b4374a418336511fcbfd2ebd930dd3 Hi! [DONE]
call 2 on :21772 -> 200 e10d08efe54db553700ecf3317f1fe8bf6b4374a418336511fcbfd2ebd930dd3 Hi! [DONE]
call 3 on :26820 -> 400 4d993f7d2f5299abe0ccea3cfab15bc3ff41edd870e27f16db728ad1c78cb18a litellm.BadRequestError: AzureException - The current operation is not allo
call 4 on :21772 -> 400 4d993f7d2f5299abe0ccea3cfab15bc3ff41edd870e27f16db728ad1c78cb18a litellm.BadRequestError: AzureException - The current operation is not allo
call 5 on :26820 -> 200 e10d08efe54db553700ecf3317f1fe8bf6b4374a418336511fcbfd2ebd930dd3 Hi! [DONE]
call 6 on :21772 -> 400 4d993f7d2f5299abe0ccea3cfab15bc3ff41edd870e27f16db728ad1c78cb18a litellm.BadRequestError: AzureException - The current operation is not allo
Responses API
$ for i in 1 2 3 4 5 6; do port=$(( i % 2 ? 26820 : 21772 )); curl -s -o /tmp/resp-26820.json -w "call $i on :$port -> %{http_code} %header{x-litellm-model-id} " http://localhost:$port/v1/responses -H "Authorization: Bearer $LITELLM_MASTER_KEY" -H 'Content-Type: application/json' -d '{"model": "litellm-qa-batch-mix", "input": "Say hi", "max_output_tokens": 16}'; jq -r '(.output // [] | map(select(.type == "message")) | .[0].content[0].text) // .error.message[0:75]' /tmp/resp-26820.json; done
call 1 on :26820 -> 400 4d993f7d2f5299abe0ccea3cfab15bc3ff41edd870e27f16db728ad1c78cb18a litellm.BadRequestError: AzureException - {
  "error": {
    "message": "Th
call 2 on :21772 -> 200 e10d08efe54db553700ecf3317f1fe8bf6b4374a418336511fcbfd2ebd930dd3 Hi!
call 3 on :26820 -> 400 4d993f7d2f5299abe0ccea3cfab15bc3ff41edd870e27f16db728ad1c78cb18a litellm.BadRequestError: AzureException - {
  "error": {
    "message": "Th
call 4 on :21772 -> 200 e10d08efe54db553700ecf3317f1fe8bf6b4374a418336511fcbfd2ebd930dd3 Hi!
call 5 on :26820 -> 200 e10d08efe54db553700ecf3317f1fe8bf6b4374a418336511fcbfd2ebd930dd3 Hi!
call 6 on :21772 -> 400 4d993f7d2f5299abe0ccea3cfab15bc3ff41edd870e27f16db728ad1c78cb18a litellm.BadRequestError: AzureException - {
  "error": {
    "message": "Th
Anthropic /v1/messages
$ for i in 1 2 3 4 5 6; do port=$(( i % 2 ? 26820 : 21772 )); curl -s -o /tmp/msg-26820.json -w "call $i on :$port -> %{http_code} %header{x-litellm-model-id} " http://localhost:$port/v1/messages -H "Authorization: Bearer $LITELLM_MASTER_KEY" -H 'Content-Type: application/json' -H 'anthropic-version: 2023-06-01' -d '{"model": "litellm-qa-batch-mix", "max_tokens": 20, "messages": [{"role": "user", "content": "Say hi"}]}'; jq -r '(.content // [] | map(select(.type == "text")) | .[0].text) // .error.message[0:75]' /tmp/msg-26820.json; done
call 1 on :26820 -> 400 4d993f7d2f5299abe0ccea3cfab15bc3ff41edd870e27f16db728ad1c78cb18a litellm.BadRequestError: AzureException - The current operation is not allo
call 2 on :21772 -> 200 e10d08efe54db553700ecf3317f1fe8bf6b4374a418336511fcbfd2ebd930dd3 Hi!
call 3 on :26820 -> 400 4d993f7d2f5299abe0ccea3cfab15bc3ff41edd870e27f16db728ad1c78cb18a litellm.BadRequestError: AzureException - The current operation is not allo
call 4 on :21772 -> 400 4d993f7d2f5299abe0ccea3cfab15bc3ff41edd870e27f16db728ad1c78cb18a litellm.BadRequestError: AzureException - The current operation is not allo
call 5 on :26820 -> 200 e10d08efe54db553700ecf3317f1fe8bf6b4374a418336511fcbfd2ebd930dd3 Hi!
call 6 on :21772 -> 200 e10d08efe54db553700ecf3317f1fe8bf6b4374a418336511fcbfd2ebd930dd3 Hi!
Batch upload, create and retrieve
$ curl -s http://localhost:26820/v1/files -H "Authorization: Bearer $LITELLM_MASTER_KEY" -F purpose=batch -F file=@batch.jsonl | tee /tmp/file-26820.json | jq -c '{id, status}'
{"id":"file-21102b0cd5574fe485029ac1273a4cef","status":"processed"}
$ curl -s -o /tmp/batch-26820.json -w '%{http_code} %header{x-litellm-model-id} ' http://localhost:21772/v1/batches -H "Authorization: Bearer $LITELLM_MASTER_KEY" -H 'Content-Type: application/json' -d '{"model": "litellm-qa-batch-mix", "input_file_id": "file-21102b0cd5574fe485029ac1273a4cef", "endpoint": "/v1/chat/completions", "completion_window": "24h"}'; jq -c '{id, status, error: .error.message}' /tmp/batch-26820.json
200 4d993f7d2f5299abe0ccea3cfab15bc3ff41edd870e27f16db728ad1c78cb18a {"id":"batch_dab88e9a-2c08-4ceb-bf6b-cf8bd46757aa","status":"validating","error":null}
$ curl -s -o /tmp/retrieved-26820.json -w '%{http_code} %header{x-litellm-model-id} ' 'http://localhost:26820/v1/batches/batch_dab88e9a-2c08-4ceb-bf6b-cf8bd46757aa?model=litellm-qa-batch-mix' -H "Authorization: Bearer $LITELLM_MASTER_KEY"; jq -c '{id, status, error: .error.message}' /tmp/retrieved-26820.json
200 e10d08efe54db553700ecf3317f1fe8bf6b4374a418336511fcbfd2ebd930dd3 {"id":"batch_dab88e9a-2c08-4ceb-bf6b-cf8bd46757aa","status":"validating","error":null}
Vector store create
$ for i in 1 2 3 4 5 6 7 8 9 10; do port=$(( i % 2 ? 26820 : 21772 )); curl -s -o /tmp/vs-26820.json -w "call $i on :$port -> %{http_code} %header{x-litellm-model-id} " http://localhost:$port/v1/vector_stores -H "Authorization: Bearer $LITELLM_MASTER_KEY" -H 'Content-Type: application/json' -d "{\"model\": \"litellm-qa-batch-mix\", \"name\": \"litellm-qa-vs-$i\"}"; jq -r '.id // .error.message[0:75]' /tmp/vs-26820.json; done
call 1 on :26820 -> 200 4d993f7d2f5299abe0ccea3cfab15bc3ff41edd870e27f16db728ad1c78cb18a vs_8Rp8gOqNWvVMeo5PjVHxLDV0
call 2 on :21772 -> 200 4d993f7d2f5299abe0ccea3cfab15bc3ff41edd870e27f16db728ad1c78cb18a vs_DPJtIvRQJxZNQLRI7mSRZI3H
call 3 on :26820 -> 200 e10d08efe54db553700ecf3317f1fe8bf6b4374a418336511fcbfd2ebd930dd3 vs_olHQft1BU5zqwZN5FyFHj0zx
call 4 on :21772 -> 200 4d993f7d2f5299abe0ccea3cfab15bc3ff41edd870e27f16db728ad1c78cb18a vs_Mqsghx7YSv4DqVFUg4QOLa6m
call 5 on :26820 -> 200 e10d08efe54db553700ecf3317f1fe8bf6b4374a418336511fcbfd2ebd930dd3 vs_Qd6407gIBFBgnSn4VKX9IDDY
call 6 on :21772 -> 200 4d993f7d2f5299abe0ccea3cfab15bc3ff41edd870e27f16db728ad1c78cb18a vs_3O1rXVF2D2JtqjpPGB8ifh3I
call 7 on :26820 -> 200 e10d08efe54db553700ecf3317f1fe8bf6b4374a418336511fcbfd2ebd930dd3 vs_41YXEvikYu5PkI3AAifQblFp
call 8 on :21772 -> 200 e10d08efe54db553700ecf3317f1fe8bf6b4374a418336511fcbfd2ebd930dd3 vs_PKGBQofJfCHuUBQpUn9HHTYT
call 9 on :26820 -> 200 4d993f7d2f5299abe0ccea3cfab15bc3ff41edd870e27f16db728ad1c78cb18a vs_c1dCuL8rn8yVt7c4D1Yvie2s
call 10 on :21772 -> 200 4d993f7d2f5299abe0ccea3cfab15bc3ff41edd870e27f16db728ad1c78cb18a vs_NesSUUIN6fvVQZ6Eow9dlpyx
Too-long prompt with a context window fallback
# Too-long prompt on a mixed group with a context window fallback
$ jq -n --arg c "$(printf 'hi %.0s' {1..200})" '{model: "litellm-qa-ctx-mix", messages: [{role: "user", content: $c}], max_completion_tokens: 20}' > long.json
$ for i in 1 2 3 4 5 6; do port=$(( i % 2 ? 21549 : 20827 )); curl -s -o /tmp/ctx-21549.json -w "call $i on :$port -> %{http_code} %header{x-litellm-model-id} fallbacks=%header{x-litellm-attempted-fallbacks} " http://localhost:$port/v1/chat/completions -H "Authorization: Bearer $LITELLM_MASTER_KEY" -H 'Content-Type: application/json' -d @long.json; jq -r '.choices[0].message.content // .error.message[0:75]' /tmp/ctx-21549.json; done
call 1 on :21549 -> 400 415772d7b859889205d7c3e4ec4c45932a4afea54ac0b62fe172db9ad9dcd65e fallbacks= litellm.BadRequestError: AzureException - The current operation is not allo
call 2 on :20827 -> 400 415772d7b859889205d7c3e4ec4c45932a4afea54ac0b62fe172db9ad9dcd65e fallbacks= litellm.BadRequestError: AzureException - The current operation is not allo
call 3 on :21549 -> 400 415772d7b859889205d7c3e4ec4c45932a4afea54ac0b62fe172db9ad9dcd65e fallbacks= litellm.BadRequestError: AzureException - The current operation is not allo
call 4 on :20827 -> 400 415772d7b859889205d7c3e4ec4c45932a4afea54ac0b62fe172db9ad9dcd65e fallbacks= litellm.BadRequestError: AzureException - The current operation is not allo
call 5 on :21549 -> 400 415772d7b859889205d7c3e4ec4c45932a4afea54ac0b62fe172db9ad9dcd65e fallbacks= litellm.BadRequestError: AzureException - The current operation is not allo
call 6 on :20827 -> 400 415772d7b859889205d7c3e4ec4c45932a4afea54ac0b62fe172db9ad9dcd65e fallbacks= litellm.BadRequestError: AzureException - The current operation is not allo
# Short prompt on the same group
$ for i in 1 2 3 4; do port=$(( i % 2 ? 21549 : 20827 )); curl -s -o /tmp/ctxs-21549.json -w "call $i on :$port -> %{http_code} %header{x-litellm-model-id} " http://localhost:$port/v1/chat/completions -H "Authorization: Bearer $LITELLM_MASTER_KEY" -H 'Content-Type: application/json' -d '{"model": "litellm-qa-ctx-mix", "messages": [{"role": "user", "content": "Say hi"}], "max_completion_tokens": 20}'; jq -r '.choices[0].message.content // .error.message[0:75]' /tmp/ctxs-21549.json; done
call 1 on :21549 -> 400 415772d7b859889205d7c3e4ec4c45932a4afea54ac0b62fe172db9ad9dcd65e litellm.BadRequestError: AzureException - The current operation is not allo
call 2 on :20827 -> 200 d97f1e877daefd937a9ed46f778459f597c3393144fba2c31a01ab05559630e9 Hi!
call 3 on :21549 -> 400 415772d7b859889205d7c3e4ec4c45932a4afea54ac0b62fe172db9ad9dcd65e litellm.BadRequestError: AzureException - The current operation is not allo
call 4 on :20827 -> 400 415772d7b859889205d7c3e4ec4c45932a4afea54ac0b62fe172db9ad9dcd65e litellm.BadRequestError: AzureException - The current operation is not allo
Embeddings on a mixed group
$ for i in 1 2 3 4 5 6; do port=$(( i % 2 ? 25632 : 20211 )); curl -s -o /tmp/emb-25632.json -w "call $i on :$port -> %{http_code} %header{x-litellm-model-id} " http://localhost:$port/v1/embeddings -H "Authorization: Bearer $LITELLM_MASTER_KEY" -H 'Content-Type: application/json' -d '{"model": "litellm-qa-embed-mix", "input": "hi"}'; jq -r '(.data[0].embedding | length | "\(.) dims") // .error.message[0:75]' /tmp/emb-25632.json; done
call 1 on :25632 -> 400 1d5fbb63ca6a9527fa4ef7c87d0bff9860cc45ae56b2f0ec3de0edb3a83d350e 0 dims
call 2 on :20211 -> 400 1d5fbb63ca6a9527fa4ef7c87d0bff9860cc45ae56b2f0ec3de0edb3a83d350e 0 dims
call 3 on :25632 -> 200 177fdbf26429622d64c2c62a03d79630e119e75f05f1f15da6443d3521e3200e 1536 dims
call 4 on :20211 -> 200 177fdbf26429622d64c2c62a03d79630e119e75f05f1f15da6443d3521e3200e 1536 dims
call 5 on :25632 -> 400 1d5fbb63ca6a9527fa4ef7c87d0bff9860cc45ae56b2f0ec3de0edb3a83d350e 0 dims
call 6 on :20211 -> 200 177fdbf26429622d64c2c62a03d79630e119e75f05f1f15da6443d3521e3200e 1536 dims
Rate-limited chat deployment beside the batch-only one
$ for i in 1 2 3 4; do port=$(( i % 2 ? 25632 : 20211 )); curl -s -o /tmp/rl-25632.json -w "call $i on :$port -> %{http_code} %header{x-litellm-model-id} %{time_total}s " http://localhost:$port/v1/chat/completions -H "Authorization: Bearer $LITELLM_MASTER_KEY" -H 'Content-Type: application/json' -d '{"model": "litellm-qa-429-mix", "messages": [{"role": "user", "content": "Say hi"}], "max_completion_tokens": 20}'; jq -r '.choices[0].message.content // .error.message[0:90]' /tmp/rl-25632.json; done
call 1 on :25632 -> 400 e9310981b4879220d2aab4724c3b06ae318652dc4a58092e6a575e72b4457be7 0.476254s litellm.BadRequestError: AzureException - The current operation is not allowed in this dep
call 2 on :20211 -> 400 e9310981b4879220d2aab4724c3b06ae318652dc4a58092e6a575e72b4457be7 1.349415s litellm.BadRequestError: AzureException - The current operation is not allowed in this dep
call 3 on :25632 -> 200 b118821432c075069efc8c460374896bed828d97379f33aedf784f8646fa9a27 0.584792s Hi!
call 4 on :20211 -> 400 e9310981b4879220d2aab4724c3b06ae318652dc4a58092e6a575e72b4457be7 0.232317s litellm.BadRequestError: AzureException - The current operation is not allowed in this dep
Rate-limited chat deployment alone
$ for i in 1 2 3 4; do port=$(( i % 2 ? 25632 : 20211 )); curl -s -o /tmp/rl-25632.json -w "call $i on :$port -> %{http_code} %header{x-litellm-model-id} %{time_total}s " http://localhost:$port/v1/chat/completions -H "Authorization: Bearer $LITELLM_MASTER_KEY" -H 'Content-Type: application/json' -d '{"model": "litellm-qa-429-alone", "messages": [{"role": "user", "content": "Say hi"}], "max_completion_tokens": 20}'; jq -r '.choices[0].message.content // .error.message[0:90]' /tmp/rl-25632.json; done
call 1 on :25632 -> 200 dd623ba0914e817b78c2647f842ba3dd121cbbb25325d8fe83ed6a790d29fa98 0.695310s Hi!
call 2 on :20211 -> 200 dd623ba0914e817b78c2647f842ba3dd121cbbb25325d8fe83ed6a790d29fa98 0.751842s Hi!
call 3 on :25632 -> 429 dd623ba0914e817b78c2647f842ba3dd121cbbb25325d8fe83ed6a790d29fa98 61.806082s litellm.RateLimitError: AzureException RateLimitError - Your requests to gpt-5.4-mini for 
call 4 on :20211 -> 200 dd623ba0914e817b78c2647f842ba3dd121cbbb25325d8fe83ed6a790d29fa98 0.746894s Hi!
Unsupported web search
# Web search on litellm-qa-ws-mix, whose chat deployment sets supports_web_search false
$ for i in 1 2 3 4; do port=$(( i % 2 ? 28541 : 25979 )); curl -s -o /tmp/ws-28541.json -w "call $i on :$port -> %{http_code} %header{x-litellm-model-id} " http://localhost:$port/v1/responses -H "Authorization: Bearer $LITELLM_MASTER_KEY" -H 'Content-Type: application/json' -d '{"model": "litellm-qa-ws-mix", "input": "What is the weather in Paris today?", "tools": [{"type": "web_search"}], "max_output_tokens": 64}'; jq -r '(.output // [] | map(select(.type == "message")) | .[0].content[0].text[0:60]) // .error.message[0:110]' /tmp/ws-28541.json; done
call 1 on :28541 -> 400 494911eff0b8714339674dc93486db3c23cea5a3b478869b79ed33f559c69904 litellm.BadRequestError: AzureException - {
  "error": {
    "message": "The current operation is not allowed 
call 2 on :25979 -> 400 494911eff0b8714339674dc93486db3c23cea5a3b478869b79ed33f559c69904 litellm.BadRequestError: AzureException - {
  "error": {
    "message": "The current operation is not allowed 
call 3 on :28541 -> 400 494911eff0b8714339674dc93486db3c23cea5a3b478869b79ed33f559c69904 litellm.BadRequestError: AzureException - {
  "error": {
    "message": "The current operation is not allowed 
call 4 on :25979 -> 400 494911eff0b8714339674dc93486db3c23cea5a3b478869b79ed33f559c69904 litellm.BadRequestError: AzureException - {
  "error": {
    "message": "The current operation is not allowed
# Web search on litellm-qa-ws-alone, whose chat deployment sets supports_web_search false
$ for i in 1 2 3 4; do port=$(( i % 2 ? 28541 : 25979 )); curl -s -o /tmp/ws-28541.json -w "call $i on :$port -> %{http_code} %header{x-litellm-model-id} " http://localhost:$port/v1/responses -H "Authorization: Bearer $LITELLM_MASTER_KEY" -H 'Content-Type: application/json' -d '{"model": "litellm-qa-ws-alone", "input": "What is the weather in Paris today?", "tools": [{"type": "web_search"}], "max_output_tokens": 64}'; jq -r '(.output // [] | map(select(.type == "message")) | .[0].content[0].text[0:60]) // .error.message[0:110]' /tmp/ws-28541.json; done
call 1 on :28541 -> 429  No deployments available for selected model, Try again in 5 seconds. Passed model=litellm-qa-ws-alone. pre-cal
call 2 on :25979 -> 429  No deployments available for selected model, Try again in 5 seconds. Passed model=litellm-qa-ws-alone. pre-cal
call 3 on :28541 -> 429  No deployments available for selected model, Try again in 5 seconds. Passed model=litellm-qa-ws-alone. pre-cal
call 4 on :25979 -> 429  No deployments available for selected model, Try again in 5 seconds. Passed model=litellm-qa-ws-alone. pre-cal

After (73934cc)

Chat completions

$ for i in 1 2 3 4 5 6 7 8 9 10; do port=$(( i % 2 ? 24886 : 27444 )); curl -s -o /tmp/chat-24886.json -w "call $i on :$port -> %{http_code} %header{x-litellm-model-id} " http://localhost:$port/v1/chat/completions -H "Authorization: Bearer $LITELLM_MASTER_KEY" -H 'Content-Type: application/json' -d '{"model": "litellm-qa-batch-mix", "messages": [{"role": "user", "content": "Say hi"}], "max_completion_tokens": 20}'; jq -r '.choices[0].message.content // .error.message[0:75]' /tmp/chat-24886.json; done
call 1 on :24886 -> 200 e10d08efe54db553700ecf3317f1fe8bf6b4374a418336511fcbfd2ebd930dd3 Hi!
call 2 on :27444 -> 200 e10d08efe54db553700ecf3317f1fe8bf6b4374a418336511fcbfd2ebd930dd3 Hi!
call 3 on :24886 -> 200 e10d08efe54db553700ecf3317f1fe8bf6b4374a418336511fcbfd2ebd930dd3 Hi!
call 4 on :27444 -> 200 e10d08efe54db553700ecf3317f1fe8bf6b4374a418336511fcbfd2ebd930dd3 Hi!
call 5 on :24886 -> 200 e10d08efe54db553700ecf3317f1fe8bf6b4374a418336511fcbfd2ebd930dd3 Hi!
call 6 on :27444 -> 200 e10d08efe54db553700ecf3317f1fe8bf6b4374a418336511fcbfd2ebd930dd3 Hi!
call 7 on :24886 -> 200 e10d08efe54db553700ecf3317f1fe8bf6b4374a418336511fcbfd2ebd930dd3 Hi!
call 8 on :27444 -> 200 e10d08efe54db553700ecf3317f1fe8bf6b4374a418336511fcbfd2ebd930dd3 Hi!
call 9 on :24886 -> 200 e10d08efe54db553700ecf3317f1fe8bf6b4374a418336511fcbfd2ebd930dd3 Hi!
call 10 on :27444 -> 200 e10d08efe54db553700ecf3317f1fe8bf6b4374a418336511fcbfd2ebd930dd3 Hi!
Streaming chat completions
$ for i in 1 2 3 4 5 6; do port=$(( i % 2 ? 24886 : 27444 )); curl -sN -o /tmp/stream-24886.txt -w "call $i on :$port -> %{http_code} %header{x-litellm-model-id} " http://localhost:$port/v1/chat/completions -H "Authorization: Bearer $LITELLM_MASTER_KEY" -H 'Content-Type: application/json' -d '{"model": "litellm-qa-batch-mix", "messages": [{"role": "user", "content": "Say hi"}], "max_completion_tokens": 20, "stream": true}'; (grep '^data: {' /tmp/stream-24886.txt | sed 's/^data: //' | jq -rj '.choices[0].delta.content // empty'; grep -q '\[DONE\]' /tmp/stream-24886.txt && echo ' [DONE]' || jq -r '.error.message[0:75]' /tmp/stream-24886.txt 2>/dev/null || head -c 150 /tmp/stream-24886.txt); done
call 1 on :24886 -> 200 e10d08efe54db553700ecf3317f1fe8bf6b4374a418336511fcbfd2ebd930dd3 Hi! [DONE]
call 2 on :27444 -> 200 e10d08efe54db553700ecf3317f1fe8bf6b4374a418336511fcbfd2ebd930dd3 Hi! [DONE]
call 3 on :24886 -> 200 e10d08efe54db553700ecf3317f1fe8bf6b4374a418336511fcbfd2ebd930dd3 Hi! [DONE]
call 4 on :27444 -> 200 e10d08efe54db553700ecf3317f1fe8bf6b4374a418336511fcbfd2ebd930dd3 Hi! [DONE]
call 5 on :24886 -> 200 e10d08efe54db553700ecf3317f1fe8bf6b4374a418336511fcbfd2ebd930dd3 Hi! [DONE]
call 6 on :27444 -> 200 e10d08efe54db553700ecf3317f1fe8bf6b4374a418336511fcbfd2ebd930dd3 Hi! [DONE]
Responses API
$ for i in 1 2 3 4 5 6; do port=$(( i % 2 ? 24886 : 27444 )); curl -s -o /tmp/resp-24886.json -w "call $i on :$port -> %{http_code} %header{x-litellm-model-id} " http://localhost:$port/v1/responses -H "Authorization: Bearer $LITELLM_MASTER_KEY" -H 'Content-Type: application/json' -d '{"model": "litellm-qa-batch-mix", "input": "Say hi", "max_output_tokens": 16}'; jq -r '(.output // [] | map(select(.type == "message")) | .[0].content[0].text) // .error.message[0:75]' /tmp/resp-24886.json; done
call 1 on :24886 -> 200 e10d08efe54db553700ecf3317f1fe8bf6b4374a418336511fcbfd2ebd930dd3 Hi!
call 2 on :27444 -> 200 e10d08efe54db553700ecf3317f1fe8bf6b4374a418336511fcbfd2ebd930dd3 Hi!
call 3 on :24886 -> 200 e10d08efe54db553700ecf3317f1fe8bf6b4374a418336511fcbfd2ebd930dd3 Hi!
call 4 on :27444 -> 200 e10d08efe54db553700ecf3317f1fe8bf6b4374a418336511fcbfd2ebd930dd3 Hi!
call 5 on :24886 -> 200 e10d08efe54db553700ecf3317f1fe8bf6b4374a418336511fcbfd2ebd930dd3 Hi!
call 6 on :27444 -> 200 e10d08efe54db553700ecf3317f1fe8bf6b4374a418336511fcbfd2ebd930dd3 Hi!
Anthropic /v1/messages
$ for i in 1 2 3 4 5 6; do port=$(( i % 2 ? 24886 : 27444 )); curl -s -o /tmp/msg-24886.json -w "call $i on :$port -> %{http_code} %header{x-litellm-model-id} " http://localhost:$port/v1/messages -H "Authorization: Bearer $LITELLM_MASTER_KEY" -H 'Content-Type: application/json' -H 'anthropic-version: 2023-06-01' -d '{"model": "litellm-qa-batch-mix", "max_tokens": 20, "messages": [{"role": "user", "content": "Say hi"}]}'; jq -r '(.content // [] | map(select(.type == "text")) | .[0].text) // .error.message[0:75]' /tmp/msg-24886.json; done
call 1 on :24886 -> 200 e10d08efe54db553700ecf3317f1fe8bf6b4374a418336511fcbfd2ebd930dd3 Hi!
call 2 on :27444 -> 200 e10d08efe54db553700ecf3317f1fe8bf6b4374a418336511fcbfd2ebd930dd3 Hi!
call 3 on :24886 -> 200 e10d08efe54db553700ecf3317f1fe8bf6b4374a418336511fcbfd2ebd930dd3 Hi!
call 4 on :27444 -> 200 e10d08efe54db553700ecf3317f1fe8bf6b4374a418336511fcbfd2ebd930dd3 Hi!
call 5 on :24886 -> 200 e10d08efe54db553700ecf3317f1fe8bf6b4374a418336511fcbfd2ebd930dd3 Hi!
call 6 on :27444 -> 200 e10d08efe54db553700ecf3317f1fe8bf6b4374a418336511fcbfd2ebd930dd3 Hi!
Batch upload, create and retrieve
$ curl -s http://localhost:24886/v1/files -H "Authorization: Bearer $LITELLM_MASTER_KEY" -F purpose=batch -F file=@batch.jsonl | tee /tmp/file-24886.json | jq -c '{id, status}'
{"id":"file-1f3edca20ad347c38b82a5380088c78c","status":"processed"}
$ curl -s -o /tmp/batch-24886.json -w '%{http_code} %header{x-litellm-model-id} ' http://localhost:27444/v1/batches -H "Authorization: Bearer $LITELLM_MASTER_KEY" -H 'Content-Type: application/json' -d '{"model": "litellm-qa-batch-mix", "input_file_id": "file-1f3edca20ad347c38b82a5380088c78c", "endpoint": "/v1/chat/completions", "completion_window": "24h"}'; jq -c '{id, status, error: .error.message}' /tmp/batch-24886.json
200 4d993f7d2f5299abe0ccea3cfab15bc3ff41edd870e27f16db728ad1c78cb18a {"id":"batch_ca31a611-9587-4b5e-978a-afb53014cc7b","status":"validating","error":null}
$ curl -s -o /tmp/retrieved-24886.json -w '%{http_code} %header{x-litellm-model-id} ' 'http://localhost:24886/v1/batches/batch_ca31a611-9587-4b5e-978a-afb53014cc7b?model=litellm-qa-batch-mix' -H "Authorization: Bearer $LITELLM_MASTER_KEY"; jq -c '{id, status, error: .error.message}' /tmp/retrieved-24886.json
200 e10d08efe54db553700ecf3317f1fe8bf6b4374a418336511fcbfd2ebd930dd3 {"id":"batch_ca31a611-9587-4b5e-978a-afb53014cc7b","status":"validating","error":null}
Vector store create
$ for i in 1 2 3 4 5 6 7 8 9 10; do port=$(( i % 2 ? 24886 : 27444 )); curl -s -o /tmp/vs-24886.json -w "call $i on :$port -> %{http_code} %header{x-litellm-model-id} " http://localhost:$port/v1/vector_stores -H "Authorization: Bearer $LITELLM_MASTER_KEY" -H 'Content-Type: application/json' -d "{\"model\": \"litellm-qa-batch-mix\", \"name\": \"litellm-qa-vs-$i\"}"; jq -r '.id // .error.message[0:75]' /tmp/vs-24886.json; done
call 1 on :24886 -> 200 4d993f7d2f5299abe0ccea3cfab15bc3ff41edd870e27f16db728ad1c78cb18a vs_4Rg0fAkyouHMjoviD4xM4pUq
call 2 on :27444 -> 200 4d993f7d2f5299abe0ccea3cfab15bc3ff41edd870e27f16db728ad1c78cb18a vs_zwX5c1T3DrvXZmqoPTRKvNRz
call 3 on :24886 -> 200 4d993f7d2f5299abe0ccea3cfab15bc3ff41edd870e27f16db728ad1c78cb18a vs_JeB7ONEOAXa8hvD6c8UKiByK
call 4 on :27444 -> 200 e10d08efe54db553700ecf3317f1fe8bf6b4374a418336511fcbfd2ebd930dd3 vs_oU3t6bYrEbkYGilrv8xDfBHz
call 5 on :24886 -> 200 4d993f7d2f5299abe0ccea3cfab15bc3ff41edd870e27f16db728ad1c78cb18a vs_FEgAzNQLJCFXejsvCSUgTNM2
call 6 on :27444 -> 200 e10d08efe54db553700ecf3317f1fe8bf6b4374a418336511fcbfd2ebd930dd3 vs_XW3dQAOXj6zZoZuzvveqkWbF
call 7 on :24886 -> 200 e10d08efe54db553700ecf3317f1fe8bf6b4374a418336511fcbfd2ebd930dd3 vs_JFBn78JKLZA6tL6AAxtkDgYG
call 8 on :27444 -> 200 e10d08efe54db553700ecf3317f1fe8bf6b4374a418336511fcbfd2ebd930dd3 vs_ks9QCd2l3XxLrlfOcaSe2bWN
call 9 on :24886 -> 200 4d993f7d2f5299abe0ccea3cfab15bc3ff41edd870e27f16db728ad1c78cb18a vs_70qxK8OSh7TJQh8LUM6xJCHL
call 10 on :27444 -> 200 4d993f7d2f5299abe0ccea3cfab15bc3ff41edd870e27f16db728ad1c78cb18a vs_TP95q6C8kZ4YLQsNP2kwhIxo
Too-long prompt with a context window fallback
# Too-long prompt on a mixed group with a context window fallback
$ jq -n --arg c "$(printf 'hi %.0s' {1..200})" '{model: "litellm-qa-ctx-mix", messages: [{role: "user", content: $c}], max_completion_tokens: 20}' > long.json
$ for i in 1 2 3 4 5 6; do port=$(( i % 2 ? 32057 : 24026 )); curl -s -o /tmp/ctx-32057.json -w "call $i on :$port -> %{http_code} %header{x-litellm-model-id} fallbacks=%header{x-litellm-attempted-fallbacks} " http://localhost:$port/v1/chat/completions -H "Authorization: Bearer $LITELLM_MASTER_KEY" -H 'Content-Type: application/json' -d @long.json; jq -r '.choices[0].message.content // .error.message[0:75]' /tmp/ctx-32057.json; done
call 1 on :32057 -> 200 46fc47aa55b0cafb7db23e4dcf1de4faf62af68bfb27c7487805f9e5b60609ff fallbacks=1 Hi hi hi hi hi hi hi hi hi hi hi hi hi hi hi hi hi
call 2 on :24026 -> 200 46fc47aa55b0cafb7db23e4dcf1de4faf62af68bfb27c7487805f9e5b60609ff fallbacks=1 Hi hi hi hi hi hi hi hi hi hi hi hi hi hi hi hi hi
call 3 on :32057 -> 200 46fc47aa55b0cafb7db23e4dcf1de4faf62af68bfb27c7487805f9e5b60609ff fallbacks=1 hi hi hi hi hi hi hi hi hi hi hi hi hi hi hi hi hi
call 4 on :24026 -> 200 46fc47aa55b0cafb7db23e4dcf1de4faf62af68bfb27c7487805f9e5b60609ff fallbacks=1 Hi hi hi hi hi hi hi hi hi hi hi hi hi hi hi hi hi
call 5 on :32057 -> 200 46fc47aa55b0cafb7db23e4dcf1de4faf62af68bfb27c7487805f9e5b60609ff fallbacks=1 Hi hi hi hi hi hi hi hi hi hi hi hi hi hi hi hi hi
call 6 on :24026 -> 200 46fc47aa55b0cafb7db23e4dcf1de4faf62af68bfb27c7487805f9e5b60609ff fallbacks=1 Hi hi hi hi hi hi hi hi hi hi hi hi hi hi hi hi hi
# Short prompt on the same group
$ for i in 1 2 3 4; do port=$(( i % 2 ? 32057 : 24026 )); curl -s -o /tmp/ctxs-32057.json -w "call $i on :$port -> %{http_code} %header{x-litellm-model-id} " http://localhost:$port/v1/chat/completions -H "Authorization: Bearer $LITELLM_MASTER_KEY" -H 'Content-Type: application/json' -d '{"model": "litellm-qa-ctx-mix", "messages": [{"role": "user", "content": "Say hi"}], "max_completion_tokens": 20}'; jq -r '.choices[0].message.content // .error.message[0:75]' /tmp/ctxs-32057.json; done
call 1 on :32057 -> 200 d97f1e877daefd937a9ed46f778459f597c3393144fba2c31a01ab05559630e9 Hi!
call 2 on :24026 -> 200 d97f1e877daefd937a9ed46f778459f597c3393144fba2c31a01ab05559630e9 Hi!
call 3 on :32057 -> 200 d97f1e877daefd937a9ed46f778459f597c3393144fba2c31a01ab05559630e9 Hi!
call 4 on :24026 -> 200 d97f1e877daefd937a9ed46f778459f597c3393144fba2c31a01ab05559630e9 Hi!
Embeddings on a mixed group
$ for i in 1 2 3 4 5 6; do port=$(( i % 2 ? 32199 : 27088 )); curl -s -o /tmp/emb-32199.json -w "call $i on :$port -> %{http_code} %header{x-litellm-model-id} " http://localhost:$port/v1/embeddings -H "Authorization: Bearer $LITELLM_MASTER_KEY" -H 'Content-Type: application/json' -d '{"model": "litellm-qa-embed-mix", "input": "hi"}'; jq -r '(.data[0].embedding | length | "\(.) dims") // .error.message[0:75]' /tmp/emb-32199.json; done
call 1 on :32199 -> 200 177fdbf26429622d64c2c62a03d79630e119e75f05f1f15da6443d3521e3200e 1536 dims
call 2 on :27088 -> 200 177fdbf26429622d64c2c62a03d79630e119e75f05f1f15da6443d3521e3200e 1536 dims
call 3 on :32199 -> 200 177fdbf26429622d64c2c62a03d79630e119e75f05f1f15da6443d3521e3200e 1536 dims
call 4 on :27088 -> 200 177fdbf26429622d64c2c62a03d79630e119e75f05f1f15da6443d3521e3200e 1536 dims
call 5 on :32199 -> 200 177fdbf26429622d64c2c62a03d79630e119e75f05f1f15da6443d3521e3200e 1536 dims
call 6 on :27088 -> 200 177fdbf26429622d64c2c62a03d79630e119e75f05f1f15da6443d3521e3200e 1536 dims
Rate-limited chat deployment beside the batch-only one
$ for i in 1 2 3 4; do port=$(( i % 2 ? 32199 : 27088 )); curl -s -o /tmp/rl-32199.json -w "call $i on :$port -> %{http_code} %header{x-litellm-model-id} %{time_total}s " http://localhost:$port/v1/chat/completions -H "Authorization: Bearer $LITELLM_MASTER_KEY" -H 'Content-Type: application/json' -d '{"model": "litellm-qa-429-mix", "messages": [{"role": "user", "content": "Say hi"}], "max_completion_tokens": 20}'; jq -r '.choices[0].message.content // .error.message[0:90]' /tmp/rl-32199.json; done
call 1 on :32199 -> 200 b118821432c075069efc8c460374896bed828d97379f33aedf784f8646fa9a27 1.048526s Hi!
call 2 on :27088 -> 200 b118821432c075069efc8c460374896bed828d97379f33aedf784f8646fa9a27 0.744190s Hi!
call 3 on :32199 -> 429 b118821432c075069efc8c460374896bed828d97379f33aedf784f8646fa9a27 62.880529s litellm.RateLimitError: AzureException RateLimitError - Your requests to gpt-5.4-mini for 
call 4 on :27088 -> 200 b118821432c075069efc8c460374896bed828d97379f33aedf784f8646fa9a27 1.033647s Hi!
Rate-limited chat deployment alone
$ for i in 1 2 3 4; do port=$(( i % 2 ? 32199 : 27088 )); curl -s -o /tmp/rl-32199.json -w "call $i on :$port -> %{http_code} %header{x-litellm-model-id} %{time_total}s " http://localhost:$port/v1/chat/completions -H "Authorization: Bearer $LITELLM_MASTER_KEY" -H 'Content-Type: application/json' -d '{"model": "litellm-qa-429-alone", "messages": [{"role": "user", "content": "Say hi"}], "max_completion_tokens": 20}'; jq -r '.choices[0].message.content // .error.message[0:90]' /tmp/rl-32199.json; done
call 1 on :32199 -> 200 dd623ba0914e817b78c2647f842ba3dd121cbbb25325d8fe83ed6a790d29fa98 0.912360s Hi!
call 2 on :27088 -> 429 dd623ba0914e817b78c2647f842ba3dd121cbbb25325d8fe83ed6a790d29fa98 62.355706s litellm.RateLimitError: AzureException RateLimitError - Your requests to gpt-5.4-mini for 
call 3 on :32199 -> 200 dd623ba0914e817b78c2647f842ba3dd121cbbb25325d8fe83ed6a790d29fa98 1.037480s Hi!
call 4 on :27088 -> 429 dd623ba0914e817b78c2647f842ba3dd121cbbb25325d8fe83ed6a790d29fa98 61.452859s litellm.RateLimitError: AzureException RateLimitError - Your requests to gpt-5.4-mini for
Unsupported web search
# Web search on litellm-qa-ws-mix, whose chat deployment sets supports_web_search false
$ for i in 1 2 3 4; do port=$(( i % 2 ? 30036 : 27536 )); curl -s -o /tmp/ws-30036.json -w "call $i on :$port -> %{http_code} %header{x-litellm-model-id} " http://localhost:$port/v1/responses -H "Authorization: Bearer $LITELLM_MASTER_KEY" -H 'Content-Type: application/json' -d '{"model": "litellm-qa-ws-mix", "input": "What is the weather in Paris today?", "tools": [{"type": "web_search"}], "max_output_tokens": 64}'; jq -r '(.output // [] | map(select(.type == "message")) | .[0].content[0].text[0:60]) // .error.message[0:110]' /tmp/ws-30036.json; done
call 1 on :30036 -> 429  No deployments available for selected model, Try again in 5 seconds. Passed model=litellm-qa-ws-mix. pre-call-
call 2 on :27536 -> 429  No deployments available for selected model, Try again in 5 seconds. Passed model=litellm-qa-ws-mix. pre-call-
call 3 on :30036 -> 429  No deployments available for selected model, Try again in 5 seconds. Passed model=litellm-qa-ws-mix. pre-call-
call 4 on :27536 -> 429  No deployments available for selected model, Try again in 5 seconds. Passed model=litellm-qa-ws-mix. pre-call-
# Web search on litellm-qa-ws-alone, whose chat deployment sets supports_web_search false
$ for i in 1 2 3 4; do port=$(( i % 2 ? 30036 : 27536 )); curl -s -o /tmp/ws-30036.json -w "call $i on :$port -> %{http_code} %header{x-litellm-model-id} " http://localhost:$port/v1/responses -H "Authorization: Bearer $LITELLM_MASTER_KEY" -H 'Content-Type: application/json' -d '{"model": "litellm-qa-ws-alone", "input": "What is the weather in Paris today?", "tools": [{"type": "web_search"}], "max_output_tokens": 64}'; jq -r '(.output // [] | map(select(.type == "message")) | .[0].content[0].text[0:60]) // .error.message[0:110]' /tmp/ws-30036.json; done
call 1 on :30036 -> 429  No deployments available for selected model, Try again in 5 seconds. Passed model=litellm-qa-ws-alone. pre-cal
call 2 on :27536 -> 429  No deployments available for selected model, Try again in 5 seconds. Passed model=litellm-qa-ws-alone. pre-cal
call 3 on :30036 -> 429  No deployments available for selected model, Try again in 5 seconds. Passed model=litellm-qa-ws-alone. pre-cal
call 4 on :27536 -> 429  No deployments available for selected model, Try again in 5 seconds. Passed model=litellm-qa-ws-alone. pre-cal
Router probes for rate-limited batch and file calls (not live)

Azure won't answer 429 on a batch or file call on demand, so these scripts run the router in-process and replay Azure's HTTP answers, with num_retries 0 unless noted and cooldown_time 3600. At aac0943 a router test saw 9 of 20 refused batch creates, which this round fixes

Probe Before (c345f50) After (73934cc)
20 batch creates, Azure and OpenAI group, OpenAI 429 1 failed 1 failed
Same, default retries 0 failed 0 failed
20 file deletes, chat deployment 429 1 failed 1 failed
20 chats after a file-call 429 20 got 400 20 ok
20 batch creates, pre-call check refuses OpenAI 1 refused 1 refused
c345f50f1c: 20 batch creates on the documented azure+openai mode:batch group, OpenAI answers 429 -> 1 failed, OpenAI hit 1x, Azure hit 19x
73934ccd5e: 20 batch creates on the documented azure+openai mode:batch group, OpenAI answers 429 -> 1 failed, OpenAI hit 1x, Azure hit 19x
c345f50f1c: 20 batch creates on the documented azure+openai mode:batch group, OpenAI answers 429, default num_retries -> 0 failed, OpenAI hit 1x, Azure hit 20x
73934ccd5e: 20 batch creates on the documented azure+openai mode:batch group, OpenAI answers 429, default num_retries -> 0 failed, OpenAI hit 1x, Azure hit 20x
c345f50f1c: 20 afile_delete calls, chat deployment answers 429 -> 1 failed with 429, chat hit 1x, batch-only hit 19x
73934ccd5e: 20 afile_delete calls, chat deployment answers 429 -> 1 failed with 429, chat hit 1x, batch-only hit 19x
c345f50f1c: 20 file deletes with the chat deployment answering file calls 429 -> 1 got 429; then 20 chats -> 0 ok, 20 failed ['BadRequestError']
73934ccd5e: 20 file deletes with the chat deployment answering file calls 429 -> 1 got 429; then 20 chats -> 20 ok, 0 failed []
c345f50f1c: 20 batch creates on an azure+openai mode:batch group, a pre-call check refuses the OpenAI one -> 1 refused, Azure hit 19x
73934ccd5e: 20 batch creates on an azure+openai mode:batch group, a pre-call check refuses the OpenAI one -> 1 refused, Azure hit 19x
Live PR risk, base c345f50 against head 73934cc

Each side ran two proxy processes with two workers, one Postgres and one Redis, and a recorder in front of Azure logging every outbound request. Each mixed case has an alone control, the same chat deployment in a group by itself

Case Base Head
Chat x6 1 batch 400 6 got 200
Streaming x4 3 batch 400 4 got 200
Responses x4 3 batch 400 4 got 200
/v1/messages x4 1 batch 400 4 got 200
Embeddings x4 3 batch 400 4 got 200
order group x4, upstream calls 4 got 200, 8 calls 4 got 200, 4 calls
Fallback into mixed group x2 404, then 200 2 got 200
Token counter model flips to batch always chat
Azure pass-through x4, upstream calls 4 got 200, 7 calls 4 got 200, 4 calls
Batch, file, vector store calls same same
Context fallback, long x4 4 batch 400 4 got 200 via fallback
Wrong key, mixed x4 4 batch 400 401, then 3 got 429
Wrong key, alone x4 401, then 3 got 429 401, then 3 got 429
Live 429, mixed x3 3 batch 400 200, 200, 429
Live 429, alone x3 200, 200, 429 200, 200, 429
Web search, mixed x2 2 batch 400 2 got 429, as alone
Realtime x4, picked deployment 3 batch, 1 chat 4 chat
File or vector store 401, then chat batch 400 own 401
Refused batch create, then chat x3 1 batch 400 3 got 200
Cooldown 429 type, mixed batch 400 rate_limit_error
Cooldown 429 type, alone all_deployments_in_cooldown all_deployments_in_cooldown
Usage-based routing x6 4 batch 400 6 got 200
Tag only on batch-only, mixed x2 2 batch 400 2 got tag 401, as alone
Unhealthy chat, mixed x3 3 batch 400 3 got 401, as alone
Allowed-fails safety net, mixed x3 3 batch 400 3 got 401, as alone
Weighted failover, mixed x3, upstream calls 3 batch 400, 14 calls 3 got 401, 3 calls
Failover bad, good, batch x6, batch hops 6 got 200, 3 hops 6 got 200, 0 hops
Decisions call, mixed x2 batch upstream 400 unknown provider 400, as alone
Pinned to batch or chat id same same
Merged with main 2ca4eba, 10 top cases not run same as head
Rust router-core tests not run 585 pass
Spend logs per deployment match routing match routing

Breaking. None. Every path where base answered 200 also answers 200 on head

Backward incompatible. None beyond the fix. Where the sides differ, head returns what the chat deployment returns alone, not the batch-only deployment's 400. A batch or file failure on a deployment that is alone for chat writes deployment:<id>:batch-calls:cooldown in place of deployment:<id>:cooldown, so readers of the plain key no longer see it

Regression risk. A mixed group's cooldown 429 says rate_limit_error because the error's model_ids still lists the batch-only id, while the deployment alone says all_deployments_in_cooldown. Vector store and container calls log a generic call type, so the fallback-hop cooldown with blocked failure callbacks and the public failure callback don't scope them to batch calls. Both are Low caveats below

Dependency graph. Verified live on both sides: chat, streaming, Responses, /v1/messages, embeddings, order, fallbacks, context window fallbacks, token counter, realtime pick, Azure pass-through, web search and Decisions filters, cooldowns from attempts, callbacks and pre-call refusals, health-check routing, allowed-fails safety net, tags, usage-based routing, weighted failover, batch, file, vector store and fine-tuning list calls, keys and spend logs

Not verified. Azure won't 429 a batch or file call on demand, so 401s and a pre-call refusal stood in. Realtime past the pick, fine-tuning job create, container file calls, a listed pass-through and the latency, complexity and cache-aware strategies were not driven

Type

🐛 Bug Fix

Caveats (if any)

Low

  • The pinned batch-only exception has no caller today. Dropping it would misroute any future pin
  • Realtime pre-call refusals still count the batch-only deployment for cooldowns, until a follow-up
  • The docs still call model_info.mode informational until a litellm-docs follow-up
  • Only router tests and probes prove the batch-call cooldown, since Azure won't 429 a batch call on demand
  • A chat call that team or PTU filters leave with only the batch-only deployment gets Azure's 400, as before
  • A batch or file call's cooldown on a lone chat deployment fires a cooldown alert while chat keeps using it
  • A mixed group's cooldown 429 says rate_limit_error, where the chat deployment alone says all_deployments_in_cooldown
  • A vector store failure on a fallback hop with blocked callbacks cools the chat deployment for chat, as before
  • rust-test and rust-wheel fail as on main, so router-core's tests ran only locally

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
Bugbot summary

[!NOTE]
High Risk
Changes core load-balancing, retry/failover, and cooldown semantics for all mixed Azure groups; misclassification of call types could misroute traffic or over-cool deployments.

Overview
Non-chat traffic on mixed Azure model groups no longer load-balances onto mode: batch deployments, which previously returned Azure 400s for chat, embeddings, and similar calls.

The Rust router gains a batch_api request flag (wired from Python via is_batch_api_call_type for batch, file, fine-tuning, vector store, and container call types). Candidate selection uses skips_batch_only to drop Azure batch-only deployments for ordinary calls when the group still has chat-capable peers; batch creates and resource-scoped APIs keep them. Retries, failover, and lone-deployment logic count only deployments that can serve the call type.

Cooldown behavior is call-type aware: failures on batch/file traffic beside a batch-only peer can cool only batch-related calls ({id}:batch-calls), while chat keeps using the chat deployment. Health and failure callbacks pass batch_api into report_failure so logged rate limits match routing.

Extensive Rust and router unit tests cover mixed groups, rate limits, pre-call checks, and context-window fallbacks.

Reviewed by Cursor Bugbot for commit 73934cc. Bugbot is set up for automated code reviews on this repo. Configure here.

… deployments in mixed groups

A model group that mixes an Azure chat deployment with an Azure mode: batch deployment load balanced chat, responses and every other non-batch call onto the batch-only deployment, which Azure answers with 400. Selection now skips Azure and azure_ai mode: batch deployments for any call outside the batch and file APIs while the group has another deployment, in the healthy set, the retry count and the order walk. Batch creates, retrieves, cancels and file calls still pick them, and a group of only batch deployments is unchanged.
…s, keep fine-tuning on batch deployments

A chat call on a group with one chat deployment and an Azure batch-only one
counted both, so one 429 cooled down the lone chat deployment and skipped
its retry. Retries and cooldowns now count only the deployments the call
can use, and fine-tuning job calls keep the batch deployment like the other
batch and file calls.
…ly_deployments_for_chat

# Conflicts:
#	litellm/rust/crates/router-core/src/select.rs
@veria-ai

veria-ai Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

PR overview

No security issues were found in this pull request.

Reviews

@mateo-berri

Copy link
Copy Markdown
Contributor

@greptileai

@greptile-apps

greptile-apps Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge, with no new actionable issues found.

Summary

Keeps non-batch calls off Azure batch-only deployments in mixed groups.

  • Mixed Azure groups keep ordinary calls off batch-only deployments.

No new actionable issues were found. Review used the full PR range because the current and previously reviewed commits have different merge bases.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    Request[Router call] --> Kind{Resource call or explicit pin?}
    Kind -->|Yes| Keep[Keep Azure batch-only deployments]
    Kind -->|No| Mixed{Group has another deployment?}
    Mixed -->|Yes| Skip[Remove Azure batch-only deployments]
    Mixed -->|No| Keep
    Keep --> Filters[Apply remaining checks]
    Skip --> Filters
    Filters --> Pick[Choose deployment]
    Pick --> Failure{Call fails?}
    Failure -->|Yes| Recovery[Use matching cooldown and retry counts]
    Recovery --> Filters
Loading

Reviews (7) · Last reviewed commit: "fix(router): treat the batch-only deploy..." · Reviewed by Greptile

@codecov

codecov Bot commented Nov 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

…atch deployments

A call pinned to a batch-only deployment keeps it. Vector store and container calls count as resource-scoped calls the batch deployment also takes, like file and fine-tuning calls

Team and routing-group cooldown counts, host failure reports and the mock rate-limit path now count only the deployments the call can use, so a lone chat deployment beside a batch-only one keeps single-deployment rules everywhere
@mateo-berri

Copy link
Copy Markdown
Contributor

@greptileai

A too-long prompt on a mixed group now takes its context window fallback
instead of a "no deployments" 429. Pre-call rate-limit refusals report
whether the call is a batch API call, so a chat deployment's cooldown
counts its batch peer only for calls that peer serves. Adds a direct
test of is_batch_api_call_type for the router coverage check.
@mateo-berri

Copy link
Copy Markdown
Contributor

@greptileai

Comment thread tests/unit/test_router/test_router.py Resolved
A cooldown now counts only the deployments that could take every call the
failing deployment serves, whatever call failed. A batch-only Azure
deployment never stands in for a chat one, so a rate-limited file or batch
call no longer cools the lone chat deployment and leaves chat with no
deployment. Failure reports drop the batch_api flag, which no longer
reaches the decision.
@mateo-berri

Copy link
Copy Markdown
Contributor

@greptileai

@greptile-apps

greptile-apps Bot commented Nov 22, 2026

Copy link
Copy Markdown
Contributor

Want your agent to iterate on Greptile's feedback? Try greploops.

…ly peer can take them

A 429 on a batch or file call against a deployment that is alone for chat
but has an Azure batch-only peer now cools it under a separate key that
only batch and file calls read. Chat keeps its only deployment, while batch
and file calls move to the peer instead of hitting the rate-limited one
again. Failure reports carry the batch_api flag again so host reports and
pre-call refusals make the same decision as the call loop.
@mateo-berri

Copy link
Copy Markdown
Contributor

@greptileai

A web search call the chat deployment cannot take used to leave only the
batch-only deployment, so it got Azure's 400. The skip is now decided on
the whole group first, so the call gets the same answer as the chat
deployment alone. Also marks three call loop tests with rstest and runs
cargo fmt.
@mateo-berri

Copy link
Copy Markdown
Contributor

@greptileai

… filter

Drop Azure batch-only deployments right where the skip is decided, so the
health check filter, the allowed-fails safety net, route fallback and the
pre-call, tag and usage pools see the group as if the chat deployment were
alone. Weighted failover no longer counts a batch-only deployment as one
left to try for a chat call, and a batch create refused by a pre-call check
counts as a batch call, so its cooldown stays scoped to batch and file calls.
@mateo-berri

Copy link
Copy Markdown
Contributor

@greptileai

@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.

Stale Bugbot comment from a previous run.

request.pass_through == Some(PassThrough::Listed) && !resolution.kind.is_single();
if !resolution.kind.is_single() && !listed {
all = without_batch_only_deployments(skip_batch_only, all);
}

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.

Pass-through still hits Azure batch-only

Medium Severity

The batch-only drop is skipped for PassThrough::Listed picks, so a sync pass-through chat (or other non-batch) call on a mixed Azure group can still land on the batch-only deployment and get Azure's 400. skips_batch_only is stored on the listed Candidates and the count_only path even filters healthy, but the listed pick itself never removes those deployments.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 73934cc. Configure here.

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.

A listed pass-through pick can't tell chat from batch or file calls, so it keeps the group as before, and only Vertex routes use it

@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!

1 issue from previous review remains unresolved.

Fix All in Cursor

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

Reviewed by Cursor Bugbot for commit 73934cc. 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 d8df91a into BerriAI:main Nov 23, 2026
70 of 72 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants