Skip to content

feat: Provider + Skills Architecture (Phase 1)#3

Merged
rogerchappel merged 9 commits into
mainfrom
feature/provider-skills-architecture
Apr 1, 2026
Merged

feat: Provider + Skills Architecture (Phase 1)#3
rogerchappel merged 9 commits into
mainfrom
feature/provider-skills-architecture

Conversation

@rogerchappel
Copy link
Copy Markdown
Owner

Summary

Replaces hardcoded model lists with dynamic provider-based model fetching. First phase of the provider+skills architecture (design doc).

Changes

Schema

  • Added provider column to agents table (anthropic/openai/google/openrouter)
  • Added company_provider_keys table for storing API keys per company per provider
  • Drizzle migration generated

API

  • GET /api/providers/[provider]/models — fetches models dynamically from provider APIs (Anthropic, OpenAI, Google, OpenRouter) with 1-hour in-memory cache
  • GET/POST/DELETE /api/provider-keys — CRUD for company provider API keys (keys stored encrypted, returned masked)

UI

  • Agent config: added provider selector (Anthropic/OpenAI/Google/OpenRouter)
  • Agent config: model field now fetches dynamically from provider API when key is configured, falls back to free text
  • Company settings: provider key management section (add/view/delete API keys)
  • AdapterCheck: only shows available tools (no more red crosses)
  • Reports To: added 'Me (you)' option
  • Fixed text contrast on adapter check badges

Migration

  • scripts/migrate-provider-from-adapter.ts infers provider from existing adapter_type

What's NOT changed

  • Existing adapter system still works (additive change)
  • No breaking changes to agent execution
  • Phase 2 (skills abstraction) and Phase 3 (marketplace) tracked in design doc

Testing

  • tsc --noEmit passes
  • next build passes

rogerchappel and others added 9 commits April 1, 2026 09:29
- 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
Copy link
Copy Markdown
Owner Author

@rogerchappel rogerchappel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good

@rogerchappel rogerchappel merged commit c15062c into main Apr 1, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant