Add OpenRouter and xAI with workspace AI model selection#143

merged2
feat/launch-verification
feat/workspace-ai-providers
openedOct 26, 2026bySScreen
View on GitHubTwo-way sync enabledPR last imported Oct 26, 2026

Summary

Merge order: #142 launch fixes → #143 provider support → #144 pitch demo.

Workspace Owners can connect Gemini, OpenAI, OpenRouter and xAI/Grok, then choose the provider and model for default runs and retries. Queued work retains its original selection and missing keys reject before quota use.

Dithered change diagram. See Evidence below for verification.

This is the middle layer of the launch/demo stack, based on feat/launch-verification. Includes provider disclosures and the recovery/launch evidence. Paid backup setup is deferred; user backups stay local.

Evidence

  • Before: provider keys and model routing were fixed to Gemini/OpenAI. After: tests cover all four encrypted credential paths, Owner-only management, both new adapter endpoints, pinned queued selections and stable cache/quota behavior when unchanged model settings are saved.
  • Final stack: 322 backend tests and 326 unit tests pass; app typecheck, build and design checks pass. Published settings were checked for the new key inputs and model controls.
  • The bounded Gemini production attempt failed and its key was removed. Screen will perform Gemini live testing; OpenAI/OpenRouter/xAI real-key verification is still pending. No successful live provider call is claimed.

Merge Danger

Door: two-way

A code rollback after new provider records are stored must retain the widened schema/validators; do not delete saved credentials or narrow the schema blindly.

Blast Radius: AI

Changes AI routing and Workspace settings. Existing workspaces retain their previous default models. No shared Relay-key fallback or automatic provider retries. Ref: https://github.com/screen-gd/Relay/issues/92 and https://github.com/screen-gd/Relay/issues/94.

Remote check note: the Cloudflare app and marketing builds reported failure for this head. The GitHub Typecheck, build, and audit check and full local check pass. Detailed build logs require additional Cloudflare access; the available account token cannot read Workers Builds logs. This external deployment check remains open under launch issue #90.

Checks

2 failing · 2 successful
Some checks were not successful

Failing2

389c9be

Added 1 commit

  • Support OpenRouter and xAI with workspace-selected AI models79dc2ea
Synced from GitHub

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 32 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ec281984-6779-4417-b33b-039f47acf692
Commits

Reviewing files that changed from the base of the PR and between 1df8d90e5e4181acb375883b12037b27ae26e5b4 and 389c9beb5acd91602e84dd6a11c72f6d43ddd302.

Files selected for processing: 17
  • apps/web/convex/aiCredentials.test.ts
  • apps/web/convex/aiCredentials.ts
  • apps/web/convex/aiGeneration.ts
  • apps/web/convex/aiRuns.test.ts
  • apps/web/convex/aiRuns.ts
  • apps/web/convex/aiValidators.ts
  • apps/web/convex/schema.ts
  • apps/web/src/app/privacy/privacy-page.tsx
  • apps/web/src/app/terms/terms-page.tsx
  • apps/web/src/features/settings/workspace-ai-settings.test.tsx
  • apps/web/src/features/settings/workspace-ai-settings.tsx
  • apps/website/app/privacy-and-data/page.tsx
  • docs/architecture/ai-foundation.md
  • docs/operations/launch-verification-2026-10-26.md
  • docs/operations/recovery.md
  • packages/shared/package.json
  • packages/shared/src/ai-providers.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Ccapy-aiBotreviewedOct 26, 2026
Synced from GitHub

Capy found no issues.

View 1 other finding in Capy.

Open in Capy

Added 1 commit

  • Merge branch 'feat/launch-verification' into feat/workspace-ai-providers389c9be