Does agent mode work with BYOK like an openrouter api key or GLM ?
Hey, thanks for the question.
BYOK in Cursor has some limitations. Custom API keys only work with standard chat models. Agent mode requires specialized models and features that are fully supported only for official providers.
Supported BYOK providers:
- OpenAI (standard models, not reasoning)
- Anthropic (all Claude models)
- Google (Gemini via the Google AI API)
- Azure OpenAI
- AWS Bedrock
More details: API Keys | Cursor Docs
OpenRouter and other custom providers (including GLM via OpenRouter) aren’t officially supported. When using Agent mode with BYOK OpenAI, even for standard models, there are known issues with the tools format: Missing required parameter: 'tools[0].name - #4 by deanrie
If you need Agent mode, I recommend using Cursor’s built-in models or connecting an API key directly from a supported provider.