Providers
investigationProvider picks the AI that investigates. Every provider config takes its API key directly; resolve it however you like (env var, secret manager, ...).
OpenAI
provider: 'openai' calls OpenAI's Responses API with strict JSON Schema output.
provider: 'openai',
apiKey: process.env.OPENAI_API_KEY!,Claude (Anthropic)
provider: 'claude' calls Anthropic's Messages API with JSON Schema output.
provider: 'claude',
apiKey: process.env.ANTHROPIC_API_KEY!,OpenAI-compatible endpoints
provider: 'openai-compatible' works with anything that exposes an OpenAI-compatible Chat Completions API: Gemini, Mistral, Groq, Ollama, OpenRouter, vLLM, and more.
provider: 'openai-compatible',
baseURL: 'https://openrouter.ai/api/v1',
model: 'google/gemini-3.8-flash',
apiKey: process.env.OPENROUTER_API_KEY!,
supportsStructuredOutputs: true,Set supportsStructuredOutputs: true if the endpoint enforces JSON Schema output. Without it, the AI is only asked for JSON, trypatch validates the outcome afterwards, and a warning is printed to the console on every investigation.
Cursor Cloud Agents
provider: 'cursor' starts a Cursor cloud agent and polls its run until it finishes.
provider: 'cursor',
apiKey: process.env.CURSOR_API_KEY!,
repository: { url: 'https://github.com/acme/payments' },- It doesn't run
investigationToolsand has nomaxToolIterations(the Cursor API has no turn limit), but it supports MCP servers. - A timeout or abort stops polling and cancels the remote run, best effort.
Custom fetch
Every provider config accepts a fetch, used instead of the global one for every HTTP call that provider makes, the same pattern the Anthropic and OpenAI SDKs use. Wrap a real fetch to route through a proxy, inject a freshly refreshed token, add retries or log requests:
provider: 'openai',
apiKey: process.env.OPENAI_API_KEY!,
fetch: async (url, init) => {
const headers = new Headers(init?.headers)
headers.set('X-Proxy-Token', await getProxyToken())
return await fetch(url, { ...init, headers })
},