Comma Agents
@comma-agents/coreCredentials

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 IDEnvironment variable(s)Notes
openaiOPENAI_API_KEY
anthropicANTHROPIC_API_KEY
googleGOOGLE_GENERATIVE_AI_API_KEY, GOOGLE_API_KEYFirst match wins
google-vertexGOOGLE_VERTEX_API_KEY
github-copilotGITHUB_TOKENUses OpenAI-compatible endpoint with Copilot headers
mistralMISTRAL_API_KEY
cohereCOHERE_API_KEY
groqGROQ_API_KEY
perplexityPERPLEXITY_API_KEY
fireworksFIREWORKS_API_KEY
togetherTOGETHER_AI_API_KEY, TOGETHER_API_KEYFirst match wins
deepseekDEEPSEEK_API_KEY
xaiXAI_API_KEY
openrouterOPENROUTER_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 IDAuthentication
ollamaNo key needed (local inference)
bedrockAWS credentials (IAM role, AWS_ACCESS_KEY_ID, etc.)
azureAzure-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

On this page