Skip to content

fix(models): parse Hermes Agent config schema in model picker#718

Open
1Beekeeper wants to merge 1 commit into
outsourc-e:mainfrom
1Beekeeper:fix/hermes-agent-config-schema
Open

fix(models): parse Hermes Agent config schema in model picker#718
1Beekeeper wants to merge 1 commit into
outsourc-e:mainfrom
1Beekeeper:fix/hermes-agent-config-schema

Conversation

@1Beekeeper

Copy link
Copy Markdown

Problem

Hermes Agent uses a different config.yaml schema than Hermes Workspace:

  • models.default.{provider,model} instead of model: / model.default:
  • providers as an array with name field instead of a map

This caused the model picker to show empty when Hermes Agent was the backend and no models.json existed. The agent's /v1/models endpoint also requires auth (returning 401), so the fallback path failed too.

Fix

  1. readClaudeDefaultModel() now falls back to models.default.{provider,model}
  2. readClaudeConfigCatalog() normalizes both array and map providers
  3. Integration tests added for both schema variants

Test Plan

  • pnpm vitest run src/routes/api/__tests__/-models.test.ts → 5/5 pass
  • pnpm vitest run src/routes/api/-models.test.ts → 2/2 pass
  • LSP diagnostics: clean on both changed files

Fixes empty model list when Hermes Agent backend is active.

Hermes Agent uses a different config.yaml schema than Hermes Workspace:

- models.default.{provider,model} instead of model: / model.default:
- providers as an array with name field instead of a map

This caused the model picker to show empty when Hermes Agent was the
backend and no models.json existed. The fix:

1. readClaudeDefaultModel() now falls back to models.default.block
2. readClaudeConfigCatalog() normalizes both array and map providers
3. Integration tests added for both schema variants

Fixes empty model list when Hermes Agent backend is active.
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