Skip to content

Cursor / Windsurf

Cursor and Windsurf are AI-native code editors that support custom API endpoints. Both can route LLM requests through Candela for full observability.

  1. Open Settings → Models
  2. Add a new OpenAI API model:
SettingValue
API Basehttp://localhost:1234/v1
API Keycandela
Modelgemini-3.5-pro (or any model from /v1/models)

Cursor has native Anthropic support. To route Claude through Candela:

  1. Open Settings → Models → Anthropic
  2. Set API Base URL to:
    http://localhost:8181/proxy/anthropic-direct
  3. Enter your Anthropic API key

Or use the Vertex AI route (no API key needed):

http://localhost:8181/proxy/anthropic-vertex
Terminal window
# Route all Cursor Anthropic requests through Candela
export ANTHROPIC_BASE_URL="http://localhost:8181/proxy/anthropic-vertex"

Windsurf supports custom OpenAI-compatible endpoints:

  1. Open Settings → AI → Custom Model
  2. Configure:
SettingValue
Base URLhttp://localhost:1234/v1
API Keycandela
Modelgemini-3.5-pro

Both editors generate many LLM calls during a single coding session — inline completions, chat, code actions, and multi-file edits. Candela captures all of them:

FeatureTraced
Chat / inline completions
Multi-file edits
Code explanations
Terminal commands

Check http://localhost:8181/_local/ to see per-request token counts, cost, and latency across your entire coding session.

SymptomCauseFix
Model dropdown emptyCursor can’t reach /v1/modelsVerify candela start is running
”Invalid API key”Cursor validates keys before useUse candela as the key — it passes validation
High cost for completionsMany small requests add upCheck traces to identify chatty features
Traces not appearingWrong base URLUse :1234 for OpenAI-compat, :8181/proxy/* for provider-specific