cloud/C11: add Lumina Cloud row to AISettingsModal providers list#243
cloud/C11: add Lumina Cloud row to AISettingsModal providers list#243blueberrycongee merged 2 commits intomainfrom
Conversation
Display-only addition per the C11 spec. The WIP that originally gated this task (Save / Reset for the chat provider section) was landed in 441baf4 — working tree is now clean, signalling implicit unblock from Lead. Three additive imports plus a two-line derivation: import { LUMINA_CLOUD_PROVIDER, LUMINA_CLOUD_PROVIDER_ID, isLuminaCloudVisible } from "@/services/llm/providers/luminaCloud"; import { useLicenseStore } from "@/stores/useLicenseStore"; ... const licenseFeatures = useLicenseStore((s) => s.payload?.features); const licenseFeaturesForCloud = isLuminaCloudVisible(licenseFeatures); The provider Select's `options` array is rebuilt as a spread: existing PROVIDER_MODELS entries plus, when the license has the `cloud_ai` feature, a single `{ value: 'lumina-cloud', label: 'Lumina Cloud' }` row. No change to onValueChange, the rehydrate flow, dirty tracking, Save / Reset, or any other AISettingsModal logic — the spec's "display only" cap is honored to the letter. Selecting the option triggers the existing onValueChange path, which falls through harmlessly because PROVIDER_MODELS doesn't have a 'lumina-cloud' entry: defaultBaseUrl is undefined, the model dropdown is empty. Wiring the actual chat path through this provider belongs to a future task (the Account tab is the canonical entry point for cloud AI today). C11's only acceptance bullet is "Add Lumina Cloud to the providers list display only" — done. No new tests; the visibility predicate itself is covered by C7's 8 tests, and AISettingsModal has no existing test file (hence no test-mock to update). Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1f60461ef5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ...(licenseFeaturesForCloud | ||
| ? [{ | ||
| value: LUMINA_CLOUD_PROVIDER_ID, | ||
| label: LUMINA_CLOUD_PROVIDER.label, | ||
| }] |
There was a problem hiding this comment.
Disable unsupported Lumina Cloud provider selection
When cloud_ai is present, this adds a normal selectable option with value: "lumina-cloud", but the rest of the provider pipeline still treats only the existing LLMProviderType set as configurable. If a user picks this row and saves, config.provider becomes an unmapped provider ID (no PROVIDER_MODELS entry and no opencode provider mapping), which leads to an empty/invalid model path and backend provider sync errors being swallowed in useAIStore.setConfig; the UI can report success while chat requests run without the intended provider/model. Since C11 is display-only, this row should be rendered non-selectable (or otherwise prevented from mutating config) until provider wiring exists.
Useful? React with 👍 / 👎.
What
Adds the visibility-gated "Lumina Cloud" row to the providers
Selectinsrc/components/ai/AISettingsModal.tsx. Display-only per the C11 spec — no change to onValueChange, the rehydrate flow, Save / Reset, dirty tracking, or any other modal logic.Why now
The WIP edit that originally pre-blocked C11 (the Save / Reset refactor for the chat provider section) was committed in
441baf4("refactor(ai-settings): explicit Save / Reset for the chat provider section"). The C11 [BLOCKED] marker oncloud/TASKS.mdis left over from that gate; the underlying reason ("uncommitted work in progress") no longer applies. Same implicit-unblock pattern as #240 (C3), #241 (C10), #242 (C13).Changes
That's it. ~14 added lines total in
AISettingsModal.tsx. Nothing else in the modal is touched.Acceptance criteria
cloud_ai.cloud_ai(theisLuminaCloudVisiblepredicate enforces this — its 6 cases are covered by C7's PR cloud/C7: Lumina Cloud provider definition (re-issued) #235 tests).How I tested
npm run typecheck: pass.npm test -- --run src/__tests__/luminaCloud.e2e.test.ts src/services/luminaCloud/ src/components/settings/ src/stores/useLicenseStore.test.ts: 97/97 pass — the cloud surface is unaffected.AISettingsModal.tsxhas no existing test file, so no test mocks to update. Visibility logic is already exhaustively tested in C7.Touched files
src/components/ai/AISettingsModal.tsx— 14 added lines (3 imports, 1 store hook + 1 derived bool, 8-lineoptionsspread). On the PRD §3 allow-list for "minimal additive edits".cloud/TASKS.md— marked C11[x]and appended Done-log entry.Notes for Lead
onValueChange, which falls through harmlessly:PROVIDER_MODELS['lumina-cloud']?.defaultBaseUrlisundefined, the Model dropdown is empty, the user can't actually configure anything from this modal yet. The Account tab (C10) is the canonical entry point for cloud AI today; this row is essentially a discovery affordance for users who already see the "AI" tab and would otherwise miss the cloud option.fetchLuminaCloudModels, OpenAI-compatible plumbing, etc.) is a P2 follow-up — not in scope for C11's "display only" guidance.cloud/TASKS.mdis[x].