Files
openswarm/backend/apps/settings
ciregenzandClaude Opus 4.6 b9b044a2e3 [eric] 9Router subscription proxy, GitHub Copilot auth, Settings restructure
Subscription access (WIP):
- 9Router integration: auto-detects if running, routes through user's subscriptions
- Fallback routing: no API key → check 9Router → use subscription
- Model ID mapping for 9Router (cc/ prefix for Claude Code models)
- GitHub Copilot OAuth device flow (copilot_auth.py, providers/copilot.py)
- Copilot auth endpoints: start-auth, poll-auth, models, disconnect

Settings restructure:
- 4 tabs: General, Models, Usage, Commands
- Models tab: Subscriptions section (9Router + Copilot) + API Keys section
- Per-provider "CONNECTED" badges
- Subscription token fields removed (Anthropic banned OAuth in third-party apps)
- 9Router auto-detection with "Check Connection" button

Provider routing:
- create_provider() checks subscription tokens → API keys → 9Router fallback
- validate_credentials() allows through if 9Router is running
- 9Router model ID mapping (sonnet → cc/claude-sonnet-4-6)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 20:46:26 -07:00
..