Skip to content

fix: custom named provider context compression 404 - #30760

Open
wudong6120415 wants to merge 1 commit into
NousResearch:mainfrom
wudong6120415:fix/custom-named-provider-context-compression-404
Open

fix: custom named provider context compression 404#30760
wudong6120415 wants to merge 1 commit into
NousResearch:mainfrom
wudong6120415:fix/custom-named-provider-context-compression-404

Conversation

@wudong6120415

Copy link
Copy Markdown

Summary

Fixes context compression 404 when using a named custom provider (e.g. custom:minimax_coding).

Root cause

In _resolve_auto, both bare custom and named custom custom:name entered 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 /anthropic path.

Changes

  • agent/auxiliary_client.py: _resolve_auto now only rewrites bare custom (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.

…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.
@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint tool/browser Browser automation (CDP, Playwright) labels May 23, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Kitchen-sink PR: bundles three unrelated fixes (auxiliary_client named-custom routing, browser stealth args, Feishu media dedup). The core fix (auxiliary_client.py) is related to #16050, #22317, #13762, and prior fix attempt #17152. Consider splitting into separate PRs for cleaner review.

@teknium1

Copy link
Copy Markdown
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

  • agent/auxiliary_client.py:4227-4230 now forwards the live named-custom endpoint and key into the custom resolver; agent/auxiliary_client.py:4631-4695 builds the auxiliary client from those values. Commit 92da7a997 added direct coverage in tests/agent/test_auxiliary_named_custom_providers.py:496-563.
  • The Feishu code has moved to the plugin registry. Current tools/send_message_tool.py:960-982 already attaches media only to the last chunk, so the proposed old direct-sender hunk no longer targets the live path.
  • The remaining browser change reads browser.stealth, but hermes_cli/config.py:1267-1305 has no corresponding default/schema entry and this PR adds no regression coverage for subprocess arguments.

Suggested changes

  • Salvage only the independent browser idea in a focused change, with an explicit config contract and launch-argument tests. The auxiliary and Feishu hunks are already superseded.

Automated hermes-sweeper review.

@teknium1 teknium1 added sweeper:risk-message-delivery Sweeper risk: may drop, duplicate, misroute, or suppress messages sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform area/compression Context compression and continuation sessions labels Jul 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/compression Context compression and continuation sessions comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint P2 Medium — degraded but workaround exists sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:risk-message-delivery Sweeper risk: may drop, duplicate, misroute, or suppress messages tool/browser Browser automation (CDP, Playwright) type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants