Skip to content

[Bug]: config.yaml model.model key is silently ignored — falls back to hardcoded default #3535

@mmaudet

Description

@mmaudet

Description

When configuring a non-OpenRouter provider in config.yaml using the model subkey under the model: section, the model name is silently ignored and the hardcoded fallback anthropic/claude-opus-4.6 is used instead, causing a 404 on providers that don't carry that model (e.g. kimi-coding/Moonshot).

Steps to reproduce

  1. Set up config.yaml with:
    model:
      provider: kimi-coding
      model: moonshot-v1-auto
  2. Run hermes chat -q "Hello"
  3. Observe the error: the API call is made with anthropic/claude-opus-4.6 instead of moonshot-v1-auto

Expected behavior

The model name moonshot-v1-auto from config.yaml should be used when making API calls to the configured provider.

Actual behavior

runtime_provider.py:_get_model_config() (line 66) reads cfg.get("default", ""), but the config uses the key model (not default). Since default is missing, it falls through to the hardcoded fallback anthropic/claude-opus-4.6.

Root cause

In hermes_cli/runtime_provider.py, _get_model_config() only looks for the default key:

default = cfg.get("default", "").strip()

It should also accept model as an alias, or the documentation/setup should clearly state that the key must be default.

Workaround

Rename model: to default: in config.yaml:

model:
  provider: kimi-coding
  default: moonshot-v1-auto   # NOT "model: moonshot-v1-auto"

Environment

  • Hermes Agent (latest as of 2026-03-28)
  • OS: Ubuntu 24.04
  • Provider: kimi-coding (Moonshot API)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions