feat(options): AI model picker for hosted and BYO-key generation - #58
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Client half of PMDevSolutions/optia-backend#21 (server half: optia-backend#25, already live on staging).
client.models.list, newest-first); otherwise lists the hosted allowlist from the newGET /ai/models("included with Optia's hosted AI at no extra charge"). Hidden gracefully when neither list loads (bad key/offline).byok_model/hosted_modelstorage keys, hydrated into the store alongside the API key.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