Skip to content

fix(responses): announce every reasoning run the bridge streams, not only the first - #45300

Open
devin-ai-integration[bot] wants to merge 2 commits into
mainfrom
litellm_responses_bridge_reasoning_after_tool_call
Open

devin-ai-integration[bot] wants to merge 2 commits into
mainfrom
litellm_responses_bridge_reasoning_after_tool_call

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

TLDR

Problem this solves:

  • The Responses bridge announced only the first reasoning item of a stream
  • Reasoning after a tool call or after text streamed deltas at an index nobody announced, or into a reasoning item already closed
  • The OpenAI SDK 2.x responses.stream crashed with IndexError on that hole; SDK 3.x passed through deltas for an item it never saw added or closed
  • response.completed listed a reasoning item the stream never announced, or dropped the second run

How it solves it:

  • Reasoning is tracked per run, each run with its own item id and output index
  • A reasoning delta with no open run announces a new reasoning item first
  • Each run closes with its own done events, on the sync and the async stream alike
  • A run still open when the stream ends is closed before the final events, so reasoning in the last chunk gets its done events too
  • response.completed lists one reasoning item per run, signed thinking blocks split by the run that streamed them
  • Thinking blocks no run signed go to the first reasoning item, the same place the single item put them before this change; dropping them would lose a signature the next turn has to replay, and the last run is no better a guess than the first

User Flow

Before: a developer streaming /v1/responses through the gateway to a provider that thinks again after a tool call (Claude with web search and reasoning here) gets reasoning deltas for an item the stream never announces or closes

  1. They call client.responses.stream(model="claude-sonnet-5-5", input=..., tools=[{"type": "web_search_preview"}], reasoning={"effort": "high"}) with the OpenAI Python SDK, which sends POST https://litellm-domain/v1/responses with "stream": true
  2. The stream returns response.created, then response.reasoning_summary_text.delta events at output_index 1 for a reasoning item rs_…, with no response.output_item.added for that item before them
  3. No response.reasoning_summary_text.done or response.output_item.done ever arrives for that item; the stream announces the message at output_index 2 and streams its text
  4. response.completed lists a reasoning item the stream never announced or closed, so an app that renders items as they are added shows the answer with no reasoning (a function tool call followed by reasoning does the same and crashes the OpenAI SDK 2.x with IndexError: list index out of range at the message; reasoning, a tool call, then reasoning again streams the second run's delta into the first reasoning item after it was closed, and response.completed lists one reasoning item for two runs)

After: the same request announces each reasoning item before its deltas, closes it, and completes with the items the stream announced

  1. They call client.responses.stream(model="claude-sonnet-5-5", input=..., tools=[{"type": "web_search_preview"}], reasoning={"effort": "high"}) with the OpenAI Python SDK, which sends POST https://litellm-domain/v1/responses with "stream": true
  2. The stream returns response.created, then response.output_item.added for a reasoning item at output_index 1, then its response.reasoning_summary_text.delta events carrying that item's id
  3. response.reasoning_summary_text.done and response.output_item.done close the reasoning item, then the stream announces the message at output_index 2 and streams its text
  4. response.completed lists the web search call, the reasoning item, and the message under the ids and indexes the stream announced, so the app shows the reasoning and the answer (a function tool call followed by reasoning streams and completes the same way, on SDK 2.x too; reasoning, a tool call, then reasoning again gives two reasoning items with distinct ids, each announced and closed on its own)

Pre-Submission checklist

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

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

Screenshots / Proof of Fix

Setup shared by both legs. One proxy per leg, booted with python litellm/proxy/proxy_cli.py --config config.yaml --port <random port> --num_workers 2 (2 uvicorn workers, Before at the merge base on port 52187, After at the tip on port 46396, run one after the other on the same machine). The client is the OpenAI Python SDK 3.26.0 (pip install openai today) driving client.responses.stream against http://127.0.0.1:<port>/v1. The bridge iterator only serves /v1/responses streaming, so that is the one endpoint under test. The live provider case is Anthropic claude-sonnet-5-5 with web_search_preview and reasoning.effort high, the only shape in which a real provider thinks again after a tool call inside one stream (costs real $$$). The three other cases go through the same gateway and client to a scripted chat-completions upstream that replays a fixed delta sequence (a deepseek/ alias, so the request takes the bridge), because no live provider thinks again after a client-side function tool call inside one stream; they are the shapes the new unit tests cover, seen from the client.

config.yaml:

model_list:
  - model_name: claude-sonnet-5-5
    litellm_params:
      model: anthropic/claude-sonnet-5-5
      api_key: os.environ/ANTHROPIC_API_KEY
  - model_name: tool-then-reasoning
    litellm_params:
      model: deepseek/tool-then-reasoning
      api_base: http://127.0.0.1:22312
      api_key: scripted
  - model_name: reasoning-tool-reasoning
    litellm_params:
      model: deepseek/reasoning-tool-reasoning
      api_base: http://127.0.0.1:22312
      api_key: scripted
  - model_name: text-then-reasoning
    litellm_params:
      model: deepseek/text-then-reasoning
      api_base: http://127.0.0.1:22312
      api_key: scripted
litellm_settings:
  drop_params: true

Scripted upstream deltas, in order per model: tool-then-reasoning sends a get_weather tool call, then reasoning_content, then text; reasoning-tool-reasoning sends reasoning_content, the tool call, reasoning_content again, then text; text-then-reasoning sends text, then reasoning_content, then text.

client_stream.py (TOOLS is one get_weather function tool taking a city string):

import json
import os
import sys
from typing import Final

from openai import OpenAI

PORT: Final = sys.argv[1]
MODEL: Final = sys.argv[2]
PROMPT: Final = sys.argv[3] if len(sys.argv) > 3 else "hello"
TOOLS: Final = json.loads(sys.argv[4]) if len(sys.argv) > 4 else None
EXTRA: Final = json.loads(sys.argv[5]) if len(sys.argv) > 5 else {}

client: Final = OpenAI(base_url=f"http://127.0.0.1:{PORT}/v1", api_key=os.environ["LITELLM_MASTER_KEY"])
kwargs: Final = {"model": MODEL, "input": PROMPT, **({"tools": TOOLS} if TOOLS else {}), **EXTRA}
with client.responses.stream(**kwargs) as stream:
    for event in stream:
        kind: Final = event.type
        if kind in ("response.output_item.added", "response.output_item.done"):
            print(f"{kind:40s} output_index={event.output_index} item={event.item.type} id={event.item.id}")
        elif kind in ("response.reasoning_summary_text.delta", "response.output_text.delta", "response.function_call_arguments.delta"):
            print(f"{kind:40s} output_index={event.output_index} item_id={event.item_id} delta={event.delta!r}")
        elif kind in ("response.reasoning_summary_text.done", "response.reasoning_summary_part.done"):
            print(f"{kind:40s} output_index={event.output_index} item_id={event.item_id}")
    final: Final = stream.get_final_response()
print("final output:", [(item.type, item.id) for item in final.output])

Before (03ba79d)

Claude web search, then reasoning (live Anthropic)

  1. python client_stream.py 52187 claude-sonnet-5-5 "Use web search once to find the current population of Iceland from a reliable source. After reading the result, reason step by step about how many years at 1% annual growth it would take to reach half a million, then answer in one sentence." '[{"type":"web_search_preview"}]' '{"reasoning":{"effort":"high"},"max_output_tokens":6000}'
  2. Observed (15 reasoning deltas at output_index 1 for rs_6ca9d47c… with no response.output_item.added before them and no reasoning_summary_text.done or output_item.done after; response.completed lists that reasoning item anyway):
response.reasoning_summary_text.delta    output_index=1 item_id=rs_6ca9d47c-724a-4ea3-ba92-ad163b57c694 x15, first delta='Using Statistics I'
response.output_item.added               output_index=2 item=message id=msg_d941fa96-3e8c-4f8b-bb8f-cc4c405997eb
response.output_text.delta               output_index=2 item_id=msg_d941fa96-3e8c-4f8b-bb8f-cc4c405997eb x64, first delta='Stat'
response.output_item.added               output_index=0 item=web_search_call id=ws_srvtoolu_014GGVCwYAjaXLbXDqWGnkds
response.output_item.done                output_index=0 item=web_search_call id=ws_srvtoolu_014GGVCwYAjaXLbXDqWGnkds
response.output_item.done                output_index=2 item=message id=msg_d941fa96-3e8c-4f8b-bb8f-cc4c405997eb
final output: [('web_search_call', 'ws_srvtoolu_014GGVCwYAjaXLbXDqWGnkds'), ('reasoning', 'rs_6ca9d47c-724a-4ea3-ba92-ad163b57c694'), ('message', 'msg_d941fa96-3e8c-4f8b-bb8f-cc4c405997eb')]

Function tool call, then reasoning (scripted upstream)

  1. python client_stream.py 52187 tool-then-reasoning "What is the weather in Reykjavik?" "$TOOLS" '{}'
  2. Observed (the reasoning delta at output_index 1 is never announced or closed; response.completed lists the reasoning item the stream never announced):
response.output_item.added               output_index=0 item=function_call id=fc_call_weather_1
response.function_call_arguments.delta   output_index=0 item_id=fc_call_weather_1 x2, first delta='{"city":"R'
response.reasoning_summary_text.delta    output_index=1 item_id=rs_9c8739e5-1288-4c79-a3f4-f200993dee8c delta='I called the weather tool; now I weigh the answer.'
response.output_item.added               output_index=2 item=message id=msg_c8553295-6c9d-4657-bfd4-2885fe22ba0c
response.output_text.delta               output_index=2 item_id=msg_c8553295-6c9d-4657-bfd4-2885fe22ba0c x2, first delta='Reykjavik is '
response.output_item.done                output_index=0 item=function_call id=fc_call_weather_1
response.output_item.done                output_index=2 item=message id=msg_c8553295-6c9d-4657-bfd4-2885fe22ba0c
final output: [('function_call', 'fc_call_weather_1'), ('reasoning', 'rs_9c8739e5-1288-4c79-a3f4-f200993dee8c'), ('message', 'msg_c8553295-6c9d-4657-bfd4-2885fe22ba0c')]

Reasoning, tool call, reasoning again (scripted upstream)

  1. python client_stream.py 52187 reasoning-tool-reasoning "What is the weather in Reykjavik?" "$TOOLS" '{}'
  2. Observed (the second reasoning run's delta lands in the first reasoning item (output_index 0, rs_18080366…) after that item was already closed, and response.completed lists one reasoning item for two runs):
response.output_item.added               output_index=0 item=reasoning id=rs_18080366-d0f0-4b8e-8b09-05484f4dc8c3
response.reasoning_summary_text.delta    output_index=0 item_id=rs_18080366-d0f0-4b8e-8b09-05484f4dc8c3 delta='First I decide which tool to call.'
response.reasoning_summary_text.done     output_index=0 item_id=rs_18080366-d0f0-4b8e-8b09-05484f4dc8c3
response.reasoning_summary_part.done     output_index=0 item_id=rs_18080366-d0f0-4b8e-8b09-05484f4dc8c3
response.output_item.done                output_index=0 item=reasoning id=rs_18080366-d0f0-4b8e-8b09-05484f4dc8c3
response.output_item.added               output_index=1 item=function_call id=fc_call_weather_1
response.function_call_arguments.delta   output_index=1 item_id=fc_call_weather_1 x2, first delta='{"city":"R'
response.reasoning_summary_text.delta    output_index=0 item_id=rs_18080366-d0f0-4b8e-8b09-05484f4dc8c3 delta='Now I think about what the tool will return.'
response.output_item.added               output_index=2 item=message id=msg_283b2b3a-3bfd-4048-8ac5-b2d8de98babb
response.output_text.delta               output_index=2 item_id=msg_283b2b3a-3bfd-4048-8ac5-b2d8de98babb delta='Checking the weather for you.'
response.output_item.done                output_index=1 item=function_call id=fc_call_weather_1
response.output_item.done                output_index=2 item=message id=msg_283b2b3a-3bfd-4048-8ac5-b2d8de98babb
final output: [('reasoning', 'rs_18080366-d0f0-4b8e-8b09-05484f4dc8c3'), ('function_call', 'fc_call_weather_1'), ('message', 'msg_283b2b3a-3bfd-4048-8ac5-b2d8de98babb')]

Text, then reasoning (scripted upstream)

  1. python client_stream.py 52187 text-then-reasoning "What is the weather in Reykjavik?" "$TOOLS" '{}'
  2. Observed (the reasoning delta at output_index 1 is never announced or closed; response.completed lists it):
response.output_item.added               output_index=0 item=message id=msg_4e47f634-ebae-497c-ac34-e1e9edcd71ba
response.output_text.delta               output_index=0 item_id=msg_4e47f634-ebae-497c-ac34-e1e9edcd71ba delta='Let me think. '
response.reasoning_summary_text.delta    output_index=1 item_id=rs_222a3676-404c-4e58-a89f-9b2ae71c0eec delta='Reasoning that arrives after visible text.'
response.output_text.delta               output_index=0 item_id=msg_4e47f634-ebae-497c-ac34-e1e9edcd71ba delta='Done.'
response.output_item.done                output_index=0 item=message id=msg_4e47f634-ebae-497c-ac34-e1e9edcd71ba
final output: [('message', 'msg_4e47f634-ebae-497c-ac34-e1e9edcd71ba'), ('reasoning', 'rs_222a3676-404c-4e58-a89f-9b2ae71c0eec')]

After (6255ac9)

Claude web search, then reasoning (live Anthropic)

  1. python client_stream.py 46396 claude-sonnet-5-5 "Use web search once to find the current population of Iceland from a reliable source. After reading the result, reason step by step about how many years at 1% annual growth it would take to reach half a million, then answer in one sentence." '[{"type":"web_search_preview"}]' '{"reasoning":{"effort":"high"},"max_output_tokens":6000}'
  2. Observed (the reasoning item is announced at output_index 1 before its 27 deltas, closed with reasoning_summary_text.done and output_item.done, and response.completed lists the web search call, that reasoning item, and the message under the announced ids):
response.output_item.added               output_index=1 item=reasoning id=rs_cec8ca28-8a66-4a08-b734-19758ebdcbc0
response.reasoning_summary_text.delta    output_index=1 item_id=rs_cec8ca28-8a66-4a08-b734-19758ebdcbc0 x27, first delta='The population figures v'
response.reasoning_summary_text.done     output_index=1 item_id=rs_cec8ca28-8a66-4a08-b734-19758ebdcbc0
response.reasoning_summary_part.done     output_index=1 item_id=rs_cec8ca28-8a66-4a08-b734-19758ebdcbc0
response.output_item.done                output_index=1 item=reasoning id=rs_cec8ca28-8a66-4a08-b734-19758ebdcbc0
response.output_item.added               output_index=2 item=message id=msg_8112241c-91fa-4e99-b84d-955202122c58
response.output_text.delta               output_index=2 item_id=msg_8112241c-91fa-4e99-b84d-955202122c58 x62, first delta='**'
response.output_item.added               output_index=0 item=web_search_call id=ws_srvtoolu_017o7Tr3jrPETxywyyUxkcnz
response.output_item.done                output_index=0 item=web_search_call id=ws_srvtoolu_017o7Tr3jrPETxywyyUxkcnz
response.output_item.done                output_index=2 item=message id=msg_8112241c-91fa-4e99-b84d-955202122c58
final output: [('web_search_call', 'ws_srvtoolu_017o7Tr3jrPETxywyyUxkcnz'), ('reasoning', 'rs_cec8ca28-8a66-4a08-b734-19758ebdcbc0'), ('message', 'msg_8112241c-91fa-4e99-b84d-955202122c58')]

Function tool call, then reasoning (scripted upstream)

  1. python client_stream.py 46396 tool-then-reasoning "What is the weather in Reykjavik?" "$TOOLS" '{}'
  2. Observed (the reasoning item is announced at output_index 1 before its delta and closed, and response.completed lists function call, reasoning, message under the announced ids):
response.output_item.added               output_index=0 item=function_call id=fc_call_weather_1
response.function_call_arguments.delta   output_index=0 item_id=fc_call_weather_1 x2, first delta='{"city":"R'
response.output_item.added               output_index=1 item=reasoning id=rs_a3316b90-1010-4de3-bda7-4f990203e6de
response.reasoning_summary_text.delta    output_index=1 item_id=rs_a3316b90-1010-4de3-bda7-4f990203e6de delta='I called the weather tool; now I weigh the answer.'
response.reasoning_summary_text.done     output_index=1 item_id=rs_a3316b90-1010-4de3-bda7-4f990203e6de
response.reasoning_summary_part.done     output_index=1 item_id=rs_a3316b90-1010-4de3-bda7-4f990203e6de
response.output_item.done                output_index=1 item=reasoning id=rs_a3316b90-1010-4de3-bda7-4f990203e6de
response.output_item.added               output_index=2 item=message id=msg_9c33781b-f4cc-40ee-bdcc-13f88092dd21
response.output_text.delta               output_index=2 item_id=msg_9c33781b-f4cc-40ee-bdcc-13f88092dd21 x2, first delta='Reykjavik is '
response.output_item.done                output_index=0 item=function_call id=fc_call_weather_1
response.output_item.done                output_index=2 item=message id=msg_9c33781b-f4cc-40ee-bdcc-13f88092dd21
final output: [('function_call', 'fc_call_weather_1'), ('reasoning', 'rs_a3316b90-1010-4de3-bda7-4f990203e6de'), ('message', 'msg_9c33781b-f4cc-40ee-bdcc-13f88092dd21')]

Reasoning, tool call, reasoning again (scripted upstream)

  1. python client_stream.py 46396 reasoning-tool-reasoning "What is the weather in Reykjavik?" "$TOOLS" '{}'
  2. Observed (two reasoning items with distinct ids at output_index 0 and 2, each announced before its delta and closed on its own, both listed by response.completed):
response.output_item.added               output_index=0 item=reasoning id=rs_0746bef4-84bf-4bfc-b9be-7161645e5fd2
response.reasoning_summary_text.delta    output_index=0 item_id=rs_0746bef4-84bf-4bfc-b9be-7161645e5fd2 delta='First I decide which tool to call.'
response.reasoning_summary_text.done     output_index=0 item_id=rs_0746bef4-84bf-4bfc-b9be-7161645e5fd2
response.reasoning_summary_part.done     output_index=0 item_id=rs_0746bef4-84bf-4bfc-b9be-7161645e5fd2
response.output_item.done                output_index=0 item=reasoning id=rs_0746bef4-84bf-4bfc-b9be-7161645e5fd2
response.output_item.added               output_index=1 item=function_call id=fc_call_weather_1
response.function_call_arguments.delta   output_index=1 item_id=fc_call_weather_1 x2, first delta='{"city":"R'
response.output_item.added               output_index=2 item=reasoning id=rs_ed69cc92-81bd-4d78-b749-920abd852201
response.reasoning_summary_text.delta    output_index=2 item_id=rs_ed69cc92-81bd-4d78-b749-920abd852201 delta='Now I think about what the tool will return.'
response.reasoning_summary_text.done     output_index=2 item_id=rs_ed69cc92-81bd-4d78-b749-920abd852201
response.reasoning_summary_part.done     output_index=2 item_id=rs_ed69cc92-81bd-4d78-b749-920abd852201
response.output_item.done                output_index=2 item=reasoning id=rs_ed69cc92-81bd-4d78-b749-920abd852201
response.output_item.added               output_index=3 item=message id=msg_ea48c764-e3d8-4832-9f77-26f9f2962c80
response.output_text.delta               output_index=3 item_id=msg_ea48c764-e3d8-4832-9f77-26f9f2962c80 delta='Checking the weather for you.'
response.output_item.done                output_index=1 item=function_call id=fc_call_weather_1
response.output_item.done                output_index=3 item=message id=msg_ea48c764-e3d8-4832-9f77-26f9f2962c80
final output: [('reasoning', 'rs_0746bef4-84bf-4bfc-b9be-7161645e5fd2'), ('function_call', 'fc_call_weather_1'), ('reasoning', 'rs_ed69cc92-81bd-4d78-b749-920abd852201'), ('message', 'msg_ea48c764-e3d8-4832-9f77-26f9f2962c80')]

Text, then reasoning (scripted upstream)

  1. python client_stream.py 46396 text-then-reasoning "What is the weather in Reykjavik?" "$TOOLS" '{}'
  2. Observed (the reasoning item is announced at output_index 1 after the message, closed, and listed by response.completed):
response.output_item.added               output_index=0 item=message id=msg_936a474e-c307-47ce-9315-b026fc22c27e
response.output_text.delta               output_index=0 item_id=msg_936a474e-c307-47ce-9315-b026fc22c27e delta='Let me think. '
response.output_item.added               output_index=1 item=reasoning id=rs_80214c72-6546-4dd9-af6a-efcf4e4bc202
response.reasoning_summary_text.delta    output_index=1 item_id=rs_80214c72-6546-4dd9-af6a-efcf4e4bc202 delta='Reasoning that arrives after visible text.'
response.reasoning_summary_text.done     output_index=1 item_id=rs_80214c72-6546-4dd9-af6a-efcf4e4bc202
response.reasoning_summary_part.done     output_index=1 item_id=rs_80214c72-6546-4dd9-af6a-efcf4e4bc202
response.output_item.done                output_index=1 item=reasoning id=rs_80214c72-6546-4dd9-af6a-efcf4e4bc202
response.output_text.delta               output_index=0 item_id=msg_936a474e-c307-47ce-9315-b026fc22c27e delta='Done.'
response.output_item.done                output_index=0 item=message id=msg_936a474e-c307-47ce-9315-b026fc22c27e
final output: [('message', 'msg_936a474e-c307-47ce-9315-b026fc22c27e'), ('reasoning', 'rs_80214c72-6546-4dd9-af6a-efcf4e4bc202')]

Observations from the run:

  • web_search_call item announced after the message; pre-existing, left alone
  • OpenAI SDK 2.33.0 crashes on that late item, reasoning or not
  • function_call done event arrives after later items; pre-existing, untouched
  • SDK 3.26.0 warns serializing reasoning items, both legs, out of scope

Type

🐛 Bug Fix

Caveats (if any)

Low

  • Open PR fix(responses): include encrypted_content in streamed reasoning done events #45044 edits the same reasoning done-event builder to add encrypted_content; whichever lands second rebases a few lines
  • The three new unit cases and the wire contract fail on main and pass here (IndexError in the SDK on main)
  • Hosted web search through the bridge still announces its web_search_call item after the message, which crashes the OpenAI SDK 2.x even with reasoning off; pre-existing, independent of this change, and tracked separately
  • A signed thinking block that never streamed inside a run lands on the first reasoning item even when it belongs to a later one; no live provider produces that shape today (Anthropic signs each block inside the stream), so it is a guess that only an unsigned-then-signed replay would notice

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

  • 6255ac9 passes /live-pr-risk

… open

A chunk carrying both reasoning content and a finish_reason never counted as the end of the run, so the reasoning item was announced and listed by response.completed but never closed. The done path now closes any open run before the final events, and the test helper that checks announcements is a pure comprehension.
@devin-ai-integration

devin-ai-integration Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor Author

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@greptile-apps

greptile-apps Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Medium risk] Changes how reasoning runs are tracked during streaming responses.

This PR appears safe to merge; no actionable issue was established

What we checked:

  • Reasoning closes too early: _is_reasoning_end rejects chunks containing reasoning text or thinking blocks. A chunk that emits a reasoning delta therefore keeps its run open
  • Runs repeat combined text: _reasoning_item_for_run replaces the template’s text with run.text and selects the thinking blocks owned by that run

Summary

The bridge now announces and closes each reasoning run, including runs that start after text or tool calls. The final response keeps each run’s streamed ID, output position, text, and signed thinking blocks. Both sync and async paths use the same tracking logic, with new unit and gateway tests covering the changed behavior

Reviews (1) · Last reviewed commit: "fix(responses): close a reasoning run th..." · Reviewed by Greptile

@codspeed

codspeed Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 31 untouched benchmarks


Comparing litellm_responses_bridge_reasoning_after_tool_call (6255ac9) with main (91f36f1)

Open in CodSpeed

@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 6255ac9. Configure here.

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant