Model providers
Forge Code talks to each provider through its own API. Switch at any time with /model, or start with
forge --model provider/model.
| Provider | How to connect | Example model |
|---|---|---|
| Anthropic | /login → API key (ANTHROPIC_API_KEY) |
anthropic/claude-opus-5-5 |
| OpenAI | /login → API key (OPENAI_API_KEY) |
openai/gpt-6-astra |
/login → API key (GEMINI_API_KEY) |
google/gemini-4-argon |
|
| xAI | /login → API key (XAI_API_KEY) |
xai/grok-4.7 |
| Z.ai | /login → API key (ZAI_API_KEY) |
zai/glm-5.3 |
| Kimi | /login → API key (MOONSHOT_API_KEY) |
kimi/kimi-k3 |
| DeepSeek | /login → API key (DEEPSEEK_API_KEY) |
deepseek/deepseek-v4-pro |
| OpenRouter | /login → API key (OPENROUTER_API_KEY) |
openrouter/anthropic/claude-opus-5.5 |
| Amazon Bedrock | /setup-bedrock (AWS credentials) |
bedrock/anthropic.claude-opus-5-5 |
| Google Vertex AI | /setup-vertex (Google Cloud credentials) |
vertex/claude-opus-5-5 |
| Forge Cloud | /login → Forge Cloud account |
forge/claude-opus-5-5 |
Keys saved by /login go to ~/.forge/credentials.json. Environment variables work too; Forge asks once before
using a key it finds in your environment.
OpenRouter (bring your own key)
Section titled “OpenRouter (bring your own key)”OpenRouter gives one key for hundreds of models. Create a key at openrouter.ai/settings/keys and paste it into
/login → OpenRouter. Forge checks the key, lists the models your account can use, and sends every request with
your key, so OpenRouter bills the usage. If you added your own provider keys in OpenRouter’s BYOK settings,
OpenRouter uses them for those providers.
Model IDs keep OpenRouter’s vendor/model form after the openrouter/ prefix. openrouter/openrouter/auto lets
OpenRouter choose the model per request.
Amazon Bedrock
Section titled “Amazon Bedrock”/setup-bedrock signs requests with the AWS SDK and calls Claude in Amazon Bedrock (the Messages API on
bedrock-mantle.<region>.api.aws). Choose how to authenticate:
- Credentials already in your environment:
AWS_ACCESS_KEY_ID, SSO,~/.aws/credentials, or an instance role - AWS profile: a named profile from
~/.aws/config - Bedrock API key: a short-term bearer token (
AWS_BEARER_TOKEN_BEDROCK) - Access key and secret
Then pick a region and a model. Forge verifies the credentials with STS GetCallerIdentity before saving. Bedrock
model IDs carry an anthropic. prefix (anthropic.claude-sonnet-5-5). Web search isn’t available on Bedrock.
Google Vertex AI
Section titled “Google Vertex AI”/setup-vertex uses google-auth-library: Application Default Credentials (gcloud auth application-default login)
or a service account key file. Enter your project ID and a region: global (recommended), us or eu.
Forge checks that it can get an access token before saving.
Forge Cloud
Section titled “Forge Cloud”Everyone signs in to a Forge account when Forge Code first starts: Forge shows a code, opens the console in your
browser, and continues as soon as you authorize it. /login → Forge Cloud account switches to another account. Usage then counts against your plan instead of an API key. See
Forge Cloud.