Skip to content

fix: preserve named custom vision providers - #31792

Open
AideYu wants to merge 1 commit into
NousResearch:mainfrom
AideYu:fix/preserve-custom-vision-provider
Open

fix: preserve named custom vision providers#31792
AideYu wants to merge 1 commit into
NousResearch:mainfrom
AideYu:fix/preserve-custom-vision-provider

Conversation

@AideYu

@AideYu AideYu commented May 25, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Preserve custom: providers during auxiliary vision provider normalization.
  • Prevent custom:moonshot from being rewritten to built-in kimi-coding.
  • Add regression coverage for named custom vision providers.

Test Plan

  • python -m pytest tests/agent/test_auxiliary_named_custom_providers.py tests/agent/test_vision_resolved_args.py tests/tools/test_vision_tools.py -q

@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/vision Vision analysis and image generation duplicate This issue or pull request already exists labels May 25, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Duplicate of #26544 which implements the same fix — preserving the custom:<name> prefix through _normalize_aux_provider() in auxiliary_client.py instead of stripping it to the bare suffix. This is a saturated cluster with 7+ open PRs (#8623, #9288, #16389, #16727, #26544, #26909, #29548) all addressing named custom provider identity loss at various code paths.

@teknium1 teknium1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the focused fix. The current vision path still strips custom: at agent/auxiliary_client.py:5289; because _PROVIDER_ALIASES maps moonshot to kimi-coding at :254-255, custom:moonshot is routed as the built-in identity before _get_cached_client() is called at :5456-5461. Preserving the explicit named-custom identifier fits the existing resolver, which accepts custom:<name> at hermes_cli/runtime_provider.py:640-674.

Problems

  • tests/agent/test_auxiliary_named_custom_providers.py:60-65 verifies only the private normalization result. It does not verify that the configured custom endpoint wins in the complete vision-resolution path.

Suggested changes

  • Add a regression test configuring auxiliary.vision.provider: custom:moonshot and a matching custom-provider endpoint, then assert resolve_vision_provider_client() constructs the client for that endpoint rather than the built-in Kimi route.

Automated hermes-sweeper review.

@@ -60,7 +60,11 @@ def test_bare_provider_name_unchanged(self):

def test_custom_colon_named_provider_preserved(self):
from agent.auxiliary_client import _normalize_vision_provider

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add an endpoint-resolution regression alongside this assertion: configure auxiliary.vision.provider: custom:moonshot and a matching custom_providers entry, then assert resolve_vision_provider_client() uses that custom base URL/key. The reported failure occurs after normalization when the vision path builds the client.

@teknium1 teknium1 added sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:blast-contained Sweeper blast radius: contained — one narrow path / opt-in / few users labels Jul 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint duplicate This issue or pull request already exists P2 Medium — degraded but workaround exists sweeper:blast-contained Sweeper blast radius: contained — one narrow path / opt-in / few users sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades tool/vision Vision analysis and image generation type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants