Repository navigation
fix(responses): backport #46099 and #46109 to stable/1.103.x for v1.103.5 - #46949
Merged
mrinal-berri merged 5 commits intoOct 17, 2026
Merged
mrinal-berri merged 5 commits into
mrinal-berri merged 5 commits into
Conversation
Contributor
|
Automatic reviews are disabled for this repository. |
|
|
yuneng-berri
approved these changes
Oct 17, 2026
mrinal-berri
deleted the
litellm_backport_responses_bridge_stable_1_103_x
branch
October 17, 2026 01:50
This was referenced Oct 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
p0-regression: LIT-9197
TLDR
Problem this solves:
stable/1.103.xfor v1.103.5choices[1], hidden fromchoices[0]readersindex0How it solves it:
choices[0]User Flow
Before: an agent built on a
choices[0]-only client never calls its weather toolmodel: azure/gpt-5.4-mini, aget_weathertool and noreasoning_effortget_weathercallchoices[0]is plain text withfinish_reason: stopand the tool call sits onchoices[1]choices[0], sees plain text, and replies to the user without running the toolAfter: the same request returns one choice that carries the text and the tool call
get_weathercallchoices[0]holds both messages' text and the tool call withfinish_reason: tool_callsindex0 and 1Relevant issues
Backport of #46099 and #46109, reported by a customer (Pylon #9888)
Affected release
Regression in v1.97.0
Linear ticket
Resolves LIT-9197
Pre-Submission checklist
Backport details
The two picks keep their original authors and name the main commit they came from. The fix code matches main line for line, with two exceptions. A
TypeVarline that sat next to the upstream hunk is left out because the line never uses it and has noTypeVarimport.from itertools import accumulate, chainis added because main already has it and the line did notThe unit tests go into the line's existing files under
tests/test_litellm/and only the two PRs' own tests are carried. #46109's black-only reformat of older tests is not.test_responses_bridge_incomplete.pyis new on this line and holds only these PRs' 8 integration tests, so its 7 older tests from main stay behind. Those tests importlist_value, which is hand-ported from main (#43981) as its own commitThe line's integration conftest refuses any test missing from
tests/integration/contracts.json, so a separate commit gives the 8 testscoversmarks and manifest entries. Main has no manifest. The version bump is the last commit and touches onlypyproject.tomlanduv.lock.enterprise/andlitellm-proxy-extras/are unchanged, so no subpackage needs a bumpA grype sweep of the line's
uv.lockfound nothing to bump. mlflow clears with a lock-only bump, but it ships only in the optionalmlflowextra that the Docker image does not install. diskcache has no fixed release, and main is on the same versionLocal checks were the following. The two affected unit test folders pass, 438 tests. A wider run that also covers the OpenAI responses guardrail handler passes 575. With the source reverted, 5 of the 6 new unit tests fail. The 6th is the
index0 case, which already worked. The integrationprovidersgroup collects all 25 tests. A scan for module-level names the picks remove found none, so nothing on the line loses an importGauntlet-mini: SURVIVED, 5/5 lenses, 1 confirmed (all fixed), reviewed 34996a0, bump 6ed7a3d. The confirmed finding was the missing
contracts.jsonentries, which broke collection of the wholeprovidersgroup. The strongest dissent was rejected. It said citation offsets shift by Python code points rather than UTF-16 units, but that matches how the provider produces them. The added docstring on the fold helper was also flagged and rejected, because it is upstream's text and the backport stays identical to mainScreenshots / Proof of Fix
Not captured yet. A live before and after run against a proxy on
stable/1.103.xwith a real gpt-5.4 deployment is still to doType
🐛 Bug Fix
Caveats (if any)
Medium
Low
choices[1]from bridged replies now get one folded choicerust-wheelred, same 4 failures on the line tip (run 37675147208)