hermes - 💡(How to fix) Fix [Bug]: Model Chooser Conflicts with API Key Resolution and Configuration Management I think It might be related to #12146 [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
NousResearch/hermes-agent#16730Fetched 2026-04-28 06:51:10
View on GitHub
Comments
0
Participants
1
Timeline
6
Reactions
0
Author
Participants
Timeline (top)
labeled ×5referenced ×1

The model selection interface is causing multiple interconnected issues: an unresolved provider API key error, unexpected configuration modifications when setting local models, hardcoded models overriding user selections, and ambiguity between Ollama API routes and custom local model paths. These problems make reliable model switching difficult and disrupt the workflow for users managing local or hybrid AI deployments.

Error Message

The model selection interface is causing multiple interconnected issues: an unresolved provider API key error, unexpected configuration modifications when setting local models, hardcoded models overriding user selections, and ambiguity between Ollama API routes and custom local model paths. These problems make reliable model switching difficult and disrupt the workflow for users managing local or hybrid AI deployments.

  • Receiving "Provider resolver returned an empty API key" error related to OPENROUTER_API_KEY even when using local models.
  1. Observe the API key error, UI confusion, and hardcoded model overrides.
  • Add validation and context-aware error messaging when API keys are missing but not required for the selected provider route.
  1. No completion error = "Error: Provider resolver returned an empty API key. Set OPENROUTER_API_KEY or run: hermes setup"

Additional Logs / Traceback (optional)

Root Cause

Root Cause Analysis (optional)

Code Example

Report       https://paste.rs/L19MK
  agent.log    https://paste.rs/T3g54
  gateway.log  https://paste.rs/qZNyx

---
RAW_BUFFERClick to expand / collapse

Bug Description

Summary

The model selection interface is causing multiple interconnected issues: an unresolved provider API key error, unexpected configuration modifications when setting local models, hardcoded models overriding user selections, and ambiguity between Ollama API routes and custom local model paths. These problems make reliable model switching difficult and disrupt the workflow for users managing local or hybrid AI deployments.

Current Behavior / Problems Identified

  • Receiving "Provider resolver returned an empty API key" error related to OPENROUTER_API_KEY even when using local models.
  • The model chooser/switcher UI is cluttered and difficult to navigate.
  • Setting a new local model triggers automatic config file modifications that are unstable, unpredictable, or require manual intervention to function correctly.
  • Built-in/hardcoded models frequently override user-selected local models without clear indication.
  • No intuitive distinction between selecting an Ollama API endpoint versus configuring a custom local model path.

Steps to Reproduce

  1. Start a local Ollama server with one or more models available.
  2. Open Hermes-webui and navigate to the model selection/switcher interface.
  3. Attempt to select or configure the Ollama/local model.
  4. Observe the API key error, UI confusion, and hardcoded model overrides.

Expected Behavior

  • The provider resolver should correctly detect available local/Ollama models without requiring an OPENROUTER_API_KEY when that provider is not in use.
  • The model chooser should provide a clear, organized interface with distinct sections for Ollama API, custom local models, and other providers.
  • User-selected models should take precedence over hardcoded defaults, with explicit UI indicators showing which model is active and its source.
  • Configuration changes should be transparent, non-destructive, and stored in a way that prevents automatic corruption or unexpected overrides.

Implementation Suggestions

  • Decouple the OPENROUTER_API_KEY requirement from local/Ollama model resolution. Only enforce it when explicitly using OpenRouter-hosted models.
  • Redesign the model chooser with clear categorization (e.g., "Ollama API", "Custom Local Model", "Other Providers") and collapsible sections to reduce visual clutter.
  • Implement a priority system where user-defined models override hardcoded defaults, with visible status indicators showing active selections.
  • Use non-destructive config management: store user overrides in a separate configuration file or use a structured format that prevents automatic overwrites during runtime.
  • Add validation and context-aware error messaging when API keys are missing but not required for the selected provider route.

I have to have Hermes modify the config every time I switch local models just to be able to use it.

Environment

  • Ollama Server.
  • OS: [linux]

Additional Context

This issue significantly impacts usability when managing local or hybrid AI workflows. Clarifying the distinction between API-based and local model routing, along with stabilizing the configuration system, would greatly improve reliability and user experience.

Steps to Reproduce

  1. Run Hermes model.
  2. Choose local ollama model.
  3. Run Hermes.
  4. New model populated.
  5. Send chat.
  6. No completion error = "Error: Provider resolver returned an empty API key. Set OPENROUTER_API_KEY or run: hermes setup"

Expected Behavior

Change model = model works.

Actual Behavior

Covered in reproduce.

Affected Component

CLI (interactive chat)

Messaging Platform (if gateway-related)

No response

Debug Report

Report       https://paste.rs/L19MK
  agent.log    https://paste.rs/T3g54
  gateway.log  https://paste.rs/qZNyx

Operating System

Linux Mint 22.3 (Zena), based on Ubuntu Noble.

Python Version

Python 3.12.3

Hermes Version

Hermes Agent v0.11.0 (2026.4.23)

Additional Logs / Traceback (optional)

Root Cause Analysis (optional)

No response

Proposed Fix (optional)

No response

Are you willing to submit a PR for this?

  • I'd like to fix this myself and submit a PR

extent analysis

TL;DR

Decoupling the OPENROUTER_API_KEY requirement from local/Ollama model resolution and redesigning the model chooser interface may resolve the multiple issues with the model selection interface.

Guidance

  • Verify that the OPENROUTER_API_KEY is not required when using local/Ollama models by checking the provider resolver logic.
  • Redesign the model chooser interface to have clear categorization and collapsible sections for different model types.
  • Implement a priority system where user-defined models override hardcoded defaults, with visible status indicators.
  • Use non-destructive config management to store user overrides separately and prevent automatic overwrites.
  • Validate and provide context-aware error messaging when API keys are missing but not required.

Example

No code snippet is provided as the issue description does not include specific code references.

Notes

The provided information suggests that the issues are related to the model selection interface and configuration management. However, without access to the specific code or more detailed logs, it's challenging to provide a definitive fix.

Recommendation

Apply a workaround by modifying the configuration manually to use local models without requiring the OPENROUTER_API_KEY, and consider redesigning the model chooser interface for clarity and usability. This approach is recommended because it directly addresses the reported issues and provides a clear path forward for improving the model selection interface.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - 💡(How to fix) Fix [Bug]: Model Chooser Conflicts with API Key Resolution and Configuration Management I think It might be related to #12146 [1 participants]