Conversation
- Forward the _RUNTIME_MAIN_BASE_URL/_RUNTIME_MAIN_API_KEY/_RUNTIME_MAIN_API_MODE runtime globals into resolve_provider_client from the vision auto branch, mirroring the _resolve_auto bridge from #35259, so a custom:<name> main provider flattened to bare "custom" still builds a vision client instead of returning "No LLM provider configured for task=vision" - Add a regression test asserting the vision auto path forwards the runtime credentials as explicit_base_url/explicit_api_key/api_mode Fixes #43251 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
tonydwb
approved these changes
Jun 10, 2026
tonydwb
left a comment
There was a problem hiding this comment.
Code Review Summary
Verdict: Approved
✅ Looks Good
- Regression fix with test coverage: The fix bridges runtime credentials (
_RUNTIME_MAIN_BASE_URL,_RUNTIME_MAIN_API_KEY,_RUNTIME_MAIN_API_MODE) into the vision auto-detect path, mirroring_resolve_auto()behavior from PR #35259. - Clean test:
TestResolveVisionUsesRuntimeGlobalscovers the key assertion — thatexplicit_base_url,explicit_api_key, andapi_modeare forwarded toresolve_provider_clientwhenprovider="auto"and the runtime main is a custom provider. - No security issues: Test uses
"***"as a placeholder API key — not a real credential. - Well-scoped: Only 2 files changed (+50/-1), single concern.
ℹ️ Minor
- The
api_mode=resolved_api_mode or (_RUNTIME_MAIN_API_MODE or None)fallback chains two falsy-check operators — this is intentional and correct (preserves explicitNonefrom the caller while falling back to runtime global).
Reviewed by Hermes Agent
arxeme
added a commit
to arxeme/hermes-seatalk
that referenced
this pull request
Jun 11, 2026
…tials - Package the vision auto-detect runtime-credentials bridge as a standalone patch under deploy/patches for manual application until upstream PR NousResearch/hermes-agent#43254 is merged - Provide an idempotent apply.py with one-time backup and rollback path, plus the equivalent unified diff for git-apply workflows - Document symptom, root cause, verification steps, and the removal condition in the patch README Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This was referenced Jun 19, 2026
Collaborator
|
Implemented on main; thank you for the precise diagnosis and focused regression test. Automated hermes-sweeper review found:
The linked issue #43251 was also closed with this same implemented-on-main finding. |
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.
What does this PR do?
Fixes
vision_analyzefailing withNo LLM provider configured for task=vision provider=autofor users whose main provider is a named custom provider (custom:<name>), even though normal chat and every other auxiliary task work.This is the sibling gap of #35259. That PR taught
set_runtime_main()to recordbase_url/api_key/api_modeand bridged them in_resolve_auto()— but the parallel vision path inresolve_vision_provider_client()was never updated, so vision alone still loses the credentials.Related Issue
Fixes #43251
Type of Change
Changes Made
agent/auxiliary_client.py— in theresolve_vision_provider_client()autobranch, forward_RUNTIME_MAIN_BASE_URL/_RUNTIME_MAIN_API_KEY/_RUNTIME_MAIN_API_MODEinto theresolve_provider_client()call asexplicit_base_url/explicit_api_key/api_mode, mirroring the existing_resolve_auto()bridge.tests/agent/test_set_runtime_main_custom_provider.py— addTestResolveVisionUsesRuntimeGlobals::test_vision_auto_forwards_runtime_credentialsasserting the vision auto path forwards the runtime credentials.Root Cause
For a
custom:<name>provider, the agent resolver flattensagent.providerto bare"custom"and carries the endpoint credentials separately. Each turnturn_context.pycallsset_runtime_main("custom", model, base_url=..., api_key=..., api_mode=...), so_RUNTIME_MAIN_PROVIDER == "custom"with the credentials in_RUNTIME_MAIN_BASE_URL/_RUNTIME_MAIN_API_KEY._resolve_auto()bridges those globals (added by fix(auxiliary): route custom-provider aux tasks to the user endpoint (salvage #34783) #35259) → works.resolve_vision_provider_client(provider="auto")readsmain_provider = "custom"and calledresolve_provider_client("custom", ...)withoutexplicit_base_url/explicit_api_key. The anonymous-custom branch then finds no credentials, logscustom/main requested but no endpoint credentials found, and the chain returnsNone.How to Test
Reproduced on v0.16.0 with a
custom:garena-gateway-anthropicmain provider (api_mode: anthropic_messages, key viakey_env):Tests:
Checklist
Code
fix(auxiliary): …)Documentation & Housekeeping
cli-config.yaml.example— N/A (no config keys changed)CONTRIBUTING.md/AGENTS.md— N/A (no architecture change)