Skip to content

fix(responses): bill the provider-reported input on a cut bridged stream - #53394

Merged
mateo-berri merged 14 commits into
BerriAI:mainfrom
martenj4:litellm_responses_cut_stream_bills_provider_input
Nov 23, 2026
Merged

mateo-berri merged 14 commits into
BerriAI:mainfrom
martenj4:litellm_responses_cut_stream_bills_provider_input

Conversation

@martenj4

@martenj4 martenj4 commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Handwritten 1-3 sentence description

When a client drops a streaming /v1/responses call on Claude (Anthropic, Vertex AI, Azure AI or Bedrock invoke), or cancels a background response, the spend log now bills and prices the input and cache tokens the provider reported instead of LiteLLM's prompt estimate. The cut row is also marked as a client disconnect, like chat completions already do

Details

TLDR

Problem this solves:

  • A cut /v1/responses stream on Claude billed LiteLLM's prompt estimate and priced a cached prompt as plain input
  • The cut row had no 499 ClientDisconnected marker on /v1/responses
  • A stream cut before the first text logged no spend row

How it solves it:

  • Bill and price usage from every chunk the provider sent, not only relayed ones
  • Drop the output placeholder from Anthropic's first event
  • Bill a cut before the first text from the provider's first usage
  • Keep the response text to what the client received
  • Write the disconnect marker where /v1/responses logs from

User Flow

