Admin UI for AI providers + ChatGPT sign-in#84
Merged
Conversation
Adds an admin-only "AI providers" section to Settings (works on web — same codebase) so the Discover AI config is managed in-app instead of only via server env vars, backed by the new /api/settings/ai-providers + /api/settings/chatgpt-login endpoints: - Per-provider (Anthropic/Gemini/OpenAI) key cards: paste to set (obscured input), masked "••last4 · env/runtime" badge, Clear (only for runtime keys) to revert to the env value. Keys are write-only — never read back. - Embedding + ranking provider selection as chips (incl. Auto), with a live "Using <provider> (<model>)" / "None available" readout. - ChatGPT subscription card: Connect starts the device sign-in, opens the verification URL, shows the code, and auto-polls every 3s until connected; Sign out clears it; surfaces the needs-reauth state. - lib/models/ai_providers.dart (plain JSON models, no codegen), api_service methods, endpoint constants, and a widget test covering the render/masking/save paths. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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
Adds an admin-only AI providers section to Settings (works on web too — same codebase) so the Discover AI configuration is managed from the app instead of only via server env vars. Pairs with backend #129 (runtime AI-config store) and #128 (ChatGPT sign-in).
••last4 · env/runtimebadge showing whether the effective key comes from the app or the container env, and Clear (shown only for app-set keys) to revert to the env value. Keys are write-only — never read back from the server.<provider>(<model>)" / "None available — add a key or sign in" readout.Notes
Test plan
setAiKeypaths.dart formatclean,flutter analyze --fatal-infos --fatal-warningsclean, all 233 tests pass locally.🤖 Generated with Claude Code