Supported Providers
Built-in provider IDs and the environment variables used to resolve their API keys.
Supported providers
Comma-agents ships with well-known environment variable mappings for common AI providers. When a credential is needed, the store checks these variables automatically — no configuration required.
Provider table
| Provider ID | Environment variable(s) | Notes |
|---|---|---|
openai | OPENAI_API_KEY | |
anthropic | ANTHROPIC_API_KEY | |
google | GOOGLE_GENERATIVE_AI_API_KEY, GOOGLE_API_KEY | First match wins |
google-vertex | GOOGLE_VERTEX_API_KEY | |
github-copilot | GITHUB_TOKEN | Uses OpenAI-compatible endpoint with Copilot headers |
mistral | MISTRAL_API_KEY | |
cohere | COHERE_API_KEY | |
groq | GROQ_API_KEY | |
perplexity | PERPLEXITY_API_KEY | |
fireworks | FIREWORKS_API_KEY | |
together | TOGETHER_AI_API_KEY, TOGETHER_API_KEY | First match wins |
deepseek | DEEPSEEK_API_KEY | |
xai | XAI_API_KEY | |
openrouter | OPENROUTER_API_KEY |
For providers with multiple env var aliases (e.g. google, together), the first variable listed is checked first. The second is a fallback alias.
Providers without built-in env vars
Some providers work out of the box without API keys or use alternative authentication:
| Provider ID | Authentication |
|---|---|
ollama | No key needed (local inference) |
bedrock | AWS credentials (IAM role, AWS_ACCESS_KEY_ID, etc.) |
azure | Azure-specific auth (managed identity, AZURE_API_KEY, etc.) |
These providers can be registered via registerProvider() and their credentials managed through the credential store's custom credential type or by setting environment variables directly.
Custom env var mappings
If a provider uses a non-standard env var name, pass envVarOverrides when creating the credential store:
import { createCredentialStore, createJsonFileBackend, resolveCredentialsPath } from "@comma-agents/core";
const store = createCredentialStore({
backend: createJsonFileBackend({ filePath: resolveCredentialsPath() }),
envVarOverrides: {
// Override the default env var for OpenAI
openai: ["MY_CUSTOM_OPENAI_KEY"],
// Add a new provider not in the built-in list
"my-provider": ["MY_PROVIDER_API_KEY"],
},
});Overrides replace (not merge with) the built-in entry for a given provider ID. Providers not mentioned in envVarOverrides keep their default env var mappings.
WELL_KNOWN_ENV_VARS
The built-in mappings are exported as a constant for programmatic access:
import { WELL_KNOWN_ENV_VARS } from "@comma-agents/core";
// { openai: ["OPENAI_API_KEY"], anthropic: ["ANTHROPIC_API_KEY"], ... }Prop
Type