Provider setup

Custom OpenAI-compatible provider

Any endpoint speaking the Responses shape — self-hosted Ollama / vLLM / company gateway.

Compatibility rules

Kition routes every "OpenAI-compatible" endpoint through the responses wire. As long as your service answers POST {baseURL}/responses correctly (or legacy /chat/completions — Kition auto-falls back), you can attach it.

Common compatible services: Ollama, LM Studio, LiteLLM, vLLM, OpenRouter, Together, Groq, Fireworks, DeepSeek, Moonshot, Zhipu, Qwen/Dashscope, Doubao, Baichuan, Yi, plus most enterprise gateways.

Generic template

Every custom provider takes these five fields. baseURL must include the /v1 path (a few services are exceptions — see sections below).

{
  "name": "internal-llm",
  "baseURL": "https://llm.internal/v1",
  "apiKey": "...",
  "wire": "responses",
  "defaultModel": "internal-foundation-q1"
}

Local / self-hosted

  • Ollamahttp://localhost:11434/v1; apiKey can be any non-empty string (e.g. ollama)
  • LM Studiohttp://localhost:1234/v1; same for apiKey
  • vLLMhttp://your-host:8000/v1; key matches the --api-key launch flag
  • LiteLLM proxy — corporate gateway; key from team config
  • Local services default to HTTP; Kition does not force HTTPS, but use a TLS reverse-proxy across networks

Routers and aggregators

  • OpenRouterhttps://openrouter.ai/api/v1; model field uses vendor/model form like anthropic/claude-opus-4-7
  • Togetherhttps://api.together.xyz/v1; OSS models
  • Groqhttps://api.groq.com/openai/v1; ultra-low-latency LPU inference
  • Fireworkshttps://api.fireworks.ai/inference/v1; model field is accounts/fireworks/models/...

Custom headers

Some enterprise gateways need extra headers (Azure api-key, Bedrock-gateway x-aws-region, etc.). Add a headers object to the provider config — Kition forwards them verbatim.

{
  "name": "azure-gateway",
  "baseURL": "https://internal.openai.azure.com/openai/v1",
  "apiKey": "stored-in-keychain",
  "wire": "responses",
  "defaultModel": "gpt-5.1",
  "headers": {
    "api-key": "from-azure-portal",
    "x-tenant-id": "kition-prod"
  }
}

Verify connectivity

After saving, hit Test on the provider card — Kition sends a 1-token probe and prints round-trip latency. If it fails, the cURL template below reproduces the request from your shell.

curl $BASE_URL/responses \
  -H "Authorization: Bearer $KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"'"$MODEL"'","input":"ping","max_output_tokens":4}'

Common errors

  • 404 Not Found — baseURL missing /v1 or service listens elsewhere
  • 401 / 403 — apiKey mismatched with server config; restart local services after changes
  • Connection refused — service not running or firewalled
  • SSL handshake failed — self-signed cert; import the CA locally or use HTTP
  • Response has content but streaming stalls — endpoint not emitting SSE; check reverse-proxy buffering
  • Server rejects model id — hit /v1/models to list the real names

Related articles

Ready when you are.

Kition is a local-first AI workspace. Markdown documents, structured tables, and an AI agent — running on your own machine, against the model provider you choose.