redhat-developer / redhat-developer/abbenay

Dashboard: provider shows Ready and models save, but Models tab empty when API key not resolvable

Open
#133 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

fix
Dominant language
TypeScript
Stars
12
Forks
7
Avg merge
7h 7m
Merged PRs (30d)
3

Description

Summary

After configuring OpenRouter via the web dashboard (Add Provider → enter API key → enable models → Save), the provider card shows Ready and models are persisted in config.yaml, but they do not appear on the Models tab.

Environment

Steps to reproduce

  1. aby start (or node packages/daemon/dist/daemon/index.js start)
  2. Dashboard → Providers → Add Provider → OpenRouter
  3. Enter API key, discover models, enable 2 models, Save
  4. Open Models tab → only local providers shown; OpenRouter models missing

Expected

  • Models appear on Models tab after save, OR
  • Clear warning if credentials are not resolvable (e.g. "Key missing — set OPENROUTER_API_KEY or store in keychain")

Actual

  • Provider card shows Ready
  • config.yaml contains enabled models under providers.openrouter.models
  • /api/providers returns "configured": false for openrouter
  • /api/models omits openrouter models entirely

Root cause (observed)

Config saved with credential source the daemon cannot resolve at runtime, e.g.:

openrouter:
  secret_store: env
  secret_name: OPENROUTER_API_KEY

without OPENROUTER_API_KEY exported in the daemon process.

Dashboard status (getProviderStatus) treats presence of api_key_keychain_name / api_key_env_var_name as "configured", but CoreState.resolveApiKey() returns null → listModels() skips the provider.

Suggested improvements

  • Align dashboard status with daemon configured (call /api/providers or verify key after save)
  • After wizard Save, validate credential resolution; block success or show explicit error
  • Models tab: show disabled models with reason ("API key missing") instead of hiding them
  • Don't silently swallow failures in wizardSave() when POST /api/secrets/... fails
  • Env mode: warn that the var must be set before daemon start

Workaround

Re-edit provider → Keychain mode + re-enter key, OR: export OPENROUTER_API_KEY=... then restart daemon from that shell.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with dashboard getProviderStatus and wizardSave(), then trace /api/providers and /api/models through CoreState.resolveApiKey() and listModels(). Reproduce the env-mode case with the daemon started without OPENROUTER_API_KEY. Done means credential status and model visibility agree, and an unresolved key produces an explicit warning or error instead of silently hiding models.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, backend-api-design
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.