fix(custom): apply compat User-Agent in main agent path - #11302
Closed
KeaneYan wants to merge 1 commit into
Closed
Conversation
KeaneYan
force-pushed
the
fix/main-custom-ua-compat
branch
from
April 24, 2026 08:54
3c119e9 to
51f29e7
Compare
KeaneYan
force-pushed
the
fix/main-custom-ua-compat
branch
from
May 9, 2026 02:02
51f29e7 to
2a72b99
Compare
KeaneYan
force-pushed
the
fix/main-custom-ua-compat
branch
from
May 20, 2026 08:23
2a72b99 to
4fe8fb8
Compare
Collaborator
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.
Summary
custom_client_kwargsrefreshRoot Cause
The auxiliary client already uses a compatibility User-Agent strategy for custom endpoints, but the main agent path in
run_agent.pystill allowed custom-provider requests to go out with the default OpenAI SDK UA.That leaves relays/proxies that block SDK-default UAs in a split-brain state where auxiliary requests work but main agent requests fail.
Testing
run_agent.pyand isolates the custom-provider header behavior.Fixes #11301