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

feat: agent 0.12.12 (curated OpenRouter top 10, wizard redesign, fix dropdown wipe)#95

Merged
protosphinx merged 1 commit into
mainfrom
proto/wizard-cleanup
Apr 22, 2026
Merged

feat: agent 0.12.12 (curated OpenRouter top 10, wizard redesign, fix dropdown wipe)#95
protosphinx merged 1 commit into
mainfrom
proto/wizard-cleanup

Conversation

@protosphinx
Copy link
Copy Markdown
Contributor

Summary

  • OpenRouter dropdown is now a curated top 10, not the full 300+ catalogue. New CURATED_OPENROUTER_MODELS grouped into Frontier / Balanced / Fast / Specialized. Live fetch still runs so pricing + context chips stay accurate, but only curated slugs render as <optgroup>-labelled options. Custom slugs still work via config.json.
  • Dropdown wipe bug fixed. Picking a model on OpenRouter used to get silently clobbered the moment the live /openrouter-models fetch resolved, because the async re-render passed the page-load-time ACTIVE_MODEL back to setOptions instead of the user's current pick. New selectionFor() helper reads modelSel.value on same-provider re-renders; a loadToken request-race guard also prevents a slow fetch landing after the user has already flipped providers.
  • Wizard page redesigned for breathing room. 640px card, 40px/44px padding, provider + model unstacked into full-width rows, sectioned blocks with dividers, larger typography, custom chevron on <select>, actions row gets its own divider. Cramped 560px two-column layout is gone.

Test plan

  • pnpm run typecheck clean
  • pnpm run build clean
  • node scripts/smoke-normalize-model.mjs still passes (23/23)
  • curl http://127.0.0.1:4242/ against a throwaway $HOME preview returns the new HTML with CURATED_OPENROUTER, Frontier, selectionFor, loadToken, max-width: 640, and two .section blocks
  • Real interaction check (user): dropdown no longer wipes on select; page looks less cramped

🤖 Generated with Claude Code

…dropdown wipe)

The OpenRouter dropdown dumped 300+ models sorted cheapest-first, which
was noise, and selecting a model often wiped itself the moment the live
fetch resolved because the async re-render passed ACTIVE_MODEL back to
setOptions instead of the user's current pick.

Curated top 10 in src/model.ts (CURATED_OPENROUTER_MODELS), grouped into
Frontier / Balanced / Fast / Specialized. Live fetch still runs so the
pricing + context chips stay accurate, but only the curated slugs render
as <optgroup>-labelled options. Custom slugs still work via config.json.

Dropdown bug fixed with selectionFor() reading modelSel.value on
same-provider re-renders and a loadToken request-race guard.

Wizard page redesigned: 640px card, 40px/44px padding, provider+model
unstacked into full-width rows, sectioned blocks with dividers, larger
typography, custom chevron on <select>. Cramped 560px two-column
layout is gone.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@protosphinx protosphinx merged commit aea44e3 into main Apr 22, 2026
2 checks passed
@protosphinx protosphinx deleted the proto/wizard-cleanup branch April 22, 2026 02:33
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