Repository navigation
Closed
Labels
needs-triageMaintainer must evaluate this issueMaintainer must evaluate this issue
Description
Parent
Part of #1. Deferred out of #19 (PR #38), whose scope fence excludes provider expansion.
What to build
Nodepad V0 talks to local Ollama and, under consent, Ollama Cloud. This issue adds fallback providers and embedded video to the shipped Tauri app.
The source material already exists in the repository, in the unshipped Next.js prototype:
lib/ai-settings.ts— provider configuration for OpenRouter, OpenAI, and z.ai (base URLs, key URLs, header handling).lib/ai-enrich.ts— the client-side enrichment call and its JSON schema.components/intro-modal.tsx,components/about-panel.tsx—youtube-nocookie.comembeds.
None of it is compiled, bundled, or shipped today: tsconfig.json includes only src/**, and the Vite entry is index.html → src/main.tsx. Porting it is real work, not a wiring change.
Decisions
- Keep all three fallback providers: OpenRouter, OpenAI, z.ai. Ollama stays the default and the only provider used when the Assistance Policy is Local AI.
- Each provider needs its own keychain entry.
secrets.rscurrently hardcodes one service/account pair for the single Ollama Cloud credential. - A fallback provider is cloud traffic and requires the same explicit per-Workspace consent the Cloud AI policy already gates on.
- YouTube embeds require relaxing the webview CSP, which is
default-src 'self'today with noframe-src.
Work
- Generalize the keychain seam from one hardcoded credential to one per provider.
- Extend
cloud.rs(or add a sibling) so the provider is selectable rather than fixed tohttps://ollama.com. - Extend the Assistance Policy and consent surfaces to name which provider a Workspace would use.
- Add
frame-src https://www.youtube-nocookie.comto the CSP, scoped as narrowly as possible. - Update
ALLOWED_OUTBOUND_HOSTSinsrc-tauri/src/release_audit.rsand remove the corresponding entries fromFORBIDDEN_MARKERS. The release audit currently fails the build onopenrouter.ai,api.openai.com,api.z.ai, and any remote origin in the CSP — by design. Those failures are the audit doing its job; this issue is the deliberate act of changing the privacy surface, and the audit's rule tables are where that decision gets recorded. - Update
docs/v0/release-notes.md: the "no non-Ollama provider traffic" claim and the destination table both become false.
Testing
- Each provider's request path with a recording client, proving the right key reaches the right host and no other.
- Consent gating: no fallback provider request without per-Workspace consent.
- The sentinel audit must still pass with several keychain entries in play.
Scope fence
No new AI features beyond provider selection. No streaming. No per-provider model management beyond what discovery already does.
Metadata
Metadata
Assignees
Labels
needs-triageMaintainer must evaluate this issueMaintainer must evaluate this issue
Activity