# Supported LLM Providers in OpenClaude: Complete Provider List and Configuration Guide

> Explore OpenClaude's supported LLM providers including Anthropic, Bedrock, Vertex AI, OpenAI, and more. Get the complete list and easy configuration guide for Gitlawb/openclaude.

- Repository: [Gitlawb/openclaude](https://github.com/Gitlawb/openclaude)
- Tags: api-reference
- Published: 2026-09-08

---

**OpenClaude supports 12 LLM providers including Anthropic's official API, Amazon Bedrock, Google Vertex AI, OpenAI, GitHub Copilot, and NVIDIA NIM.**

The OpenClaude CLI abstracts multiple language model services behind a unified **API provider** architecture. This guide covers every supported provider, how to configure each one, and the source code implementation that powers provider selection.

## Complete List of Supported LLM Providers

OpenClaude recognizes the following provider identifiers, defined in the **`LegacyAPIProvider`** type at **[`src/utils/model/providers.ts`](https://github.com/Gitlawb/openclaude/blob/main/src/utils/model/providers.ts)** (lines 10-27):

| Provider ID | Service |
|-------------|---------|
| `firstParty` | Anthropic's official API (default) |
| `bedrock` | Amazon Bedrock |
| `vertex` | Google Vertex AI |
| `foundry` | Foundry (internal/experimental) |
| `openai` | OpenAI and OpenAI-compatible endpoints |
| `gemini` | Google Gemini |
| `github` | GitHub Copilot API |
| `codex` | OpenAI Codex (legacy) |
| `nvidia-nim` | NVIDIA NIM |
| `minimax` | Minimax AI |
| `mistral` | Mistral AI |
| `xai` | XAI |
| `xiaomi-mimo` | Xiaomi MIMO |

The `LegacyAPIProvider` type serves as the canonical registry of all supported LLM providers in the OpenClaude codebase.

## How OpenClaude Selects the Active Provider

Provider selection happens at runtime through the **`getAPIProvider()`** function (lines 32-81 in [`src/utils/model/providers.ts`](https://github.com/Gitlawb/openclaude/blob/main/src/utils/model/providers.ts)). This function evaluates environment variables and route metadata to determine which backend to use.

Key environment variables that control provider selection:

- `CLAUDE_CODE_USE_FOUNDRY` — enables the Foundry provider
- `CLAUDE_CODE_USE_GITHUB` — switches to GitHub Copilot
- `NVIDIA_NIM` — activates NVIDIA NIM inference
- `AZURE_OPENAI_API_KEY` or `OPENAI_API_KEY` — triggers OpenAI provider detection

## Code Examples for Provider Management

### Resolve the Active Provider

```typescript
import { getAPIProvider } from './src/utils/model/providers.js';

const provider = getAPIProvider();
console.log(`OpenClaude is using the "${provider}" provider`);
// Output: "OpenClaude is using the "openai" provider"

```

### Check for Anthropic First-Party Mode

```typescript
import { isFirstPartyAnthropicProvider } from './src/utils/model/providers.js';

if (isFirstPartyAnthropicProvider()) {
  console.log('Running against Anthropic's official API');
}

```

### Switch to GitHub Copilot Provider

```typescript
process.env.CLAUDE_CODE_USE_GITHUB = '1';
process.env.OPENAI_MODEL = 'claude-sonnet-3.5';

import { getAPIProvider } from './src/utils/model/providers.js';

console.log(getAPIProvider()); // → "github"

```

## Key Source Files for Provider Architecture

| File | Purpose |
|------|---------|
| [`src/utils/model/providers.ts`](https://github.com/Gitlawb/openclaude/blob/main/src/utils/model/providers.ts) | Central definition of all supported LLM providers and selection logic |
| [`src/integrations/routeMetadata.ts`](https://github.com/Gitlawb/openclaude/blob/main/src/integrations/routeMetadata.ts) | Route-to-provider mapping for `getAPIProvider()` |
| [`src/utils/providerProfiles.ts`](https://github.com/Gitlawb/openclaude/blob/main/src/utils/providerProfiles.ts) | Saved provider profiles and custom endpoints |
| [`src/services/api/providerConfig.ts`](https://github.com/Gitlawb/openclaude/blob/main/src/services/api/providerConfig.ts) | Provider-specific configuration (tokens, base URLs, timeouts) |

These four files implement OpenClaude's multi-provider abstraction layer.

## Provider-Specific Configuration Notes

**First-party Anthropic** requires `ANTHROPIC_API_KEY` and uses `https://api.anthropic.com` by default.

**Amazon Bedrock** needs AWS credentials (`AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`) plus `AWS_REGION` set to a Bedrock-supported region.

**GitHub Copilot** supports an optional Anthropic native mode when `OPENAI_MODEL` is set to a Claude model identifier.

**NVIDIA NIM** expects `NVIDIA_NIM` environment variable pointing to your NIM inference endpoint.

## Summary

- OpenClaude supports **12 LLM providers** ranging from commercial APIs to self-hosted inference.
- Provider IDs are defined in **[`src/utils/model/providers.ts`](https://github.com/Gitlawb/openclaude/blob/main/src/utils/model/providers.ts)** and selected via **`getAPIProvider()`**.
- Runtime configuration uses environment variables rather than static config files.
- The architecture allows seamless switching between providers without code changes.

## Frequently Asked Questions

### How do I switch from Anthropic to OpenAI in OpenClaude?

Set `OPENAI_API_KEY` in your environment and ensure `ANTHROPIC_API_KEY` is unset. The `getAPIProvider()` function automatically detects OpenAI credentials and returns `"openai"`. For Azure OpenAI, use `AZURE_OPENAI_API_KEY` instead.

### What is the default LLM provider in OpenClaude?

The **first-party Anthropic provider** (`firstParty`) is the default when `ANTHROPIC_API_KEY` is present and no override environment variables are set. This targets `api.anthropic.com` directly without intermediary services.

### Can I use multiple providers simultaneously in one OpenClaude session?

No — OpenClaude uses a **single active provider** per process determined at startup by `getAPIProvider()`. To use different providers, launch separate shell sessions with distinct environment configurations or use provider profiles defined in [`src/utils/providerProfiles.ts`](https://github.com/Gitlawb/openclaude/blob/main/src/utils/providerProfiles.ts).