Use Claude Opus 4.5 (via Azure) in Cursor IDE.
Cursor doesn't properly pass the model field when connecting to Azure's Anthropic endpoint, resulting in:
{"error":{"type":"client","reason":"invalid_input","message":"model is required","retryable":false}}This proxy sits between Cursor and Azure, properly formatting requests:
Cursor → localhost:4000 → LiteLLM Proxy → Azure Anthropic APIchmod +x setup.sh
./setup.shYou'll be prompted for:
https://your-resource.services.ai.azure.com/anthropicclaude-opus-4-5./start.shKeep this terminal open while using Cursor.
| Setting | Value |
|---|---|
| Override OpenAI Base URL | http://localhost:4000/v1 |
| OpenAI API Key | sk-1234 |
In a new terminal:
./test.shYou should see a successful response from Claude.
| Command | Description |
|---|---|
./start.sh | Start the proxy (foreground) |
./stop.sh | Stop the proxy |
./test.sh | Test if proxy is working |
After running setup.sh:
azure-cursor-proxy/
├── setup.sh # Initial setup script
├── start.sh # Start the proxy
├── stop.sh # Stop the proxy
├── test.sh # Test connection
├── config.yaml # LiteLLM configuration
├── .env # Your API key (chmod 600)
├── venv/ # Python virtual environment
└── README.md # This fileThe proxy isn't running. Start it:
./start.shCursor is bypassing the proxy. Verify your settings:
http://localhost:4000/v1 (not your Azure URL)Your API key is incorrect or expired. Update it:
echo "AZURE_API_KEY=your-new-key-here" > .env
./stop.sh
./start.shThe setup requires Python 3.10-3.12. Install via Homebrew:
brew install python@3.12Then re-run ./setup.sh
curl http://localhost:4000/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-1234" \
-d '{"model":"claude-opus-4-5","messages":[{"role":"user","content":"Hello"}],"max_tokens":20}'echo "AZURE_API_KEY=your-new-key" > .env
./stop.sh && ./start.shEdit config.yaml and update api_base and model fields, then restart:
./stop.sh && ./start.shEdit start.sh and change --port 4000 to your preferred port.
Update Cursor's Base URL accordingly.
To run the proxy in the background:
nohup ./start.sh > proxy.log 2>&1 &View logs:
tail -f proxy.logStop:
./stop.shlocalhost:4000, LiteLLM:
model field for Azureconfig.yaml maps model names like claude-opus-4-5 to your Azure deployment.env file has restricted permissions (chmod 600).env to version control