fix(gateway): guard against None request_overrides in _build_api_kwargs - #7305
fix(gateway): guard against None request_overrides in _build_api_kwargs#7305konsisumer wants to merge 1 commit into
Conversation
|
Cherry-picked 4 commits to fix pre-existing test failures on
Total: 38 of 39 pre-existing test failures addressed. The remaining 1 ( |
639b017 to
ce586f3
Compare
|
Rebased onto latest Root cause: Commit Fix: Updated the test to verify that Note: The |
|
Cherry-picked the |
1ae7736 to
9461b83
Compare
|
Rebased onto latest |
f20d30f to
51c366a
Compare
|
Thanks for flagging the duplicates — happy to let maintainers pick whichever they prefer. For reference, this PR (#7305) normalizes all three |
51c366a to
a0486c0
Compare
|
Rebased onto latest |
|
Rebased cleanly onto origin/main (1006 upstream commits); no conflicts. All 95 tests across |
a0486c0 to
e906994
Compare
|
Rebased onto latest origin/main (clean, no conflicts). All 95 tests across |
e906994 to
8f0f7fa
Compare
|
Merged via #17032. Your commit was cherry-picked onto current main with your authorship preserved in git log. Clean cherry-pick, no modifications needed — the fix was correct as-is. Thanks for the thorough bug report and the fix! |
Summary
request_overridescan beNonein the gateway code path, causingAttributeError: 'NoneType' object has no attribute 'get'on every gateway message after commit 970192f (fast mode support)gateway/run.pycould leaverequest_overridesasNone: the no-service-tier early return, the exception fallback, and the direct agent attribute assignment{}and add a defensiveor {}at the access site inrun_agent.pyCloses #7215, closes #7259, closes #7277
Test plan
test_no_crash_when_request_overrides_is_noneinTestBuildApiKwargsChatCompletionsServiceTier— setsrequest_overrides = Noneand verifies_build_api_kwargssucceedstest_turn_route_skips_priority_processing_for_unsupported_modelsto assert{}instead ofNone