feat: Provider + Skills Architecture (Phase 1)#3
Merged
Conversation
- Replace stale hardcoded model dropdowns with plain text input - Add 'Me (you)' option to Reports To dropdown - Only show available tools in AdapterCheck (hide unavailable) - Improve text contrast on adapter check badges - Add design doc for provider+skills architecture RFC
…able Adds nullable `provider` column to agents (anthropic/openai/google/openrouter) and new `company_provider_keys` table for storing provider API keys per company. Part of Phase 1 provider+skills architecture. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…vider_keys Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Fetches models dynamically from Anthropic, OpenAI, Google, and OpenRouter APIs using company-level API keys. Results are cached in-memory for 1 hour. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Supports GET (list with masked keys), POST (create/upsert), and DELETE for managing company-level provider API keys. Mutations require auth. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add provider field to AgentConfigValues and wire through to API - When a provider is selected and company has an API key, fetch models dynamically from /api/providers/[provider]/models - Show searchable dropdown for providers with reasonable model counts - Show searchable combobox with free-text for OpenRouter (many models) - Fall back to free-text input when no API key is configured - Auto-infer provider from adapter type selection Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- List existing provider API keys (masked) - Add new key form with provider selector - Delete key functionality - Follows existing settings page visual patterns
Maps existing adapter_type to provider: - claude_local → anthropic - codex_local → openai - gemini_local → google - openrouter → openrouter - others → skipped (user picks later) Run: npx tsx scripts/migrate-provider-from-adapter.ts
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
Replaces hardcoded model lists with dynamic provider-based model fetching. First phase of the provider+skills architecture (design doc).
Changes
Schema
providercolumn to agents table (anthropic/openai/google/openrouter)company_provider_keystable for storing API keys per company per providerAPI
GET /api/providers/[provider]/models— fetches models dynamically from provider APIs (Anthropic, OpenAI, Google, OpenRouter) with 1-hour in-memory cacheGET/POST/DELETE /api/provider-keys— CRUD for company provider API keys (keys stored encrypted, returned masked)UI
Migration
scripts/migrate-provider-from-adapter.tsinfers provider from existing adapter_typeWhat's NOT changed
Testing
tsc --noEmitpassesnext buildpasses