Skip to content

fix(auxiliary): preserve named provider on custom endpoint#26909

Open
LeonSGP43 wants to merge 1 commit into
NousResearch:mainfrom
LeonSGP43:hermes/fix-26879-aux-provider-identity
Open

fix(auxiliary): preserve named provider on custom endpoint#26909
LeonSGP43 wants to merge 1 commit into
NousResearch:mainfrom
LeonSGP43:hermes/fix-26879-aux-provider-identity

Conversation

@LeonSGP43

Copy link
Copy Markdown
Contributor

What does this PR do?

Fixes auxiliary provider resolution so auxiliary.<task>.provider is preserved when base_url and api_key are both configured. Previously this path forced provider to "custom", which skipped provider-specific handling in downstream call logic.

Related Issue

Fixes #26879

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 🔒 Security fix
  • 📝 Documentation update
  • ✅ Tests (adding or improving test coverage)
  • ♻️ Refactor (no behavior change)
  • 🎯 New skill (bundled or hub)

Changes Made

  • Updated _resolve_task_provider_model() in agent/auxiliary_client.py:
    • when cfg_base_url + cfg_api_key are both set, preserve explicit non-auto cfg_provider instead of forcing "custom".
  • Added regression tests in tests/agent/test_vision_resolved_args.py:
    • verifies named provider is preserved for custom endpoint configs
    • verifies provider: auto still resolves to "custom" for this path

How to Test

  1. Run:
    python3 -m pytest -o addopts='' tests/agent/test_vision_resolved_args.py
  2. Confirm all tests pass.
  3. Verify behavior from config:
    set auxiliary.vision.provider=zai with base_url + api_key and confirm resolved provider remains zai.

Checklist

Code

  • I've read the Contributing Guide
  • My commit messages follow Conventional Commits (fix(scope):, feat(scope):, etc.)
  • I searched for existing PRs to make sure this isn't a duplicate
  • My PR contains only changes related to this fix/feature (no unrelated commits)
  • I've run pytest tests/ -q and all tests pass
  • I've added tests for my changes (required for bug fixes, strongly encouraged for features)
  • I've tested on my platform: macOS 15.x

Documentation & Housekeeping

  • I've updated relevant documentation (README, docs/, docstrings) — or N/A
  • I've updated cli-config.yaml.example if I added/changed config keys — or N/A
  • I've updated CONTRIBUTING.md or AGENTS.md if I changed architecture or workflows — or N/A
  • I've considered cross-platform impact (Windows, macOS) per the compatibility guide — or N/A
  • I've updated tool descriptions/schemas if I changed tool behavior — or N/A

Screenshots / Logs

4 passed in 0.63s

@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/agent Core agent loop, run_agent.py, prompt builder area/config Config system, migrations, profiles labels May 16, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Duplicate of #9288 — same root cause: _resolve_task_provider_model() forces provider to "custom" when base_url + api_key are both set, discarding the explicit named provider. Multiple competing PRs exist for this fix: #10823, #16389, #14718, #16727.

@cardtest15-coder

This comment was marked as spam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/config Config system, migrations, profiles comp/agent Core agent loop, run_agent.py, prompt builder P2 Medium — degraded but workaround exists type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] auxiliary task provider identity lost when base_url + api_key are both set

3 participants