OpenClaw Setup
OpenClaw is an open-source AI agent platform that can use model-go as a model provider.
What is OpenClaw?
OpenClaw is a local AI assistant framework that supports:
- Multi-channel messaging such as Telegram, Discord, and WhatsApp
- Tool calling such as browser, filesystem, and shell access
- Memory systems and skill extensions
Install OpenClaw
bash
npm install -g openclawConfigure model-go as a provider
Edit ~/.openclaw/openclaw.json and add model-go under models.providers.
Anthropic models (Claude)
json
{
"models": {
"providers": {
"model-go": {
"baseUrl": "https://model-go.com",
"apiKey": "your model-go token",
"auth": "api-key",
"api": "anthropic-messages",
"authHeader": true,
"models": [
{
"id": "replace with a Claude model name from the Models page",
"name": "replace with a Claude model name from the Models page",
"api": "anthropic-messages",
"reasoning": true,
"input": ["text", "image"],
"contextWindow": 200000,
"maxTokens": 8192,
"compat": {
"supportsReasoningEffort": true,
"maxTokensField": "max_tokens"
}
}
]
}
}
}
}OpenAI models (GPT / Codex)
json
{
"models": {
"providers": {
"model-go-openai": {
"baseUrl": "https://model-go.com/v1",
"apiKey": "your model-go token",
"api": "openai-responses",
"models": [
{
"id": "replace with an OpenAI model name from the Models page",
"name": "replace with an OpenAI model name from the Models page",
"api": "openai-responses",
"reasoning": true,
"input": ["text"],
"contextWindow": 200000,
"maxTokens": 16384
}
]
}
}
}
}Google models (Gemini)
json
{
"models": {
"providers": {
"model-go-gemini": {
"baseUrl": "https://model-go.com/v1beta",
"apiKey": "your model-go token",
"auth": "api-key",
"api": "google-generative-ai",
"models": [
{
"id": "replace with a Gemini model name from the Models page",
"name": "replace with a Gemini model name from the Models page",
"api": "google-generative-ai",
"reasoning": true,
"input": ["text", "image"],
"contextWindow": 1000000,
"maxTokens": 65536
}
]
}
}
}
}Configuration Notes
| Field | Purpose |
|---|---|
baseUrl | Anthropic models use https://model-go.com; OpenAI models use https://model-go.com/v1; Gemini models use https://model-go.com/v1beta |
apiKey | The API token you created in model-go |
api | API protocol: anthropic-messages, openai-responses, or google-generative-ai |
auth | Authentication mode, set to api-key |
authHeader | Required for Anthropic models |
models | Model list with ids, names, and capabilities |
Using models
After configuration, you can reference models by provider and model name:
text
model-go/replace with a Claude model name from the Models page
model-go-openai/replace with an OpenAI model name from the Models page
model-go-gemini/replace with a Gemini model name from the Models pageSet a default model in openclaw.json:
json
{
"models": {
"default": "model-go/replace with a Claude model name from the Models page"
}
}Apply the configuration
After editing openclaw.json, restart the gateway:
bash
openclaw gateway restartTIP
OpenClaw supports model switching at runtime. After configuring multiple providers, you can switch models with the /model command in chat.
Troubleshooting
Model switching fails
If OpenClaw does not recognize the new model, the model cache may be stale.
bash
rm ~/.openclaw/agents/main/agent/models.json
openclaw gateway restartConnection fails
- Confirm the
baseUrlis correct - Confirm the
apiKeyis valid and the token group includes the target model - Run
openclaw gateway restartto reload the configuration