Error: config validation failed: no valid provider available for agent task
Author: Lucifer-00007Created Jun 5, 2025Updated Jul 21, 2025
Terminal SS:
The following is my .opencode.json config:
{
"data": {
"directory": ".opencode"
},
"mcpServers": {
"example": {
"command": "path/to/mcp-server",
"env": [],
"args": [],
"type": "stdio",
"url": "",
"headers": null
}
},
"providers": {
"google": {
"apiKey": "AIzaSyDXUkfdXXXXXX",
"disabled": false
},
"anthropic": {
"apiKey": "your-api-key",
"disabled": true
},
"groq": {
"apiKey": "your-api-key",
"disabled": true
},
"openai": {
"apiKey": "your-api-key",
"disabled": true
},
"openrouter": {
"apiKey": "sk-or-v1-1b7589a212daXXXXXXXXXXX",
"disabled": false
}
},
"lsp": {
"go": {
"enabled": false,
"command": "gopls",
"args": null,
"options": null
}
},
"agents": {
"coder": {
"model": "gemini-2.5-flash-preview-05-20",
"maxTokens": 5000,
"reasoningEffort": ""
},
"task": {
"model": "gemini-2.5-flash-preview-05-20",
"maxTokens": 5000,
"reasoningEffort": ""
},
"title": {
"model": "gemini-2.5-flash-preview-05-20",
"maxTokens": 80,
"reasoningEffort": ""
}
},
"tui": {
"theme": "opencode"
},
"shell": {
"path": "/bin/bash",
"args": [
"-l"
]
},
"autoCompact": true
}
i have masked my original
googleandopen-routerapi keys in the above config for this chat.Now when i run
opencodecommand in terminal i am getting the follow error:Error: config validation failed: no valid provider available for agent titleFrom my observation, i found this is not working properly with model other than anthropic's for the initial setup. can anyone help me with this??
Source: opencode-ai/opencode