Files
AgentCompany/src/shared/provider-catalog.ts
T

204 lines
7.1 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import { PROVIDER_AUTH_TYPE, type ProviderCatalogEntry } from "./domain";
import { listProviderModels } from "./provider-models";
const RAW_CATALOG: Omit<ProviderCatalogEntry, "models" | "supportsLiveModels" | "revokesRemotely">[] = [
{
key: "openai",
label: "OpenAI",
authType: PROVIDER_AUTH_TYPE.API_KEY,
defaultModel: "gpt-5.4",
capabilityTags: ["responses", "tools", "background"],
signInUrl: null,
credentialHelp: "Generate an API key at platform.openai.com → API keys.",
},
{
key: "anthropic",
label: "Anthropic",
authType: PROVIDER_AUTH_TYPE.API_KEY,
defaultModel: "claude-sonnet-4-5",
capabilityTags: ["messages", "tool-use", "token-bucket"],
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",
authType: PROVIDER_AUTH_TYPE.API_KEY,
defaultModel: "grok-4",
capabilityTags: ["chat", "reasoning"],
signInUrl: null,
credentialHelp: "Generate an API key at console.x.ai → API keys.",
},
{
key: "groq",
label: "Groq",
authType: PROVIDER_AUTH_TYPE.API_KEY,
defaultModel: "groq/compound",
capabilityTags: ["inference", "low-latency"],
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: "kimi",
label: "Kimi",
authType: PROVIDER_AUTH_TYPE.API_KEY,
defaultModel: "kimi-k2.7-code",
capabilityTags: ["chat", "coding"],
signInUrl: null,
credentialHelp: "Generate an API key at platform.kimi.ai → API keys.",
},
{
key: "kimi-cn",
label: "Kimi CN",
authType: PROVIDER_AUTH_TYPE.API_KEY,
defaultModel: "kimi-k2.7-code",
capabilityTags: ["chat", "coding"],
signInUrl: null,
credentialHelp: "Generate an API key at platform.kimi.com → API keys.",
},
{
key: "github-copilot",
label: "GitHub Copilot",
authType: PROVIDER_AUTH_TYPE.OAUTH_PKCE,
defaultModel: "claude-opus-4-5",
capabilityTags: ["account", "coding"],
signInUrl: "https://github.com/login/device",
credentialHelp: "Sign in with the GitHub device code shown here — no token to copy.",
},
{
key: "google-antigravity",
label: "Google Antigravity",
authType: PROVIDER_AUTH_TYPE.OAUTH_PKCE,
defaultModel: "claude-sonnet-4-5",
capabilityTags: ["account", "coding"],
signInUrl: "https://antigravity.google/",
credentialHelp: "Sign in with your Google account in the browser; AgentCompany finishes the handshake.",
},
{
key: "gpt-account",
label: "GPT account",
authType: PROVIDER_AUTH_TYPE.ACCOUNT_SUBSCRIPTION,
defaultModel: "gpt-5.3-codex",
capabilityTags: ["codex", "subscription"],
signInUrl: "https://chatgpt.com/codex",
credentialHelp: "Sign in to ChatGPT Plus/Pro in the browser; AgentCompany finishes the handshake.",
},
{
key: "kimi-code",
label: "Kimi Code",
authType: PROVIDER_AUTH_TYPE.OAUTH_PKCE,
defaultModel: "kimi-for-coding",
capabilityTags: ["account", "coding"],
signInUrl: "https://www.kimi.com/code",
credentialHelp: "Sign in with your Kimi plan account in the browser; AgentCompany finishes the device-code handshake.",
},
{
key: "azure-openai",
label: "Azure OpenAI",
authType: PROVIDER_AUTH_TYPE.CLOUD,
defaultModel: "gpt-5.4",
capabilityTags: ["enterprise", "regional"],
signInUrl: null,
credentialHelp: "Set base URL (e.g. https://<resource>.openai.azure.com), deployment name, and the api-key from Azure portal.",
},
{
key: "aws-bedrock",
label: "AWS Bedrock",
authType: PROVIDER_AUTH_TYPE.CLOUD,
defaultModel: "anthropic.claude-sonnet-4-5",
capabilityTags: ["enterprise", "multi-model"],
signInUrl: null,
credentialHelp: "Provide AWS region plus an access key + secret access key with bedrock:InvokeModel permission.",
},
{
key: "vertex-ai",
label: "Vertex AI",
authType: PROVIDER_AUTH_TYPE.CLOUD,
defaultModel: "gemini-2.5-pro",
capabilityTags: ["enterprise", "regional"],
signInUrl: null,
credentialHelp: "Provide GCP project id, region, and a service-account JSON key with aiplatform.user role.",
},
{
key: "custom-openai",
label: "Custom OpenAI-compatible",
authType: PROVIDER_AUTH_TYPE.CLOUD,
defaultModel: null,
capabilityTags: ["custom", "openai-compatible"],
signInUrl: null,
credentialHelp: "Set the base URL (ending in /v1) of any OpenAI Chat Completions–compatible endpoint, then enter the model id. A server on this computer or your local network may use http:// and needs a key only if it asks for one.",
customEndpoint: "openai",
},
{
key: "custom-anthropic",
label: "Custom Anthropic-compatible",
authType: PROVIDER_AUTH_TYPE.CLOUD,
defaultModel: null,
capabilityTags: ["custom", "anthropic-compatible"],
signInUrl: null,
credentialHelp: "Set the base URL of any Anthropic Messages–compatible endpoint, then enter the model id. A server on this computer or your local network may use http:// and needs a key only if it asks for one.",
customEndpoint: "anthropic",
},
];
// Providers with no enumerable models endpoint: the Codex subscription, the
// browser-token / cloud connectors, and user-configured custom endpoints whose
// model id is entered by hand. The UI offers a fixed dropdown (when a curated
// list exists) or a free-text model id instead of a live fetch.
const CURATED_MODEL_PROVIDERS = new Set([
"github-copilot",
"google-antigravity",
"gpt-account",
"azure-openai",
"aws-bedrock",
"vertex-ai",
"custom-openai",
"custom-anthropic",
]);
// Google documents a token revocation endpoint (RFC 7009); the others offer none for what we hold.
const REMOTE_REVOCATION = new Set(["google-antigravity"]);
export const PROVIDER_CATALOG: ProviderCatalogEntry[] = RAW_CATALOG.map((entry) => ({
...entry,
models: listProviderModels(entry.key),
supportsLiveModels: !CURATED_MODEL_PROVIDERS.has(entry.key),
revokesRemotely: REMOTE_REVOCATION.has(entry.key),
}));