Skip to content
This repository was archived by the owner on May 9, 2026. It is now read-only.

feat: agent 0.12.7 (model dropdown in key wizard)#90

Merged
protosphinx merged 1 commit into
mainfrom
feat/model-dropdown-wizard
Apr 21, 2026
Merged

feat: agent 0.12.7 (model dropdown in key wizard)#90
protosphinx merged 1 commit into
mainfrom
feat/model-dropdown-wizard

Conversation

@protosphinx
Copy link
Copy Markdown
Contributor

Summary

  • Extended the local key wizard at 127.0.0.1:4242 with a provider+model picker so the active model is one click away (no more hand-editing config.json or typing dotted OpenRouter slugs from memory).
  • For OpenRouter, the model <select> is hydrated live from openrouter.ai/api/v1/models (proxied via a new /openrouter-models endpoint, cached 1h, shared across tabs). Options are sorted cheapest first and labeled with in $X/M · out $Y/M · N k ctx so Kimi K2, MiniMax, DeepSeek, Llama and Qwen are easy to spot when Opus 4.7 starts hurting.
  • Save now writes shared-keys.json (keys) and the active profile's config.json (provider, model) in one round-trip. Flow is paste-key → pick-model → Save → say go.
  • Selecting an OpenRouter-style slug while the provider is anthropic (or vice versa) gets repaired at save time via normalizeModelForProvider, so on-disk state is always clean.
  • Expanded MODEL_SUGGESTIONS.openrouter from 4 to 14 entries so the fallback list (when live fetch fails) is still useful.

Test plan

  • pnpm typecheck clean
  • pnpm build clean
  • Smoke: boot server, GET / renders provider + model selects, fallback map present
  • Smoke: GET /openrouter-models returns 345 models (200 OK, cached)
  • Smoke: POST /save with { provider: 'openrouter', model: 'moonshotai/kimi-k2' } flips per-profile config.json from anthropic / claude-opus-4-7openrouter / moonshotai/kimi-k2
  • Manual: type /keys in chat, pick a non-Opus model, send a message, verify next turn uses the new model

The key-wizard at 127.0.0.1:4242 now carries a provider+model picker.
For OpenRouter the model <select> is populated live from
openrouter.ai/api/v1/models (proxied through the local server, cached
1h) so the full 300+ catalogue is one click away, sorted cheapest-first
so Kimi, MiniMax, DeepSeek, Llama, Qwen are easy to find when Opus 4.7
starts hurting. Save writes shared-keys.json AND the active profile's
config.json in one motion: paste key, pick model, click Save, say go.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@protosphinx protosphinx merged commit 9dbe41f into main Apr 21, 2026
2 checks passed
@protosphinx protosphinx deleted the feat/model-dropdown-wizard branch April 21, 2026 22:38
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant