Documentation
Bring your own model
Openkody is model-agnostic. Point it at a hosted provider or a model running on your own hardware — you hold the keys.
How configuration works
Openkody resolves a model from two places: environment variables for credentials, and an optional openkody.toml in your repo root for defaults. The CLI never transmits your keys anywhere except the endpoint you configure. There is no Openkody account and no proxy in the middle.
# openkody.toml
[model]
provider = "anthropic"
name = "claude-opus-4-8"
[model.fallback]
provider = "ollama"
name = "qwen2.5-coder:14b"Override the model for a single command with the --model flag, e.g. openkody ask --model gpt-5 "...".
Anthropic
export ANTHROPIC_API_KEY=sk-ant-...
openkody config set model.provider anthropic
openkody config set model.name claude-opus-4-8Any current Claude model works. Opus is the default for complex edits; Haiku is a good fit for fast, cheap retrieval answers.
OpenAI
export OPENAI_API_KEY=sk-...
openkody config set model.provider openai
openkody config set model.name gpt-5Google Gemini
export GEMINI_API_KEY=...
openkody config set model.provider google
openkody config set model.name gemini-2.5-proOllama (local)
Run a model entirely on your own machine. Start Ollama, pull a coding model, and point Openkody at the local server. No key, no network egress beyond localhost.
ollama pull qwen2.5-coder:14b
openkody config set model.provider ollama
openkody config set model.name qwen2.5-coder:14b
openkody config set model.base_url http://localhost:11434vLLM (self-hosted)
vLLM exposes an OpenAI-compatible server, so Openkody talks to it the same way it talks to OpenAI — just change the base URL to your inference host.
# Serving on your own GPU box
vllm serve meta-llama/Llama-3.3-70B-Instruct --port 8000
# Point Openkody at it
openkody config set model.provider openai-compatible
openkody config set model.name meta-llama/Llama-3.3-70B-Instruct
openkody config set model.base_url http://gpu-box.lan:8000/v1Any OpenAI-compatible endpoint
LiteLLM, OpenRouter, and most gateways speak the OpenAI wire format. Set the provider to openai-compatible, give Openkody the base URL and model name, and you are done.
export OPENAI_API_KEY=your-router-key
openkody config set model.provider openai-compatible
openkody config set model.name anthropic/claude-opus-4-8
openkody config set model.base_url https://openrouter.ai/api/v1That is the whole story: install, set a provider, and start asking. Your code stays on your machine.