Support custom_providers in auxiliary_client resolution#4484
Closed
gk1016 wants to merge 1 commit into
Closed
Conversation
Fixes auxiliary client (used for memory flush, compression, session search) to check config.yaml custom_providers before falling back to PROVIDER_REGISTRY. This enables users to define custom OpenAI-compatible endpoints (e.g., local Ollama, Google AI Studio via custom provider entry) and use them for auxiliary tasks without requiring PROVIDER_REGISTRY entries. Previously, auxiliary tasks would fail with 'unknown provider' warnings when using custom_providers, causing session expiry crashes on memory flush. Resolves: https://github.com/NousResearch/hermes-agent/issues/XXXX (Update issue number once known)
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.
Problem
Auxiliary client operations (memory flush, compression, session search, vision analysis) fail with 'unknown provider' warnings when using custom_providers defined in config.yaml. This causes session expiry crashes on memory flush when custom providers like Google AI or local Ollama are configured.
Root Cause
resolve_provider_client()only checks the hardcoded PROVIDER_REGISTRY, not the custom_providers list from config.yaml. Custom providers are available via the credential pool but weren't being consulted for auxiliary tasks.Solution
Added a check in
resolve_provider_client()to iterate through custom_providers (via credential pool) BEFORE checking PROVIDER_REGISTRY. This allows auxiliary clients to find custom endpoints without registry entries.Changes
agent/auxiliary_client.py: Added custom_providers resolution logic inresolve_provider_client()Testing