Before: a cut /v1/responses call on Claude bills a guess at the prompt, with any prompt cache ignored

  1. They send POST https://litellm-domain/v1/responses with "stream": true (or "background": true) to Claude
  2. Their app closes the stream after some text (or sends POST https://litellm-domain/v1/responses//cancel)
  3. GET https://litellm-domain/spend/logs?api_key= shows prompt_tokens below the provider's count, with no cache split
  4. The row has no error_information, so it looks like a finished call

After: the same cut call bills the provider's input and cache counts and is marked as cut

  1. They send the same POST https://litellm-domain/v1/responses
  2. Their app closes the stream (or cancels) at the same point
  3. GET https://litellm-domain/spend/logs?api_key= shows the provider's prompt and cached tokens
  4. The row carries error_information with code 499 and class ClientDisconnected
Decisions
  1. Where the cut call's usage comes from. The bridge only keeps the chunks it relayed, and Anthropic's input and cache counts come in a usage-only message_start chunk the stream wrapper keeps but never yields. Options were (a) make the wrapper yield usage-only chunks, which changes every chat stream consumer, (b) read usage off the logging object, which is only filled once the stream finishes, or (c) run the chunk builder over every chunk the wrapper kept and take only its usage. Chose (c). The response text still comes from the relayed chunks. The billed output is the provider's own output count when the stream carried one before the cut, and otherwise a count of the text the wrapper read. Gemini's running count includes the thinking tokens it bills as output, so a cut Gemini row now bills more output than before. Counting only the relayed text would drop output Gemini billed. If that second build fails, the bill built from the relayed chunks stands, so a cut call is never left unbilled. A cut before the bridge relayed any chunk (after message_start, before the first text) now bills from the kept chunks with no output text, where it used to log no row
  2. The cut row's price comes from the second build too. The first build already stored the estimate's price on the response, and the logger uses a stored price before it reprices the usage, so keeping only the new usage would log the right tokens at the estimate's price
  3. When the wrapper kept nothing extra (a provider that sends usage only at the end, like Mistral or Bedrock's default converse route), the cut call still bills the estimate, the same as before. A cut stream there has no provider count to bill
  4. The disconnect marker goes into litellm_metadata only when that dict is already non-empty. The spend log reads litellm_metadata whenever it is non-empty, so writing into an empty one would make it win over metadata and drop the key's tags. Copying the marker across in the spend-metadata merge instead would touch every route
  5. A non-dict metadata value is now skipped instead of raising. Before, the recorder assumed a dict and would throw on anything else during stream teardown
  6. Every route that logs from litellm_metadata now marks a cut stream, /v1/messages included, the same way the chat route already did. The alternative was to mark only /v1/responses, which would leave a cut /v1/messages row looking like a finished call. The row's status stays success, as on the chat route, since marking it failed would count a billed, partly answered call as a failed request
  7. A cancelled background response gets the same 499 ClientDisconnected marker as a dropped stream, since both go through the same teardown. When that teardown already billed the cut, the background task skips its own 499 failure log, so a cancel before any text writes one row instead of adding a second, failed one. A billed cancel then records like any other billed cut, one success row with the 499 marker. Running the failure hook too would write a second, failed row and count one call as both a success and a 499
  8. Which streams drop the placeholder output count in Anthropic's message_start, which the chunk builder replaces with a count of the text. Anthropic's stream parser now marks that chunk and the reset reads the mark, so it covers every stream that parser reads whatever the provider or model name, including Vertex AI, Azure AI, Bedrock invoke and its ARNs, Bedrock Mantle, Snowflake and OpenCode Go. A provider list plus a Claude model name missed the ARNs and OpenCode Go's other models. A lone usage event from any other parser keeps its count
  9. The cut bill is built with asyncio.to_thread, since rebuilding a long stream on the event loop would hold up every other request on that worker
  10. A client cut after a mid-stream fallback bills both deployments' partials, each at its own deployment's price. Both attempts share one logging object and the fallback changes its model, so the first deployment's partial is priced when the fallback starts. Its tokens, cache counts and price are then added to the fallback's with billed_for_every_round, the helper MCP rounds already bill with, and the summed price is also written as the row's usage cost. Before, the fallback wrapper summed only the token counts at the fallback's price and dropped the cache split. A deployment the cost map cannot price bills 0 and keeps the other side's cost breakdown. Each partial's price already holds the fixed fee from cost_margin_config, so the sum takes the first deployment's fee back off. A retry after a mid-stream break takes the same path and bills both attempts, since the provider charged for both. A fallback that runs to the end keeps the old sum, which is tracked separately. The row stays under the fallback's model, provider, deployment id and api_base, as a finished fallback does. That includes a cut while the fallback is still connecting, which bills only the first deployment's partial, at its own price. Moving the first deployment's labels back would mean writing the shared logging object from the disconnect thread while the router changes it
  11. The first deployment's partial is priced on the event loop when the fallback starts, not in a worker thread. A thread can outlive a client cancel and then write the shared logging object while the disconnect bill reads it. Pricing a real Anthropic partial of 1500 events (about 3.5k output tokens) held the loop 0.23 to 0.40 s, on top of the 0.37 to 0.45 s the base already spends there building the same partial's usage. It runs on every mid-stream break the router recovers from, fallback or retry, since a retry on another deployment would be mispriced the same way

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

Before ran on main at d1e9e7f034 and After at 4af80781bb0, with three fallback cells again at the tip 4972504cf82. Both used one config, 2 workers, their own Postgres and Redis, and real provider APIs. Each case cuts the client, asks the provider for its count, and reads the key's /spend/logs row. Full output, config and case script are in this gist

Shared setup (config, env, proxy start, per-case variables)

Env var names: ANTHROPIC_API_KEY, GEMINI_API_KEY, MISTRAL_API_KEY, OPENAI_API_KEY, VERTEXAI_PROJECT, GOOGLE_APPLICATION_CREDENTIALS, AZURE_FOUNDRY_API_BASE, AZURE_FOUNDRY_API_KEY, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN, LITELLM_MASTER_KEY, DATABASE_URL, REDIS_HOST, REDIS_PORT

model_list:
  - model_name: cutstream-haiku
    litellm_params:
      model: anthropic/claude-haiku-5-5
      api_key: os.environ/ANTHROPIC_API_KEY
  - model_name: cutstream-haiku-cached
    litellm_params:
      model: anthropic/claude-haiku-5-5
      api_key: os.environ/ANTHROPIC_API_KEY
      cache_control_injection_points:
        - location: message
          role: system
  - model_name: cutstream-gemini
    litellm_params:
      model: gemini/gemini-3.8-flash
      api_key: os.environ/GEMINI_API_KEY
  - model_name: cutstream-mistral
    litellm_params:
      model: mistral/mistral-small-latest
      api_key: os.environ/MISTRAL_API_KEY
  - model_name: cutstream-vertex-haiku
    litellm_params:
      model: vertex_ai/claude-haiku-5-5
      vertex_project: os.environ/VERTEXAI_PROJECT
      vertex_location: global
      vertex_credentials: os.environ/GOOGLE_APPLICATION_CREDENTIALS
  - model_name: cutstream-haiku-stall
    litellm_params:
      model: anthropic/claude-haiku-5-5
      api_key: os.environ/ANTHROPIC_API_KEY
      api_base: http://127.0.0.1:23471
  - model_name: cutstream-azure-haiku
    litellm_params:
      model: azure_ai/claude-haiku-4-5
      api_base: os.environ/AZURE_FOUNDRY_API_BASE
      api_key: os.environ/AZURE_FOUNDRY_API_KEY
  - model_name: cutstream-bedrock-invoke-haiku
    litellm_params:
      model: bedrock/invoke/us.anthropic.claude-haiku-5-5
      aws_region_name: us-east-1
  - model_name: cutstream-bedrock-converse-haiku
    litellm_params:
      model: bedrock/us.anthropic.claude-haiku-5-5
      aws_region_name: us-east-1
  - model_name: gemini-3.8-flash
    litellm_params:
      model: gemini/gemini-3.8-flash
      api_key: os.environ/GEMINI_API_KEY
  - model_name: cutstream-haiku-drop
    litellm_params:
      model: anthropic/claude-haiku-5-5
      api_key: os.environ/ANTHROPIC_API_KEY
      api_base: http://127.0.0.1:21873
  - model_name: cutstream-haiku-drop-direct
    litellm_params:
      model: anthropic/claude-haiku-5-5
      api_key: os.environ/ANTHROPIC_API_KEY
      api_base: http://127.0.0.1:21873
  - model_name: cutstream-haiku-drop-openai
    litellm_params:
      model: anthropic/claude-haiku-5-5
      api_key: os.environ/ANTHROPIC_API_KEY
      api_base: http://127.0.0.1:21873
  - model_name: cutstream-openai
    litellm_params:
      model: openai/gpt-5.4-mini
router_settings:
  num_retries: 0
  disable_cooldowns: true
  fallbacks:
    - cutstream-haiku-drop: ["cutstream-haiku-stall"]
    - cutstream-haiku-drop-direct: ["cutstream-haiku"]
    - cutstream-haiku-drop-openai: ["cutstream-openai"]
general_settings:
  master_key: os.environ/LITELLM_MASTER_KEY
  store_prompts_in_spend_logs: true
  database_url: os.environ/DATABASE_URL
  coordination_redis:
    host: os.environ/REDIS_HOST
    port: os.environ/REDIS_PORT
litellm_settings:
  responses:
    background_mode:
      polling_via_cache: all
  cost_margin_config:
    global:
      fixed_amount: 0.001
    openai:
      fixed_amount: 0.0005

cutstream-haiku-stall goes through stall_relay.py from the gist on port 23471. It forwards each call to api.anthropic.com, logs every event it relays, and holds the stream for 10 seconds after message_start, so a client that gives up after 4 seconds is cut before any text

cutstream-haiku-drop goes through drop_relay.py from the gist on port 21873. It forwards each call to api.anthropic.com and closes the connection 1 second after message_start, so the router falls back to cutstream-haiku-stall, or to cutstream-haiku for cutstream-haiku-drop-direct, and to OpenAI's cutstream-openai for cutstream-haiku-drop-openai. After ran with the cost_margin_config above. Before ran without it, except the fallback and fee rows, which charged the global $0.001 on every provider. The full config.yaml in the gist adds the custom-price and free deployments its extra rows use

python stall_relay.py 23471 10 stall_relay.log &
python drop_relay.py 21873 https://api.anthropic.com drop 1 drop_relay.log 1 &
python litellm/proxy/proxy_cli.py --config config.yaml --host 127.0.0.1 --port $PORT --num_workers 2 --timeout_worker_healthcheck 60 --telemetry False --use_prisma_db_push
B=http://127.0.0.1:$PORT
ADMIN="Authorization: Bearer $LITELLM_MASTER_KEY"
USAGE_COST='sort_by(.startTime)[-1].metadata.usage_object.cost'
AV='anthropic-version: 2023-06-01'
KEY=$(curl -s $B/key/generate -H "$ADMIN" -H 'Content-Type: application/json' -d '{}' | jq -r .key)
COUNT='{"model":"claude-haiku-5-5","messages":[{"role":"user","content":"Write a 1500 word story about a lighthouse."}]}'
F='status, prompt_tokens, completion_tokens, spend, cached: .metadata.usage_object.prompt_tokens_details.cached_tokens, cache_write: .metadata.usage_object.prompt_tokens_details.cache_creation_tokens, error: .metadata.error_information.error_class'
ROW="sort_by(.startTime)[] | {call_type, $F}"
ROW_MODEL="sort_by(.startTime)[] | {call_type, model_group, $F}"
ROW_FEE="sort_by(.startTime)[] | {call_type, model_group, $F, fee: .metadata.cost_breakdown.margin_total_amount, breakdown_total: .metadata.cost_breakdown.total_cost}"

Cells are the cut row's billed prompt tokens out of the provider's count, on /v1/responses unless the row names another route

Case Before billed After billed Before 499 After 499
Anthropic 17 of 25 25 of 25 no yes
Anthropic, cut before any text no row 25 of 25 no yes
Background cancel, Anthropic 17 of 25 25 of 25 no yes
Background cancel before any text 19 of 25 at $0 25 of 25 as a failure yes
Cache write, then read 13257 of 21660 21660 of 21660 no yes
History resent, turn 3 90 of 121 121 of 121 no yes
previous_response_id, turn 3 22 of 122 122 of 122 no yes
Vertex AI Claude 17 of 25 25 of 25 no yes
Azure AI Claude 17 of 19 19 of 19 no yes
Bedrock invoke 19 of 25 25 of 25 no yes
Bedrock converse 19 of 25 19 of 25 no yes
Gemini 19 of 14 14 of 14 no yes
Mistral 19 of 29 19 of 29 no yes
Chat streams, Anthropic, Vertex AI and Bedrock invoke 25 of 25 25 of 25 yes yes
Messages stream, Anthropic 25 of 25 25 of 25 no yes
Fallback and fixed fee rows
Case Before billed After billed Before 499 After 499
Fallback, then cut before any text no row 50 of 50 no yes
Background cancel after a fallback 44 of 50, as a failure 50 of 50 no yes
Fixed fee, fallback, cut after text 17 of 50 50 of 50 no yes
Fixed fee, fallback to OpenAI, cut after text 18 of 43 43 of 43 no yes
Fixed fee, cut after text 17 of 25 25 of 25 no yes
Cut while the fallback is still connecting no row 25 of 25 no yes
Reading the rows

After spend is the billed tokens at the cost map's price plus the fixed fee. The cached turns split into 21637 cache-write and then 21637 cache-read tokens, matching Anthropic's message_start. On the cut Vertex AI and Bedrock chat streams, Before billed Anthropic's 2-token placeholder and After billed 12 and 58, a count of the text each read. After bills 0 output tokens on the cut before any text. The fallback row adds the dropped first deployment's 25 input tokens to the fallback's 25 and prices both. On the fixed fee rows the fee is charged once, and both the cost breakdown's total and the row's usage cost match the spend. The OpenAI fallback row bills Claude's 25 input tokens plus OpenAI's 18, and OpenAI's $0.0005 fee once. A cut while the fallback is still connecting bills the first deployment's 25 input tokens at its own $0.00002 price plus the $0.001 fee, where Before wrote no row

Before (d1e9e7f)

Responses stream, Anthropic
$ BODY='{"model":"cutstream-haiku","input":"Write a 1500 word story about a lighthouse.","stream":true}'
$ curl -sN $B/v1/responses -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" -d "$BODY" | head -c 6000 | grep -c "output_text.delta"
22
$ curl -s https://api.anthropic.com/v1/messages/count_tokens -H "x-api-key: $ANTHROPIC_API_KEY" -H "$AV" -H "content-type: application/json" -d "$COUNT"
{"input_tokens":25}
$ curl -s "$B/spend/logs?api_key=$KEY" -H "$ADMIN" | jq -c "$ROW"
{"call_type":"aresponses","status":"success","prompt_tokens":17,"completion_tokens":128,"spend":0.0000657,"cached":null,"cache_write":null,"error":null}
Responses stream cut before any text
$ BODY='{"model":"cutstream-haiku-stall","input":"Write a 1500 word story about a lighthouse.","stream":true}'
$ curl -sN --max-time 4 $B/v1/responses -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" -d "$BODY" | sed -n "s/^data: //p" | jq -r .type | sort | uniq -c
the relay in front of api.anthropic.com holds the stream for 10s after message_start, its log for this call:
04:52:11Z POST /v1/messages forwarded to https://api.anthropic.com
04:52:11Z relayed message_start {"input_tokens": 25, "cache_creation_input_tokens": 0, "cache_read_input_tokens": 0, "cache_creation": {"ephemeral_5m_input_tokens": 0, "ephemeral_1h_input_tokens": 0}, "output_tokens": 7, "service_tier": "standard", "inference_geo": "global", "speed": "standard"}
04:52:11Z holding the rest of the stream for 10s
$ curl -s https://api.anthropic.com/v1/messages/count_tokens -H "x-api-key: $ANTHROPIC_API_KEY" -H "$AV" -H "content-type: application/json" -d "$COUNT"
{"input_tokens":25}
$ curl -s "$B/spend/logs?api_key=$KEY" -H "$ADMIN" | jq -c "$ROW"
Background cancel, Anthropic
$ BODY='{"model":"cutstream-haiku","input":"Write a 1500 word story about a lighthouse.","background":true}'
$ ID=$(curl -s $B/v1/responses -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" -d "$BODY" | jq -r .id); echo $ID
litellm_poll_c028cb2c-306a-45f4-a2e8-e50ac09b5850
polled GET http://127.0.0.1:23204/v1/responses/$ID until the output held 307 characters
$ curl -s -X POST $B/v1/responses/$ID/cancel -H "Authorization: Bearer $KEY" | jq -c "{status}"
{"status":"cancelled"}
$ curl -s https://api.anthropic.com/v1/messages/count_tokens -H "x-api-key: $ANTHROPIC_API_KEY" -H "$AV" -H "content-type: application/json" -d "$COUNT"
{"input_tokens":25}
$ curl -s "$B/spend/logs?api_key=$KEY" -H "$ADMIN" | jq -c "$ROW"
{"call_type":"aresponses","status":"success","prompt_tokens":17,"completion_tokens":212,"spend":0.0001077,"cached":null,"cache_write":null,"error":null}
Cache write and cache read turns
$ wc -w < $OUT/instructions.txt
10016
$ BODY=$(jq -nc --rawfile i $OUT/instructions.txt --arg s "Write a 1500 word story about a lighthouse." '{model:"cutstream-haiku-cached",instructions:$i,input:$s,stream:true}')
turn A (writes the cache), cut right after the first text delta
$ curl -sN $B/v1/responses -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" -d "$BODY" | sed -n "/^data: .*output_text.delta/{p;q;}" | jq -Rc "sub(\"^data: \"; \"\") | fromjson | {type, delta}"
{"type":"response.output_text.delta","delta":"# The"}
turn B (reads the cache), cut right after the first text delta
$ curl -sN $B/v1/responses -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" -d "$BODY" | sed -n "/^data: .*output_text.delta/{p;q;}" | jq -Rc "sub(\"^data: \"; \"\") | fromjson | {type, delta}"
{"type":"response.output_text.delta","delta":"#"}
direct Anthropic stream with the same cached system prompt, message_start usage
$ curl -sN https://api.anthropic.com/v1/messages -H "x-api-key: $ANTHROPIC_API_KEY" -H "$AV" -H "content-type: application/json" -d "$DIRECT" | sed -n "s/^data: //p" | jq -c "select(.type==\"message_start\") | .message.usage | {input_tokens, cache_read_input_tokens, cache_creation_input_tokens}"
{"input_tokens":23,"cache_read_input_tokens":21637,"cache_creation_input_tokens":0}
$ curl -s "$B/spend/logs?api_key=$KEY" -H "$ADMIN" | jq -c "$ROW"
{"call_type":"aresponses","status":"success","prompt_tokens":13257,"completion_tokens":3,"spend":0.0013272,"cached":null,"cache_write":null,"error":null}
{"call_type":"aresponses","status":"success","prompt_tokens":13257,"completion_tokens":6,"spend":0.0013287,"cached":null,"cache_write":null,"error":null}
Responses stream, Vertex AI Claude
$ BODY='{"model":"cutstream-vertex-haiku","input":"Write a 1500 word story about a lighthouse.","stream":true}'
$ curl -sN $B/v1/responses -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" -d "$BODY" | head -c 6000 | grep -c "output_text.delta"
21
$ curl -s "https://aiplatform.googleapis.com/v1/projects/$VERTEX_PROJECT/locations/global/publishers/anthropic/models/count-tokens:rawPredict" -H "Authorization: Bearer $VTOK" -H "content-type: application/json" -d "$COUNT"
{"input_tokens":25}
$ curl -s "$B/spend/logs?api_key=$KEY" -H "$ADMIN" | jq -c "$ROW"
{"call_type":"aresponses","status":"success","prompt_tokens":17,"completion_tokens":55,"spend":0.0000292,"cached":null,"cache_write":null,"error":null}
Responses stream, Azure AI Claude
$ BODY='{"model":"cutstream-azure-haiku","input":"Write a 1500 word story about a lighthouse.","stream":true}'
$ curl -sN $B/v1/responses -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" -d "$BODY" | head -c 6000 | grep -c "output_text.delta"
30
$ curl -sN $FOUNDRY_ROOT/anthropic/v1/messages -H "x-api-key: $AZURE_FOUNDRY_API_KEY" -H "$AV" -H "content-type: application/json" -d "$DIRECT" | sed -n "s/^data: //p" | jq -c "select(.type==\"message_start\") | .message.usage | {input_tokens, output_tokens}"
{"input_tokens":19,"output_tokens":1}
$ curl -s "$B/spend/logs?api_key=$KEY" -H "$ADMIN" | jq -c "$ROW"
{"call_type":"aresponses","status":"success","prompt_tokens":17,"completion_tokens":42,"spend":0.000227,"cached":null,"cache_write":null,"error":null}
Responses stream, Bedrock invoke
$ BODY='{"model":"cutstream-bedrock-invoke-haiku","input":"Write a 1500 word story about a lighthouse.","stream":true}'
$ curl -sN $B/v1/responses -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" -d "$BODY" | head -c 6000 | grep -c "output_text.delta"
20
$ curl -s "https://bedrock-runtime.us-east-1.amazonaws.com/model/$TARGET/invoke" --aws-sigv4 "aws:amz:us-east-1:bedrock" --user "$AWS_ACCESS_KEY_ID:$AWS_SECRET_ACCESS_KEY" -H "x-amz-security-token: $AWS_SESSION_TOKEN" -H "content-type: application/json" -d "$DIRECT" | jq -c ".usage | {input_tokens, output_tokens}"
{"input_tokens":25,"output_tokens":1}
$ curl -s "$B/spend/logs?api_key=$KEY" -H "$ADMIN" | jq -c "$ROW"
{"call_type":"aresponses","status":"success","prompt_tokens":19,"completion_tokens":111,"spend":0.00006314000000000001,"cached":null,"cache_write":null,"error":null}
Responses stream, Bedrock converse
$ BODY='{"model":"cutstream-bedrock-converse-haiku","input":"Write a 1500 word story about a lighthouse.","stream":true}'
$ curl -sN $B/v1/responses -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" -d "$BODY" | head -c 6000 | grep -c "output_text.delta"
20
$ curl -s "https://bedrock-runtime.us-east-1.amazonaws.com/model/$TARGET/invoke" --aws-sigv4 "aws:amz:us-east-1:bedrock" --user "$AWS_ACCESS_KEY_ID:$AWS_SECRET_ACCESS_KEY" -H "x-amz-security-token: $AWS_SESSION_TOKEN" -H "content-type: application/json" -d "$DIRECT" | jq -c ".usage | {input_tokens, output_tokens}"
{"input_tokens":25,"output_tokens":1}
$ curl -s "$B/spend/logs?api_key=$KEY" -H "$ADMIN" | jq -c "$ROW"
{"call_type":"aresponses","status":"success","prompt_tokens":19,"completion_tokens":55,"spend":0.00003234,"cached":null,"cache_write":null,"error":null}
Responses stream, Gemini
$ BODY='{"model":"cutstream-gemini","input":"Write a 1500 word story about a lighthouse.","stream":true}'
$ curl -sN $B/v1/responses -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" -d "$BODY" | head -c 6000 | grep -c "output_text.delta"
23
$ curl -s https://generativelanguage.googleapis.com/v1beta/models/gemini-3.8-flash:countTokens -H "x-goog-api-key: $GEMINI_API_KEY" -H "content-type: application/json" -d "$GCOUNT" | jq -c .
{"totalTokens":14,"promptTokensDetails":[{"modality":"TEXT","tokenCount":14}]}
$ curl -s "$B/spend/logs?api_key=$KEY" -H "$ADMIN" | jq -c "$ROW"
{"call_type":"aresponses","status":"success","prompt_tokens":19,"completion_tokens":332,"spend":0.00125925,"cached":null,"cache_write":null,"error":null}
Responses stream, Mistral
$ BODY='{"model":"cutstream-mistral","input":"Write a 1500 word story about a lighthouse.","stream":true}'
$ curl -sN $B/v1/responses -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" -d "$BODY" | head -c 6000 | grep -c "output_text.delta"
32
$ curl -s https://api.mistral.ai/v1/chat/completions -H "Authorization: Bearer $MISTRAL_API_KEY" -H "content-type: application/json" -d "$MCOUNT" | jq -c .usage
{"prompt_tokens":29,"total_tokens":30,"completion_tokens":1,"prompt_tokens_details":{"cached_tokens":0},"completion_tokens_details":{"reasoning_tokens":0},"service_tier":"standard"}
$ curl -s "$B/spend/logs?api_key=$KEY" -H "$ADMIN" | jq -c "$ROW"
{"call_type":"aresponses","status":"success","prompt_tokens":19,"completion_tokens":36,"spend":0.00002445,"cached":null,"cache_write":null,"error":null}
Chat stream, Anthropic
$ BODY='{"model":"cutstream-haiku","stream":true,"messages":[{"role":"user","content":"Write a 1500 word story about a lighthouse."}]}'
$ curl -sN $B/v1/chat/completions -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" -d "$BODY" | head -c 3000 | grep -c "^data:"
1
$ curl -s https://api.anthropic.com/v1/messages/count_tokens -H "x-api-key: $ANTHROPIC_API_KEY" -H "$AV" -H "content-type: application/json" -d "$COUNT"
{"input_tokens":25}
$ curl -s "$B/spend/logs?api_key=$KEY" -H "$ADMIN" | jq -c "$ROW"
{"call_type":"acompletion","status":"success","prompt_tokens":25,"completion_tokens":4,"spend":0.000004499999999999999,"cached":0,"cache_write":0,"error":"ClientDisconnected"}
Chat stream, Vertex AI Claude
$ BODY='{"model":"cutstream-vertex-haiku","stream":true,"messages":[{"role":"user","content":"Write a 1500 word story about a lighthouse."}]}'
$ curl -sN $B/v1/chat/completions -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" -d "$BODY" | head -c 3000 | grep -c "^data:"
1
$ curl -s "https://aiplatform.googleapis.com/v1/projects/$VERTEX_PROJECT/locations/global/publishers/anthropic/models/count-tokens:rawPredict" -H "Authorization: Bearer $VTOK" -H "content-type: application/json" -d "$COUNT"
{"input_tokens":25}
$ curl -s "$B/spend/logs?api_key=$KEY" -H "$ADMIN" | jq -c "$ROW"
{"call_type":"acompletion","status":"success","prompt_tokens":25,"completion_tokens":2,"spend":0.0000035,"cached":0,"cache_write":0,"error":"ClientDisconnected"}
Chat stream, Bedrock invoke
$ BODY='{"model":"cutstream-bedrock-invoke-haiku","stream":true,"messages":[{"role":"user","content":"Write a 1500 word story about a lighthouse."}]}'
$ curl -sN $B/v1/chat/completions -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" -d "$BODY" | head -c 3000 | grep -c "^data:"
1
$ curl -s "https://bedrock-runtime.us-east-1.amazonaws.com/model/$TARGET/invoke" --aws-sigv4 "aws:amz:us-east-1:bedrock" --user "$AWS_ACCESS_KEY_ID:$AWS_SECRET_ACCESS_KEY" -H "x-amz-security-token: $AWS_SESSION_TOKEN" -H "content-type: application/json" -d "$DIRECT" | jq -c ".usage | {input_tokens, output_tokens}"
{"input_tokens":25,"output_tokens":1}
$ curl -s "$B/spend/logs?api_key=$KEY" -H "$ADMIN" | jq -c "$ROW"
{"call_type":"acompletion","status":"success","prompt_tokens":25,"completion_tokens":2,"spend":0.00000385,"cached":0,"cache_write":0,"error":"ClientDisconnected"}
Messages stream, Anthropic
$ BODY='{"model":"cutstream-haiku","max_tokens":4096,"stream":true,"messages":[{"role":"user","content":"Write a 1500 word story about a lighthouse."}]}'
$ curl -sN $B/v1/messages -H "Authorization: Bearer $KEY" -H "$AV" -H "Content-Type: application/json" -d "$BODY" | head -c 6000 | grep -c "content_block_delta"
7
$ curl -s https://api.anthropic.com/v1/messages/count_tokens -H "x-api-key: $ANTHROPIC_API_KEY" -H "$AV" -H "content-type: application/json" -d "$COUNT"
{"input_tokens":25}
$ curl -s "$B/spend/logs?api_key=$KEY" -H "$ADMIN" | jq -c "$ROW"
{"call_type":"anthropic_messages","status":"success","prompt_tokens":25,"completion_tokens":10,"spend":0.000007499999999999999,"cached":0,"cache_write":0,"error":null}
Interactions stream, Gemini
$ BODY='{"model":"gemini-3.8-flash","input":"Write a 1500 word story about a lighthouse.","stream":true}'
$ curl -sN $B/v1beta/interactions -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" -d "$BODY" | sed -n "/\"type\":\"text\"/{p;q;}" | sed -n "s/^data: //p" | jq -c "{event_type, text: .delta.text}"
{"event_type":"step.delta","text":"The tower did not sit upon the rock; it seemed"}
$ curl -s "$B/spend/logs?api_key=$KEY" -H "$ADMIN" | jq -c "$ROW"
Background cancel before any text
$ BODY='{"model":"cutstream-haiku-stall","input":"Write a 1500 word story about a lighthouse.","background":true}'
$ ID=$(curl -s $B/v1/responses -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" -d "$BODY" | jq -r .id)
$ curl -s -X POST $B/v1/responses/$ID/cancel -H "Authorization: Bearer $KEY" | jq -c "{status}"
{"status":"cancelled"}
$ curl -s "$B/spend/logs?api_key=$KEY" -H "$ADMIN" | jq -c "$ROW_MODEL"
{"call_type":"aresponses","model_group":"cutstream-haiku-stall","status":"failure","prompt_tokens":19,"completion_tokens":0,"spend":0.0,"cached":null,"cache_write":null,"error":"HTTPException"}
$ curl -s "$B/key/info?key=$KEY" -H "$ADMIN" | jq .info.spend
0.0
the stall relay's log, it holds the stream for 10s after message_start:
09:16:56Z POST /v1/messages forwarded to https://api.anthropic.com
09:16:57Z relayed message_start {"input_tokens": 25, ...}
09:16:57Z holding the rest of the stream for 10s
09:17:07Z proxy closed the connection
Background cancel after some text
$ BODY='{"model":"cutstream-haiku","input":"Write a 1500 word story about a lighthouse.","background":true}'
$ ID=$(curl -s $B/v1/responses -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" -d "$BODY" | jq -r .id)
polled GET $B/v1/responses/$ID until the output held 328 characters
$ curl -s -X POST $B/v1/responses/$ID/cancel -H "Authorization: Bearer $KEY" | jq -c "{status}"
{"status":"cancelled"}
$ curl -s "$B/spend/logs?api_key=$KEY" -H "$ADMIN" | jq -c "$ROW_MODEL"
{"call_type":"aresponses","model_group":"cutstream-haiku","status":"success","prompt_tokens":17,"completion_tokens":160,"spend":0.0000817,"cached":null,"cache_write":null,"error":null}
$ curl -s "$B/key/info?key=$KEY" -H "$ADMIN" | jq .info.spend
0.0000817
Fallback, then cut before any text
$ BODY='{"model":"cutstream-haiku-drop","input":"Write a 1500 word story about a lighthouse.","stream":true}'
$ curl -sN --max-time 4 $B/v1/responses -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" -d "$BODY" | wc -c
0
$ curl -s "$B/spend/logs?api_key=$KEY" -H "$ADMIN" | jq -c "$ROW_FEE"
$ curl -s "$B/key/info?key=$KEY" -H "$ADMIN" | jq .info.spend
0.0
the stall relay's log, it holds the stream for 10s after message_start:
17:03:03Z POST /v1/messages forwarded to https://api.anthropic.com
17:03:03Z relayed message_start {"input_tokens": 25, ...}
17:03:03Z holding the rest of the stream for 10s
17:03:13Z proxy closed the connection
the drop relay's log, it closes the connection 1s after message_start:
17:03:02Z POST /v1/messages forwarded to https://api.anthropic.com body_bytes=185
17:03:02Z relayed message_start {"input_tokens": 25, ...}
17:03:03Z dropping the connection after 1 events
Fixed fee, fallback, then cut after some text
$ BODY='{"model":"cutstream-haiku-drop-direct","input":"Write a 1500 word story about a lighthouse.","stream":true}'
$ curl -sN $B/v1/responses -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" -d "$BODY" | head -c 6000 | grep -c output_text.delta
20
$ curl -s "$B/spend/logs?api_key=$KEY" -H "$ADMIN" | jq -c "$ROW_FEE"
{"call_type":"aresponses","model_group":"cutstream-haiku","status":"success","prompt_tokens":17,"completion_tokens":43,"spend":0.0010232,"cached":null,"cache_write":null,"error":null,"fee":0.001,"breakdown_total":0.0010232}
$ curl -s "$B/key/info?key=$KEY" -H "$ADMIN" | jq .info.spend
0.0010232
the drop relay's log, it closes the connection 1s after message_start:
15:25:00Z POST /v1/messages forwarded to https://api.anthropic.com body_bytes=185
15:25:00Z relayed message_start {"input_tokens": 25, ...}
15:25:01Z dropping the connection after 1 events
Fixed fee, Claude falls back to OpenAI, then cut after some text
$ BODY='{"model":"cutstream-haiku-drop-openai","input":"Write a 1500 word story about a lighthouse.","stream":true}'
$ curl -sN $B/v1/responses -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" -d "$BODY" | head -c 6000 | grep -c output_text.delta
16
$ curl -s "$B/spend/logs?api_key=$KEY" -H "$ADMIN" | jq -c "$ROW_FEE"
{"call_type":"aresponses","model_group":"cutstream-openai","status":"success","prompt_tokens":18,"completion_tokens":137,"spend":0.00163,"cached":null,"cache_write":null,"error":null,"fee":0.001,"breakdown_total":0.00163}
$ curl -s "$B/key/info?key=$KEY" -H "$ADMIN" | jq .info.spend
0.00163
the drop relay's log, it closes the connection 1s after message_start:
16:15:37Z POST /v1/messages forwarded to https://api.anthropic.com body_bytes=185
16:15:37Z relayed message_start {"input_tokens": 25, ...}
16:15:38Z dropping the connection after 1 events
Fixed fee, cut after some text
$ BODY='{"model":"cutstream-haiku","input":"Write a 1500 word story about a lighthouse.","stream":true}'
$ curl -sN $B/v1/responses -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" -d "$BODY" | head -c 6000 | grep -c output_text.delta
22
$ curl -s "$B/spend/logs?api_key=$KEY" -H "$ADMIN" | jq -c "$ROW_FEE"
{"call_type":"aresponses","model_group":"cutstream-haiku","status":"success","prompt_tokens":17,"completion_tokens":50,"spend":0.0010267,"cached":null,"cache_write":null,"error":null,"fee":0.001,"breakdown_total":0.0010267}
$ curl -s "$B/key/info?key=$KEY" -H "$ADMIN" | jq .info.spend
0.0010267
Cut while the fallback is still connecting, on the /live-pr-risk rig at fd0ee2c
lpr-custom-drop-ttfb: Claude at $0.00002 per input token behind the drop relay, falls back to lpr-delay-haiku
lpr-delay-haiku: Claude behind a relay that holds each request 12s before forwarding it
$ BODY='{"model":"lpr-custom-drop-ttfb","input":"Write a 1500 word story about a lighthouse.","stream":true}'
$ curl -sN --max-time 6 $B/v1/responses -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" -d "$BODY" > stream.txt; echo "curl exit: $?"
curl exit: 28
$ wc -c < stream.txt
0
$ curl -s "$B/spend/logs?api_key=$KEY" -H "$ADMIN" | jq -c "$ROW_FEE"
$ curl -s "$B/key/info?key=$KEY" -H "$ADMIN" | jq .info.spend
0.0
the drop relay's log, it closes the connection 1s after message_start:
00:54:45Z POST /v1/messages forwarded to https://api.anthropic.com body_bytes=185
00:54:46Z relayed message_start {"input_tokens": 25, ...}
00:54:47Z dropping the connection after 1 events
the delay relay's log:
00:54:48Z POST /v1/messages received
00:54:48Z holding it 12s before forwarding

After (4af8078)

Carry from 4af8078 to the tip 4972504

The tip 4972504cf82 changes one thing after 4af80781bb0. When a fallback has connected, the summed price is also written as the row's usage cost. The three fallback cells below that connect a fallback ran again at that tip and now also read the row's usage cost, which matches the spend. A background cancel after a fallback ran on both sides too, and its cells are in the gist. The other cells carry from 4af80781bb0 because none of them reaches the fallback merge that commit changed. Focused checks at the tip were the 20 affected test files (2519 passed) and make check

Responses stream, Anthropic
$ BODY='{"model":"cutstream-haiku","input":"Write a 1500 word story about a lighthouse.","stream":true}'
$ curl -sN $B/v1/responses -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" -d "$BODY" | head -c 6000 | grep -c "output_text.delta"
23
$ curl -s https://api.anthropic.com/v1/messages/count_tokens -H "x-api-key: $ANTHROPIC_API_KEY" -H "$AV" -H "content-type: application/json" -d "$COUNT"
{"input_tokens":25}
$ curl -s "$B/spend/logs?api_key=$KEY" -H "$ADMIN" | jq -c "$ROW"
{"call_type":"aresponses","status":"success","prompt_tokens":25,"completion_tokens":39,"spend":0.001022,"cached":0,"cache_write":0,"error":"ClientDisconnected"}
Responses stream cut before any text
$ BODY='{"model":"cutstream-haiku-stall","input":"Write a 1500 word story about a lighthouse.","stream":true}'
$ curl -sN --max-time 4 $B/v1/responses -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" -d "$BODY" | sed -n "s/^data: //p" | jq -r .type | sort | uniq -c
the relay in front of api.anthropic.com holds the stream for 10s after message_start, its log for this call:
23:47:05Z POST /v1/messages forwarded to https://api.anthropic.com
23:47:06Z relayed message_start {"input_tokens": 25, ...}
23:47:06Z holding the rest of the stream for 10s
23:47:16Z proxy closed the connection
$ curl -s https://api.anthropic.com/v1/messages/count_tokens -H "x-api-key: $ANTHROPIC_API_KEY" -H "$AV" -H "content-type: application/json" -d "$COUNT"
{"input_tokens":25}
$ curl -s "$B/spend/logs?api_key=$KEY" -H "$ADMIN" | jq -c "$ROW"
{"call_type":"aresponses","status":"success","prompt_tokens":25,"completion_tokens":0,"spend":0.0010025,"cached":0,"cache_write":0,"error":"ClientDisconnected"}
Background cancel, Anthropic
$ BODY='{"model":"cutstream-haiku","input":"Write a 1500 word story about a lighthouse.","background":true}'
$ ID=$(curl -s $B/v1/responses -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" -d "$BODY" | jq -r .id); echo $ID
litellm_poll_7c1ec487-caf6-4153-85b6-13002ef6cf5b
polled GET http://127.0.0.1:26732/v1/responses/$ID until the output held 529 characters
$ curl -s -X POST $B/v1/responses/$ID/cancel -H "Authorization: Bearer $KEY" | jq -c "{status}"
{"status":"cancelled"}
$ curl -s https://api.anthropic.com/v1/messages/count_tokens -H "x-api-key: $ANTHROPIC_API_KEY" -H "$AV" -H "content-type: application/json" -d "$COUNT"
{"input_tokens":25}
$ curl -s "$B/spend/logs?api_key=$KEY" -H "$ADMIN" | jq -c "$ROW"
{"call_type":"aresponses","status":"success","prompt_tokens":25,"completion_tokens":262,"spend":0.0011335,"cached":0,"cache_write":0,"error":"ClientDisconnected"}
Cache write and cache read turns
$ wc -w < $OUT/instructions.txt
10016
$ BODY=$(jq -nc --rawfile i $OUT/instructions.txt --arg s "Write a 1500 word story about a lighthouse." '{model:"cutstream-haiku-cached",instructions:$i,input:$s,stream:true}')
turn A (writes the cache), cut right after the first text delta
$ curl -sN $B/v1/responses -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" -d "$BODY" | sed -n "/^data: .*output_text.delta/{p;q;}" | jq -Rc "sub(\"^data: \"; \"\") | fromjson | {type, delta}"
{"type":"response.output_text.delta","delta":"#"}
turn B (reads the cache), cut right after the first text delta
$ curl -sN $B/v1/responses -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" -d "$BODY" | sed -n "/^data: .*output_text.delta/{p;q;}" | jq -Rc "sub(\"^data: \"; \"\") | fromjson | {type, delta}"
{"type":"response.output_text.delta","delta":"#"}
direct Anthropic stream with the same cached system prompt, message_start usage
$ curl -sN https://api.anthropic.com/v1/messages -H "x-api-key: $ANTHROPIC_API_KEY" -H "$AV" -H "content-type: application/json" -d "$DIRECT" | sed -n "s/^data: //p" | jq -c "select(.type==\"message_start\") | .message.usage | {input_tokens, cache_read_input_tokens, cache_creation_input_tokens}"
{"input_tokens":23,"cache_read_input_tokens":21637,"cache_creation_input_tokens":0}
$ curl -s "$B/spend/logs?api_key=$KEY" -H "$ADMIN" | jq -c "$ROW"
{"call_type":"aresponses","status":"success","prompt_tokens":21660,"completion_tokens":6,"spend":0.003709925,"cached":0,"cache_write":21637,"error":"ClientDisconnected"}
{"call_type":"aresponses","status":"success","prompt_tokens":21660,"completion_tokens":3,"spend":0.00122017,"cached":21637,"cache_write":0,"error":"ClientDisconnected"}
Responses stream, Vertex AI Claude
$ BODY='{"model":"cutstream-vertex-haiku","input":"Write a 1500 word story about a lighthouse.","stream":true}'
$ curl -sN $B/v1/responses -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" -d "$BODY" | head -c 6000 | grep -c "output_text.delta"
22
$ curl -s "https://aiplatform.googleapis.com/v1/projects/$VERTEX_PROJECT/locations/global/publishers/anthropic/models/count-tokens:rawPredict" -H "Authorization: Bearer $VTOK" -H "content-type: application/json" -d "$COUNT"
{"input_tokens":25}
$ curl -s "$B/spend/logs?api_key=$KEY" -H "$ADMIN" | jq -c "$ROW"
{"call_type":"aresponses","status":"success","prompt_tokens":25,"completion_tokens":30,"spend":0.0010175,"cached":0,"cache_write":0,"error":"ClientDisconnected"}
Responses stream, Azure AI Claude
$ BODY='{"model":"cutstream-azure-haiku","input":"Write a 1500 word story about a lighthouse.","stream":true}'
$ curl -sN $B/v1/responses -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" -d "$BODY" | head -c 6000 | grep -c "output_text.delta"
30
$ curl -sN $FOUNDRY_ROOT/anthropic/v1/messages -H "x-api-key: $AZURE_FOUNDRY_API_KEY" -H "$AV" -H "content-type: application/json" -d "$DIRECT" | sed -n "s/^data: //p" | jq -c "select(.type==\"message_start\") | .message.usage | {input_tokens, output_tokens}"
{"input_tokens":19,"output_tokens":1}
$ curl -s "$B/spend/logs?api_key=$KEY" -H "$ADMIN" | jq -c "$ROW"
{"call_type":"aresponses","status":"success","prompt_tokens":19,"completion_tokens":41,"spend":0.001224,"cached":0,"cache_write":0,"error":"ClientDisconnected"}
Responses stream, Bedrock invoke
$ BODY='{"model":"cutstream-bedrock-invoke-haiku","input":"Write a 1500 word story about a lighthouse.","stream":true}'
$ curl -sN $B/v1/responses -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" -d "$BODY" | head -c 6000 | grep -c "output_text.delta"
20
$ curl -s "https://bedrock-runtime.us-east-1.amazonaws.com/model/$TARGET/invoke" --aws-sigv4 "aws:amz:us-east-1:bedrock" --user "$AWS_ACCESS_KEY_ID:$AWS_SECRET_ACCESS_KEY" -H "x-amz-security-token: $AWS_SESSION_TOKEN" -H "content-type: application/json" -d "$DIRECT" | jq -c ".usage | {input_tokens, output_tokens}"
{"input_tokens":25,"output_tokens":1}
$ curl -s "$B/spend/logs?api_key=$KEY" -H "$ADMIN" | jq -c "$ROW"
{"call_type":"aresponses","status":"success","prompt_tokens":25,"completion_tokens":59,"spend":0.0010352,"cached":0,"cache_write":0,"error":"ClientDisconnected"}
Responses stream, Bedrock converse
$ BODY='{"model":"cutstream-bedrock-converse-haiku","input":"Write a 1500 word story about a lighthouse.","stream":true}'
$ curl -sN $B/v1/responses -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" -d "$BODY" | head -c 6000 | grep -c "output_text.delta"
20
$ curl -s "https://bedrock-runtime.us-east-1.amazonaws.com/model/$TARGET/invoke" --aws-sigv4 "aws:amz:us-east-1:bedrock" --user "$AWS_ACCESS_KEY_ID:$AWS_SECRET_ACCESS_KEY" -H "x-amz-security-token: $AWS_SESSION_TOKEN" -H "content-type: application/json" -d "$DIRECT" | jq -c ".usage | {input_tokens, output_tokens}"
{"input_tokens":25,"output_tokens":1}
$ curl -s "$B/spend/logs?api_key=$KEY" -H "$ADMIN" | jq -c "$ROW"
{"call_type":"aresponses","status":"success","prompt_tokens":19,"completion_tokens":89,"spend":0.00105104,"cached":null,"cache_write":null,"error":"ClientDisconnected"}
Responses stream, Gemini
$ BODY='{"model":"cutstream-gemini","input":"Write a 1500 word story about a lighthouse.","stream":true}'
$ curl -sN $B/v1/responses -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" -d "$BODY" | head -c 6000 | grep -c "output_text.delta"
22
$ curl -s https://generativelanguage.googleapis.com/v1beta/models/gemini-3.8-flash:countTokens -H "x-goog-api-key: $GEMINI_API_KEY" -H "content-type: application/json" -d "$GCOUNT" | jq -c .
{"totalTokens":14,"promptTokensDetails":[{"modality":"TEXT","tokenCount":14}]}
$ curl -s "$B/spend/logs?api_key=$KEY" -H "$ADMIN" | jq -c "$ROW"
{"call_type":"aresponses","status":"success","prompt_tokens":14,"completion_tokens":1454,"spend":0.006463,"cached":0,"cache_write":null,"error":"ClientDisconnected"}
Responses stream, Mistral
$ BODY='{"model":"cutstream-mistral","input":"Write a 1500 word story about a lighthouse.","stream":true}'
$ curl -sN $B/v1/responses -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" -d "$BODY" | head -c 6000 | grep -c "output_text.delta"
32
$ curl -s https://api.mistral.ai/v1/chat/completions -H "Authorization: Bearer $MISTRAL_API_KEY" -H "content-type: application/json" -d "$MCOUNT" | jq -c .usage
{"prompt_tokens":29,"total_tokens":30,"completion_tokens":1,"prompt_tokens_details":{"cached_tokens":0},"completion_tokens_details":{"reasoning_tokens":0},"service_tier":"standard"}
$ curl -s "$B/spend/logs?api_key=$KEY" -H "$ADMIN" | jq -c "$ROW"
{"call_type":"aresponses","status":"success","prompt_tokens":19,"completion_tokens":41,"spend":0.00102745,"cached":null,"cache_write":null,"error":"ClientDisconnected"}
Chat stream, Anthropic
$ BODY='{"model":"cutstream-haiku","stream":true,"messages":[{"role":"user","content":"Write a 1500 word story about a lighthouse."}]}'
$ curl -sN $B/v1/chat/completions -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" -d "$BODY" | head -c 3000 | grep -c "^data:"
1
$ curl -s https://api.anthropic.com/v1/messages/count_tokens -H "x-api-key: $ANTHROPIC_API_KEY" -H "$AV" -H "content-type: application/json" -d "$COUNT"
{"input_tokens":25}
$ curl -s "$B/spend/logs?api_key=$KEY" -H "$ADMIN" | jq -c "$ROW"
{"call_type":"acompletion","status":"success","prompt_tokens":25,"completion_tokens":5,"spend":0.001005,"cached":0,"cache_write":0,"error":"ClientDisconnected"}
Chat stream, Vertex AI Claude
$ BODY='{"model":"cutstream-vertex-haiku","stream":true,"messages":[{"role":"user","content":"Write a 1500 word story about a lighthouse."}]}'
$ curl -sN $B/v1/chat/completions -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" -d "$BODY" | head -c 3000 | grep -c "^data:"
1
$ curl -s "https://aiplatform.googleapis.com/v1/projects/$VERTEX_PROJECT/locations/global/publishers/anthropic/models/count-tokens:rawPredict" -H "Authorization: Bearer $VTOK" -H "content-type: application/json" -d "$COUNT"
{"input_tokens":25}
$ curl -s "$B/spend/logs?api_key=$KEY" -H "$ADMIN" | jq -c "$ROW"
{"call_type":"acompletion","status":"success","prompt_tokens":25,"completion_tokens":12,"spend":0.0010085,"cached":0,"cache_write":0,"error":"ClientDisconnected"}
Chat stream, Bedrock invoke
$ BODY='{"model":"cutstream-bedrock-invoke-haiku","stream":true,"messages":[{"role":"user","content":"Write a 1500 word story about a lighthouse."}]}'
$ curl -sN $B/v1/chat/completions -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" -d "$BODY" | head -c 3000 | grep -c "^data:"
1
$ curl -s "https://bedrock-runtime.us-east-1.amazonaws.com/model/$TARGET/invoke" --aws-sigv4 "aws:amz:us-east-1:bedrock" --user "$AWS_ACCESS_KEY_ID:$AWS_SECRET_ACCESS_KEY" -H "x-amz-security-token: $AWS_SESSION_TOKEN" -H "content-type: application/json" -d "$DIRECT" | jq -c ".usage | {input_tokens, output_tokens}"
{"input_tokens":25,"output_tokens":1}
$ curl -s "$B/spend/logs?api_key=$KEY" -H "$ADMIN" | jq -c "$ROW"
{"call_type":"acompletion","status":"success","prompt_tokens":25,"completion_tokens":58,"spend":0.00103465,"cached":0,"cache_write":0,"error":"ClientDisconnected"}
Messages stream, Anthropic
$ BODY='{"model":"cutstream-haiku","max_tokens":4096,"stream":true,"messages":[{"role":"user","content":"Write a 1500 word story about a lighthouse."}]}'
$ curl -sN $B/v1/messages -H "Authorization: Bearer $KEY" -H "$AV" -H "Content-Type: application/json" -d "$BODY" | head -c 6000 | grep -c "content_block_delta"
37
$ curl -s https://api.anthropic.com/v1/messages/count_tokens -H "x-api-key: $ANTHROPIC_API_KEY" -H "$AV" -H "content-type: application/json" -d "$COUNT"
{"input_tokens":25}
$ curl -s "$B/spend/logs?api_key=$KEY" -H "$ADMIN" | jq -c "$ROW"
{"call_type":"anthropic_messages","status":"success","prompt_tokens":25,"completion_tokens":40,"spend":0.0010225,"cached":0,"cache_write":0,"error":"ClientDisconnected"}
Interactions stream, Gemini
$ BODY='{"model":"gemini-3.8-flash","input":"Write a 1500 word story about a lighthouse.","stream":true}'
$ curl -sN $B/v1beta/interactions -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" -d "$BODY" | sed -n "/\"type\":\"text\"/{p;q;}" | sed -n "s/^data: //p" | jq -c "{event_type, text: .delta.text}"
{"event_type":"step.delta","text":"The granite of the Old Head did not negotiate with the Atlantic. For two hundred years, it had stood like"}
$ curl -s "$B/spend/logs?api_key=$KEY" -H "$ADMIN" | jq -c "$ROW"
Background cancel before any text
$ BODY='{"model":"cutstream-haiku-stall","input":"Write a 1500 word story about a lighthouse.","background":true}'
$ ID=$(curl -s $B/v1/responses -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" -d "$BODY" | jq -r .id)
$ curl -s -X POST $B/v1/responses/$ID/cancel -H "Authorization: Bearer $KEY" | jq -c "{status}"
{"status":"cancelled"}
$ curl -s "$B/spend/logs?api_key=$KEY" -H "$ADMIN" | jq -c "$ROW_MODEL"
{"call_type":"aresponses","model_group":"cutstream-haiku-stall","status":"success","prompt_tokens":25,"completion_tokens":0,"spend":0.0010025,"cached":0,"cache_write":0,"error":"ClientDisconnected"}
$ curl -s "$B/key/info?key=$KEY" -H "$ADMIN" | jq .info.spend
0.0010025
the stall relay's log, it holds the stream for 10s after message_start:
23:55:32Z POST /v1/messages forwarded to https://api.anthropic.com
23:55:32Z relayed message_start {"input_tokens": 25, ...}
23:55:32Z holding the rest of the stream for 10s
23:55:42Z proxy closed the connection
Background cancel after some text
$ BODY='{"model":"cutstream-haiku","input":"Write a 1500 word story about a lighthouse.","background":true}'
$ ID=$(curl -s $B/v1/responses -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" -d "$BODY" | jq -r .id)
polled GET $B/v1/responses/$ID until the output held 1442 characters
$ curl -s -X POST $B/v1/responses/$ID/cancel -H "Authorization: Bearer $KEY" | jq -c "{status}"
{"status":"cancelled"}
$ curl -s "$B/spend/logs?api_key=$KEY" -H "$ADMIN" | jq -c "$ROW_MODEL"
{"call_type":"aresponses","model_group":"cutstream-haiku","status":"success","prompt_tokens":25,"completion_tokens":459,"spend":0.001232,"cached":0,"cache_write":0,"error":"ClientDisconnected"}
$ curl -s "$B/key/info?key=$KEY" -H "$ADMIN" | jq .info.spend
0.001232
Fallback, then cut before any text
$ BODY='{"model":"cutstream-haiku-drop","input":"Write a 1500 word story about a lighthouse.","stream":true}'
$ curl -sN --max-time 4 $B/v1/responses -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" -d "$BODY" | wc -c
0
$ curl -s "$B/spend/logs?api_key=$KEY" -H "$ADMIN" | jq -c "$ROW_FEE"
{"call_type":"aresponses","model_group":"cutstream-haiku-stall","status":"success","prompt_tokens":50,"completion_tokens":0,"spend":0.001005,"cached":0,"cache_write":0,"error":"ClientDisconnected","fee":0.001,"breakdown_total":0.0010049999999999998}
$ curl -s "$B/spend/logs?api_key=$KEY" -H "$ADMIN" | jq "$USAGE_COST"
0.0010049999999999998
$ curl -s "$B/key/info?key=$KEY" -H "$ADMIN" | jq .info.spend
0.001005
the stall relay's log, it holds the stream for 10s after message_start:
03:33:48Z POST /v1/messages forwarded to https://api.anthropic.com
03:33:49Z relayed message_start {"input_tokens": 25, ...}
03:33:49Z holding the rest of the stream for 10s
03:33:59Z proxy closed the connection
the drop relay's log, it closes the connection 1s after message_start:
03:33:46Z POST /v1/messages forwarded to https://api.anthropic.com body_bytes=185
03:33:47Z relayed message_start {"input_tokens": 25, ...}
03:33:48Z dropping the connection after 1 events
Fixed fee, fallback, then cut after some text
$ BODY='{"model":"cutstream-haiku-drop-direct","input":"Write a 1500 word story about a lighthouse.","stream":true}'
$ curl -sN $B/v1/responses -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" -d "$BODY" | head -c 6000 | grep -c output_text.delta
20
$ curl -s "$B/spend/logs?api_key=$KEY" -H "$ADMIN" | jq -c "$ROW_FEE"
{"call_type":"aresponses","model_group":"cutstream-haiku","status":"success","prompt_tokens":50,"completion_tokens":48,"spend":0.001029,"cached":0,"cache_write":0,"error":"ClientDisconnected","fee":0.001,"breakdown_total":0.001029}
$ curl -s "$B/spend/logs?api_key=$KEY" -H "$ADMIN" | jq "$USAGE_COST"
0.001029
$ curl -s "$B/key/info?key=$KEY" -H "$ADMIN" | jq .info.spend
0.001029
the drop relay's log, it closes the connection 1s after message_start:
03:34:06Z POST /v1/messages forwarded to https://api.anthropic.com body_bytes=185
03:34:06Z relayed message_start {"input_tokens": 25, ...}
03:34:07Z dropping the connection after 1 events
Fixed fee, Claude falls back to OpenAI, then cut after some text
$ BODY='{"model":"cutstream-haiku-drop-openai","input":"Write a 1500 word story about a lighthouse.","stream":true}'
$ curl -sN $B/v1/responses -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" -d "$BODY" | head -c 6000 | grep -c output_text.delta
16
$ curl -s "$B/spend/logs?api_key=$KEY" -H "$ADMIN" | jq -c "$ROW_FEE"
{"call_type":"aresponses","model_group":"cutstream-openai","status":"success","prompt_tokens":43,"completion_tokens":149,"spend":0.0011865,"cached":0,"cache_write":0,"error":"ClientDisconnected","fee":0.0005,"breakdown_total":0.0011865}
$ curl -s "$B/spend/logs?api_key=$KEY" -H "$ADMIN" | jq "$USAGE_COST"
0.0011865
$ curl -s "$B/key/info?key=$KEY" -H "$ADMIN" | jq .info.spend
0.0011865
the drop relay's log, it closes the connection 1s after message_start:
03:34:31Z POST /v1/messages forwarded to https://api.anthropic.com body_bytes=185
03:34:31Z relayed message_start {"input_tokens": 25, ...}
03:34:32Z dropping the connection after 1 events
Fixed fee, cut after some text
$ BODY='{"model":"cutstream-haiku","input":"Write a 1500 word story about a lighthouse.","stream":true}'
$ curl -sN $B/v1/responses -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" -d "$BODY" | head -c 6000 | grep -c output_text.delta
22
$ curl -s "$B/spend/logs?api_key=$KEY" -H "$ADMIN" | jq -c "$ROW_FEE"
{"call_type":"aresponses","model_group":"cutstream-haiku","status":"success","prompt_tokens":25,"completion_tokens":47,"spend":0.001026,"cached":0,"cache_write":0,"error":"ClientDisconnected","fee":0.001,"breakdown_total":0.001026}
$ curl -s "$B/key/info?key=$KEY" -H "$ADMIN" | jq .info.spend
0.001026
Cut while the fallback is still connecting, on the /live-pr-risk rig at 4af8078
lpr-custom-drop-ttfb: Claude at $0.00002 per input token behind the drop relay, falls back to lpr-delay-haiku
lpr-delay-haiku: Claude behind a relay that holds each request 12s before forwarding it
$ BODY='{"model":"lpr-custom-drop-ttfb","input":"Write a 1500 word story about a lighthouse.","stream":true}'
$ curl -sN --max-time 6 $B/v1/responses -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" -d "$BODY" > stream.txt; echo "curl exit: $?"
curl exit: 28
$ wc -c < stream.txt
0
$ curl -s "$B/spend/logs?api_key=$KEY" -H "$ADMIN" | jq -c "$ROW_FEE"
{"call_type":"aresponses","model_group":"lpr-delay-haiku","status":"success","prompt_tokens":25,"completion_tokens":0,"spend":0.0015,"cached":0,"cache_write":0,"error":"ClientDisconnected","fee":0.001,"breakdown_total":0.0015}
$ curl -s "$B/key/info?key=$KEY" -H "$ADMIN" | jq .info.spend
0.0015
the drop relay's log, it closes the connection 1s after message_start:
00:56:43Z POST /v1/messages forwarded to https://api.anthropic.com body_bytes=185
00:56:43Z relayed message_start {"input_tokens": 25, ...}
00:56:44Z dropping the connection after 1 events
the delay relay's log:
00:56:45Z POST /v1/messages received
00:56:45Z holding it 12s before forwarding

Type

🐛 Bug Fix

Caveats (if any)

Medium

  • The 499 disconnect marker now also lands on /v1/messages and other litellm_metadata routes
    • Callbacks get error_information 499 on success rows, which can change alerts and dashboards
    • Decision 6 chose this, though the ask covers only /v1/responses
  • A cut stream bills what the provider generated, not what the client got
    • A cut Gemini stream billed 1449 output tokens, up from 332 (Decision 1)
  • Some cut streams still bill the estimate or nothing, as before this PR
    • Bedrock converse and Mistral bill 19 prompt tokens where the provider reported 25 and 29
    • A cut /v1beta/interactions stream writes no spend row, tracked separately

Low

  • A cut before any text can log text the client never saw but the provider billed
  • Cut Vertex AI and Bedrock Claude chat streams bill a count of the text read, not the placeholder
  • The new marker writer stays separate from speech's record_client_disconnect
  • is_str_keyed_dict is reused from the guardrail cost module. Moving it is a separate refactor
  • Decisions 7, 9 and 10 cover the background cancel log, the thread hop, and a finished fallback
  • The cut row stays under the fallback's model, while each deployment bills at its own price (Decision 10)
  • A mid-stream fallback now holds the event loop 0.2 to 0.4 s longer (Decision 11)
  • If either side lacks a cost breakdown, the fixed fee may be charged twice. No live cell hit it

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]
Medium Risk
Changes core spend logging, token usage assembly, and multi-deployment fallback billing on client disconnect—high customer impact but scoped to streaming teardown paths with broad test coverage.

Overview
Cut /v1/responses streams now bill and price using all provider chunks the wrapper kept (not only what was relayed), so Anthropic message_start input and cache counts apply even when the client disconnects before the first text. Output drops the message_start placeholder via an anthropic_message_start hidden marker for every stream parsed from Anthropic SSE (including Bedrock, Vertex, Azure, etc.).

Proxy disconnect handling writes the 499 ClientDisconnected marker into the metadata spend logging actually reads, builds partial disconnect bills on a worker thread, and skips a second failure hook when background streaming already billed the call.

Mid-stream router fallbacks on Responses snapshot and merge primary and fallback partial usage/cost (fixed margin once), using pricing_left_unrecorded so probe pricing does not pollute logged breakdowns. MCP round billing now deducts the first round’s fixed margin instead of the minimum of both.

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

A /v1/responses stream that runs through the chat bridge and is cut mid-answer now bills the input and cache counts the provider sent before the cut, and the spend row carries the 499 ClientDisconnected marker that /v1/responses reads from litellm_metadata
@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

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

Summary

Cut Responses streams now bill retained provider usage, preserve cache counts, and record the disconnect. Fallback partials keep each deployment’s price.

  • Cut Responses streams bill the usage providers already sent.
  • Disconnected streams now leave a 499 marker in spend logs.
  • A cut after a fallback bills each deployment's partial work once.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Client disconnects] --> B[Build partial response]
  B --> C{Fallback partial exists?}
  C -->|No| D[Use current deployment bill]
  C -->|Yes| E[Add deployment usage and prices]
  E --> F[Charge fixed fee once]
  F --> G[Copy usage and stamp combined cost]
  D --> H[Write disconnect spend row]
  G --> H
Loading

Reviews (8) · Last reviewed commit: "fix(router): report a cut fallback's bil..." · Reviewed by Greptile

…stream

The cut partial took its usage from the rebuild over every kept chunk but kept
the response_cost the first build stamped from the estimate, and the logger
uses a stamped cost before it prices the usage. The partial now carries the
rebuild's cost along with its usage.
@mateo-berri

Copy link
Copy Markdown
Contributor

@greptileai

…thropic's parser reads

Anthropic's stream parser marks its message_start chunk, and the placeholder reset reads that mark
instead of a provider list plus a Claude model name. Bedrock application inference profile ARNs and
OpenCode Go's non-Claude models stream Anthropic's events too, and kept the 1-token output placeholder
on a cut stream before.
…_stream_bills_provider_input

# Conflicts:
#	litellm/llms/anthropic/chat/handler.py
A client that drops a bridged /v1/responses stream after the provider's first usage event but before any text logged no spend row, since the partial response was built only from relayed chunks. The partial now falls back to the chunks the stream wrapper kept, so the row bills the provider's input and cache counts with no output text
A cancelled background response whose stream teardown had already billed the cut also logged a second, failed 499 row. The background task now skips its own failure log once the teardown billed. A client cut after a mid-stream fallback billed both deployments' tokens at the fallback's price with no cache split, and now sums both partials' tokens, cache counts and cost the way MCP rounds are billed
…tream

Each deployment's partial price already includes the fixed fee from cost_margin_config, so adding the first deployment's price to the fallback's charged that fee twice. The sum now takes off one fee, and the logged cost breakdown matches the billed total
@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

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

A client cut after a mid-stream fallback now prices the first deployment's
partial when the fallback starts, before the fallback changes the shared
logging object's model, so its tokens keep their own price. An unpriced
deployment bills nothing and keeps the other side's cost breakdown. The
fixed fee is charged once at the final round's amount, and a fallback that
fails after the cut leaves no breakdown from the first deployment's partial.
@mateo-berri

Copy link
Copy Markdown
Contributor

@greptileai

Comment thread litellm/router_rust/invoke/streaming.py Resolved
@mateo-berri

Copy link
Copy Markdown
Contributor

bugbot run

@codecov

codecov Bot commented Nov 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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

…_stream_bills_provider_input

# Conflicts:
#	litellm/llms/anthropic/chat/handler.py
@mateo-berri

Copy link
Copy Markdown
Contributor

@greptileai

Comment thread litellm/router_rust/invoke/streaming.py Resolved
@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.

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

✅ 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 4972504. 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 b099ac8 into BerriAI:main Nov 23, 2026
66 checks passed
narmstrong-berri added a commit that referenced this pull request Nov 24, 2026
…our (#54223)

Main's rust-wheel job fails 10 tests in tests/test_litellm_rust/messages,
each pinned to behaviour a later PR changed on purpose. The stub check
failed first until #53922, so the pytest step never reported them.

Credential failures on Bedrock invoke and Mantle now answer a 401
AuthenticationError with the botocore error as its context (#53362). A
200 Bedrock stream whose body is JSON answers BedrockError 502 (#53482).
A cut Bedrock stream drops the message_start output placeholder and
re-counts the streamed text (#53394). Logging copies the resolved
provider into litellm_params before callbacks run (#52709)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants