Configure and troubleshoot CUA mode
mainCUA mode (mode: "cua") uses OpenAI's Responses API directly with the computer tool. This mode has specific requirements:
- Gateway Restriction: CUA does not work through gateways (Vercel, OpenRouter, Cloudflare). You must set
gateway: "none"in your configuration. - Required Key:
OPENAI_API_KEYmust be set in your environment. - Access Issues: If you receive a
400error withparam: null, verify your OpenAI organization has access to the CUA model and thecomputertool on the Responses API. - Tool Compatibility: If you see errors regarding
computer_use_preview, you are likely on an old build. The current API uses{ type: "computer" }. Rebuild frommainto resolve.