Skip to content

Support custom_providers in auxiliary_client resolution#4484

Closed
gk1016 wants to merge 1 commit into
NousResearch:mainfrom
gk1016:feature/custom-providers-auxiliary-client
Closed

Support custom_providers in auxiliary_client resolution#4484
gk1016 wants to merge 1 commit into
NousResearch:mainfrom
gk1016:feature/custom-providers-auxiliary-client

Conversation

@gk1016

@gk1016 gk1016 commented Apr 1, 2026

Copy link
Copy Markdown

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

  • Modified agent/auxiliary_client.py: Added custom_providers resolution logic in resolve_provider_client()
  • No breaking changes, maintains backward compatibility
  • Fixes auxiliary client crashes when using custom providers

Testing

  • Verified with Google AI custom provider as auxiliary compression backend
  • Memory flush and session expiry no longer crash
  • Falls through to PROVIDER_REGISTRY if no custom_provider match found

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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant