Skip to content

fix: discover models from configured providers#904

Open
Asunfly wants to merge 1 commit into
EKKOLearnAI:mainfrom
Asunfly:fix/config-providers-available-models
Open

fix: discover models from configured providers#904
Asunfly wants to merge 1 commit into
EKKOLearnAI:mainfrom
Asunfly:fix/config-providers-available-models

Conversation

@Asunfly
Copy link
Copy Markdown

@Asunfly Asunfly commented May 21, 2026

Summary

  • Discover available model groups from Hermes Agent's newer config.providers.<name> entries.
  • Merge configured provider models with existing provider groups instead of dropping models when provider keys overlap.
  • Support default model fallbacks from default_model, model.default, and model.model.
  • Validate key_env names before reading environment variables.

Why

Hermes Agent can load configurations where custom providers are declared under providers, for example:

model:
  default: custom-model-pro
  provider: customrelay
providers:
  customrelay:
    key_env: CUSTOM_RELAY_API_KEY
    default_model: custom-model-pro
    models:
      custom-model-pro: {}

The server config endpoint could read this shape, but /api/hermes/available-models did not expose the configured provider/model group. That left the model selector empty even though the active Hermes config was valid.

Duplicate check

I checked existing related issues/PRs before opening this:

I did not find an existing issue/PR specifically covering config.providers.<name> discovery in /api/hermes/available-models.

Test plan

Local verification performed:

  • git diff --check
  • npx vitest run tests/server/model-visibility-controller.test.ts tests/server/config-helpers-file-lock.test.ts tests/server/health-controller.test.ts tests/client/models-store.test.ts
    • 4 test files passed
    • 25 tests passed
  • npm run build

Live verification against a local service using the newer Hermes config shape:

  • /health returned HTTP 200
  • /api/hermes/profiles returned HTTP 200
  • /api/hermes/available-models returned the configured custom provider group and its default model.

@Asunfly Asunfly force-pushed the fix/config-providers-available-models branch from a3fec6d to 5bdfa76 Compare May 21, 2026 09:33
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