fix: custom named provider context compression 404 - #30760
Open
wudong6120415 wants to merge 1 commit into
Open
Conversation
…eishu media fix - auxiliary_client.py: Fix _resolve_auto treating 'custom:name' as bare 'custom', causing /anthropic → /v1 rewrite and 404 on context compression. Only bare 'custom' (anonymous) gets the rewrite; named providers (custom:name) now preserve their original base_url. Related: _resolve_auto now re-enters auto_resolve for named providers so resolve_provider_client gets the correct provider name. - browser_tool.py: Inject stealth args and user-agent from config.yaml into browser launch command (args passed after --session, not in backend_args). Fixes anti-detection browser fingerprinting. - send_message_tool.py: Feishu media files now only attached on last chunk to avoid duplicate uploads in multi-chunk messages.
Collaborator
Contributor
|
Thanks for the report and implementation. The named-custom compression issue is already addressed on current main by a later, broader runtime-handoff fix. Problems
Suggested changes
Automated hermes-sweeper review. |
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
Fixes context compression 404 when using a named custom provider (e.g.
custom:minimax_coding).Root cause
In
_resolve_auto, both barecustomand named customcustom:nameentered the same code path, which rewrote the base_url from/anthropic→/v1(OpenAI convention). The named custom provider branch should NOT rewrite — it needs the original/anthropicpath.Changes
agent/auxiliary_client.py:_resolve_autonow only rewrites barecustom(anonymous). Named providers (custom:name) preserve their original base_url.tools/browser_tool.py: Stealth args and user-agent now injected from config.yaml into browser launch args.tools/send_message_tool.py: Feishu media files attached only on last chunk to avoid duplicates.