Forge supports multiple AI providers, allowing you to choose the model and service that best fits your needs. You can configure providers using the interactive login command or through environment variables (deprecated).
Quick Start
The easiest way to configure a provider is using the interactive login flow:
This command will:
- Display a list of available providers
- Guide you through entering the required credentials
- Securely store your credentials locally
Managing Providers
List Available Providers
Add or Update Provider Credentials
Remove Provider Credentials
Supported Providers
Forge supports a wide range of AI providers:
Cloud Providers
OpenAI-Compatible Providers
- Cerebras
- XAI (Grok)
- Z.AI (GLM models)
- DeepSeek
- IO Intelligence
- Requesty
Custom Providers
Provider Configuration
Using .env files for provider configuration is deprecated and will be removed in a future version. Please use forge provider login instead.
Each provider requires:
- API Key - Your authentication credentials
- URL Parameters (optional) - Some providers require additional parameters like project IDs or regions
Credential Storage
Credentials are stored securely in:
- Location:
~/.config/forge/credentials.json (Linux/macOS) or %APPDATA%\forge\credentials.json (Windows)
- Format: JSON with API keys and configuration parameters
- Security: File permissions are set to be readable only by the owner
Selecting a Model
After configuring a provider, you can:
-
Set a default model in
forge.yaml:
model: claude-sonnet-4-20250514
-
Switch models during a session using the
/model command:
-
List available models for your configured providers:
Migration from Environment Variables
If you have existing credentials in environment variables, Forge will automatically migrate them to file-based storage on first run. You’ll see a message indicating which providers were migrated.
Next Steps