Add Claude Pro/Max, Mistral, Cerebras and OpenRouter connectors

Closes the Anthropic OAuth gap with a native Claude Pro/Max device sign-in
(reusing the OAuth engine) and adds three OpenAI-compatible API-key
providers. Model lists are sourced from the provider registry. A backfill
migration seeds the new providers into existing organizations idempotently.
This commit is contained in:
ZacharyZhang-NY committed 2026-05-29 20:19:01 -04:00
1 parent 49a9f16221
commit 9ce1281054
9 files changed
+213 -20

No files matched your search

@@ -20,6 +20,15 @@ const RAW_CATALOG: Omit<ProviderCatalogEntry, "models">[] = [
signInUrl: null,
credentialHelp: "Generate an API key at console.anthropic.com → API keys.",
},
{
key: "claude-pro",
label: "Claude Pro/Max",
authType: PROVIDER_AUTH_TYPE.OAUTH_PKCE,
defaultModel: "claude-sonnet-4-5",
capabilityTags: ["account", "subscription"],
signInUrl: "https://claude.ai/login",
credentialHelp: "Sign in with your Claude Pro or Max account in the browser; AgentCompany finishes the handshake.",
},
{
key: "xai",
label: "xAI Grok",
@@ -38,6 +47,33 @@ const RAW_CATALOG: Omit<ProviderCatalogEntry, "models">[] = [
signInUrl: null,
credentialHelp: "Generate an API key at console.groq.com → API keys.",
},
{
key: "mistral",
label: "Mistral",
authType: PROVIDER_AUTH_TYPE.API_KEY,
defaultModel: "mistral-large-latest",
capabilityTags: ["chat", "reasoning"],
signInUrl: null,
credentialHelp: "Generate an API key at console.mistral.ai → API keys.",
},
{
key: "cerebras",
label: "Cerebras",
authType: PROVIDER_AUTH_TYPE.API_KEY,
defaultModel: "qwen-3-235b-a22b-instruct-2507",
capabilityTags: ["inference", "fast"],
signInUrl: null,
credentialHelp: "Generate an API key at cloud.cerebras.ai → API keys.",
},
{
key: "openrouter",
label: "OpenRouter",
authType: PROVIDER_AUTH_TYPE.API_KEY,
defaultModel: "anthropic/claude-sonnet-4.5",
capabilityTags: ["router", "multi-model"],
signInUrl: null,
credentialHelp: "Generate an API key at openrouter.ai → Keys.",
},
{
key: "github-copilot",
label: "GitHub Copilot",
+59 -19
View File
@@ -3,6 +3,26 @@ export interface ProviderModelEntry {
name: string;
}
const ANTHROPIC_MODELS: ProviderModelEntry[] = [
{ id: "claude-opus-4-7", name: "Claude Opus 4.7" },
{ id: "claude-opus-4-6", name: "Claude Opus 4.6" },
{ id: "claude-opus-4-5", name: "Claude Opus 4.5 (latest)" },
{ id: "claude-opus-4-1", name: "Claude Opus 4.1 (latest)" },
{ id: "claude-opus-4-0", name: "Claude Opus 4 (latest)" },
{ id: "claude-sonnet-4-6", name: "Claude Sonnet 4.6" },
{ id: "claude-sonnet-4-5", name: "Claude Sonnet 4.5 (latest)" },
{ id: "claude-sonnet-4-0", name: "Claude Sonnet 4 (latest)" },
{ id: "claude-haiku-4-5", name: "Claude Haiku 4.5 (latest)" },
{ id: "claude-3-7-sonnet-20250219", name: "Claude Sonnet 3.7" },
{ id: "claude-3-5-sonnet-20241022", name: "Claude Sonnet 3.5 v2" },
{ id: "claude-3-5-sonnet-20240620", name: "Claude Sonnet 3.5" },
{ id: "claude-3-5-haiku-latest", name: "Claude Haiku 3.5 (latest)" },
{ id: "claude-3-5-haiku-20241022", name: "Claude Haiku 3.5" },
{ id: "claude-3-haiku-20240307", name: "Claude Haiku 3" },
{ id: "claude-3-sonnet-20240229", name: "Claude Sonnet 3" },
{ id: "claude-3-opus-20240229", name: "Claude Opus 3" },
];
export const PROVIDER_MODELS: Record<string, ProviderModelEntry[]> = {
openai: [
{ id: "gpt-5.4-pro", name: "GPT-5.4 Pro" },
@@ -43,25 +63,8 @@ export const PROVIDER_MODELS: Record<string, ProviderModelEntry[]> = {
{ id: "gpt-4-turbo", name: "GPT-4 Turbo" },
{ id: "gpt-4", name: "GPT-4" },
],
anthropic: [
{ id: "claude-opus-4-7", name: "Claude Opus 4.7" },
{ id: "claude-opus-4-6", name: "Claude Opus 4.6" },
{ id: "claude-opus-4-5", name: "Claude Opus 4.5 (latest)" },
{ id: "claude-opus-4-1", name: "Claude Opus 4.1 (latest)" },
{ id: "claude-opus-4-0", name: "Claude Opus 4 (latest)" },
{ id: "claude-sonnet-4-6", name: "Claude Sonnet 4.6" },
{ id: "claude-sonnet-4-5", name: "Claude Sonnet 4.5 (latest)" },
{ id: "claude-sonnet-4-0", name: "Claude Sonnet 4 (latest)" },
{ id: "claude-haiku-4-5", name: "Claude Haiku 4.5 (latest)" },
{ id: "claude-3-7-sonnet-20250219", name: "Claude Sonnet 3.7" },
{ id: "claude-3-5-sonnet-20241022", name: "Claude Sonnet 3.5 v2" },
{ id: "claude-3-5-sonnet-20240620", name: "Claude Sonnet 3.5" },
{ id: "claude-3-5-haiku-latest", name: "Claude Haiku 3.5 (latest)" },
{ id: "claude-3-5-haiku-20241022", name: "Claude Haiku 3.5" },
{ id: "claude-3-haiku-20240307", name: "Claude Haiku 3" },
{ id: "claude-3-sonnet-20240229", name: "Claude Sonnet 3" },
{ id: "claude-3-opus-20240229", name: "Claude Opus 3" },
],
anthropic: ANTHROPIC_MODELS,
"claude-pro": ANTHROPIC_MODELS,
xai: [
{ id: "grok-4", name: "Grok 4" },
{ id: "grok-4-fast", name: "Grok 4 Fast" },
@@ -186,6 +189,43 @@ export const PROVIDER_MODELS: Record<string, ProviderModelEntry[]> = {
{ id: "gemini-1.5-pro", name: "Gemini 1.5 Pro" },
{ id: "gemini-1.5-flash", name: "Gemini 1.5 Flash" },
],
mistral: [
{ id: "mistral-large-latest", name: "Mistral Large (latest)" },
{ id: "mistral-large-2512", name: "Mistral Large 3" },
{ id: "mistral-medium-latest", name: "Mistral Medium (latest)" },
{ id: "mistral-medium-2508", name: "Mistral Medium 3.1" },
{ id: "mistral-small-latest", name: "Mistral Small (latest)" },
{ id: "mistral-small-2603", name: "Mistral Small 4" },
{ id: "magistral-medium-latest", name: "Magistral Medium (latest)" },
{ id: "magistral-small", name: "Magistral Small" },
{ id: "codestral-latest", name: "Codestral (latest)" },
{ id: "devstral-medium-latest", name: "Devstral Medium (latest)" },
{ id: "devstral-small-2507", name: "Devstral Small" },
{ id: "ministral-8b-latest", name: "Ministral 8B (latest)" },
{ id: "ministral-3b-latest", name: "Ministral 3B (latest)" },
{ id: "pixtral-large-latest", name: "Pixtral Large (latest)" },
{ id: "open-mistral-nemo", name: "Mistral Nemo" },
],
cerebras: [
{ id: "qwen-3-235b-a22b-instruct-2507", name: "Qwen 3 235B Instruct" },
{ id: "gpt-oss-120b", name: "GPT OSS 120B" },
{ id: "zai-glm-4.7", name: "Z.AI GLM-4.7" },
{ id: "llama3.1-8b", name: "Llama 3.1 8B" },
],
openrouter: [
{ id: "anthropic/claude-sonnet-4.5", name: "Anthropic: Claude Sonnet 4.5" },
{ id: "anthropic/claude-opus-4.5", name: "Anthropic: Claude Opus 4.5" },
{ id: "anthropic/claude-haiku-4.5", name: "Anthropic: Claude Haiku 4.5" },
{ id: "openai/gpt-5.2", name: "OpenAI: GPT-5.2" },
{ id: "openai/gpt-5.1", name: "OpenAI: GPT-5.1" },
{ id: "google/gemini-3-pro-preview", name: "Google: Gemini 3 Pro Preview" },
{ id: "google/gemini-2.5-pro", name: "Google: Gemini 2.5 Pro" },
{ id: "google/gemini-2.5-flash", name: "Google: Gemini 2.5 Flash" },
{ id: "x-ai/grok-4", name: "xAI: Grok 4" },
{ id: "deepseek/deepseek-chat", name: "DeepSeek: DeepSeek Chat" },
{ id: "meta-llama/llama-4-maverick", name: "Meta: Llama 4 Maverick" },
{ id: "qwen/qwen3-235b-a22b", name: "Qwen: Qwen3 235B A22B" },
],
};
export function listProviderModels(providerKey: string): ProviderModelEntry[] {