Skip to content

feat(options): AI model picker for hosted and BYO-key generation - #58

Merged
PAMulligan merged 1 commit into
mainfrom
21-model-choice
Aug 21, 2026
Merged

feat(options): AI model picker for hosted and BYO-key generation#58
PAMulligan merged 1 commit into
mainfrom
21-model-choice

Conversation

@PAMulligan

Copy link
Copy Markdown
Contributor

Summary

Client half of PMDevSolutions/optia-backend#21 (server half: optia-backend#25, already live on staging).

  • Options page "AI model" picker: with a working BYO key + toggle on, lists the newest models available on the user's own Anthropic key (client.models.list, newest-first); otherwise lists the hosted allowlist from the new GET /ai/models ("included with Optia's hosted AI at no extra charge"). Hidden gracefully when neither list loads (bad key/offline).
  • Per-mode persistence: byok_model / hosted_model storage keys, hydrated into the store alongside the API key.
  • Plumbing: proxy requests carry model (server rejects anything off its allowlist before metering); the BYO-key direct path reads the selected model at call time, falling back to the built-in default.

Closes PMDevSolutions/optia-backend#21 together with optia-backend#25.

Stacked on #56 (contains its commit).

Testing

521/521 (new: store persistence/hydration round-trip, proxy request carries the selected model, options picker renders the hosted menu and saves the selection); typecheck, lint, build clean.

🤖 Generated with Claude Code

Client half of optia-backend#21. The options page gains an "AI model"
select: with a working BYO key it lists the newest models available on
the user's own Anthropic key (client.models.list); otherwise it lists the
hosted allowlist from GET /ai/models ("included, no extra charge"). The
selection persists per mode (byok_model / hosted_model), hydrates with the
store, rides proxy requests as `model` (server-validated against the
allowlist), and overrides the built-in default on the direct path.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@PAMulligan
PAMulligan merged commit a23f4ea into main Aug 21, 2026
5 checks passed
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