How BYOK works
BYOK is provider-first: you connect a provider once, add the models you want to it, and then choose which of those models runs each of Kody’s tasks. Connecting lives on the AI providers page (sidebar → AI providers), which has two tabs. Choosing models per task lives on Code review → Routing, which the Configure routing button on the page header opens.Providers
Connect providers with your key and add models to each one. The count badge shows how many providers you’ve connected.
Budget
Set an optional monthly budget and get spend alerts as you approach it (alerts only; reviews keep running).
Routing
On Code review → Routing: one default model, an optional fallback, and per-task models.
Connect a provider
1
Open AI providers
In the sidebar, open AI providers (app.kodus.io/byok). On a fresh workspace you’ll see Connect your first provider.
2
Pick a provider
The provider grid is split in two:
- Providers — first-class providers you connect with just an API key (OpenAI, Anthropic, Google, OpenRouter, Novita, Moonshot, Z.ai…).
- Custom — providers you point at your own endpoint or run an arbitrary model on: OpenAI-compatible, Anthropic-compatible, Google Vertex AI, Amazon Bedrock, and Azure OpenAI. Custom endpoints are marked with a Custom endpoint hint.
3
Add a model
Picking a provider opens its add-model form (Add a … model). Paste the API key once (reused for every model you add to that provider afterward), then choose the model:
- If Kodus lists the provider’s models, pick one from the dropdown. For a model that is missing, choose Type model manually and enter the exact model ID.
- Otherwise (custom endpoints, self-hosted, or when platform keys aren’t configured), type the exact model ID.
/chat/completions). It must use https:// and resolve to a public address.4
Tune advanced settings (optional)
In the Advanced (optional) card, expand Advanced settings: Thinking / Reasoning, Temperature, Max output tokens, Max input tokens, and Max concurrent requests. Defaults are sensible for most providers — see Reasoning and Temperature for the fields Kodus locks or hides per model.
5
Test and save
Click Test to check the configuration, or Test & save to run the test and save on success. Add as many models to the provider as you want; the key is only pasted once.
Test before you save
The Test button needs a model chosen first. It sends a minimal real request to that model, built the same way a review builds it, with your key, base URL, temperature, and reasoning setting. A passing test means this exact configuration works, and a failing one returns the provider’s message on the spot: a wrong model ID, a restricted key, or an endpoint problem. Google Vertex AI first checks the service account, then makes the same request. Amazon Bedrock without a model only checks the credentials. Test also checks your tuning against the model’s own rules and returns a specific message instead of saving a setting the model would ignore:- A temperature the model ignores or pins (see Temperature).
- Reasoning turned Off on a model that always reasons and can’t be disabled.
Because Test uses the real model, a typo in the model ID is caught at Test time rather than at your first review: the response comes back
Model not found.Edit or remove
On the Providers tab, Edit model changes a model’s settings, Edit provider changes the provider’s key, and Remove model (the trash icon) removes a model. A model that is still the default or fallback, set for a task, used by a repository or directory, or pinned on a custom agent can’t be removed. The row lists where it is used, so change those first. Removing your last model disconnects BYOK: Kodus uses the LLM set by environment variables if there is one, and otherwise stops running reviews until you connect a model.Routing: which model runs each task
Open Code review → Routing at Global scope (or Configure routing on AI providers). The Models card sets the defaults for your organization. Only Owners edit it; routing is flat, so every task uses the default until you pick another model for it.- Default model: the one model every task uses unless overridden.
- Fallback model: a different model Kody re-runs a call on, once, when the task’s model fails: a bad or expired key, no credit, access denied, or the provider being down (after its own retries). Without one, the review fails.
- Risk assessment model, Balanced model and Heavy model: the models for risk assessment and for each review mode. Heavy model is available on Teams and Enterprise. Each uses the default until you pick one.
- Other task models (expand it): Kody Rules, PR Summary, Conversation, Business Rules, and Custom Agents can each run a different model, for example a cheaper one for summaries. A model that can’t do a given task is disabled in that row with a tooltip.
With a single connected model, routing is fixed to it. Connect a second model to make routing meaningful.
Choosing models
Any model your provider serves works. If you’re not sure where to start, these are solid choices for code review:Claude Sonnet / Opus
Best balance / flagship quality. Anthropic’s adaptive extended thinking and strong cross-file analysis. Keys: console.anthropic.com.
Gemini Pro
Largest context. Google’s flagship — strongest on large PRs and monorepos. Keys: aistudio.google.com/apikey.
GPT (latest)
Fast and consistent. OpenAI’s flagship line — reliable low latency, broad knowledge. Keys: platform.openai.com/api-keys.
Kimi / GLM
Provider billing. Moonshot offers the Kimi Code Plan. For GLM reviews in Kodus, connect a Z.AI Developer API key through OpenAI-compatible. See Subscriptions and coding plans and Connecting Kimi and GLM.
Start with Claude Sonnet for a general-purpose review model. Use the exact model ID from your provider. For subscription eligibility and limits, see Subscriptions and coding plans.
Subscriptions and coding plans
Some providers sell a flat-rate subscription, often called a coding plan, instead of or next to pay-per-token API access. Kodus connects to one the way it connects to any API: with the key and the endpoint the plan gives you. It never signs in with your account on a provider’s website or app. Whether a plan can be used this way is up to the provider, and each one sets its own rules. Before you rely on one:- Check its terms. Some plans allow use only from the provider’s own apps, or limit automated use. Providers can change this at any time, and Kodus can’t check it for you.
- Check its limits. Plans often cap concurrent requests, request windows or monthly use. Set Max concurrent requests to match, and add a Fallback model on a different provider so reviews don’t fail when a cap is hit. See Concurrency and rate limits.
- Use the plan’s own endpoint. A plan’s key often works only on that plan’s endpoint, not on the provider’s pay-per-token API. Kimi and GLM show the difference.
Kodus credits
If your Kodus Cloud workspace has access to the Kodus provider alpha, go to AI providers and choose Kodus to add a model without an API key. Use Kodus credits to add prepaid balance. Model usage is deducted at the listed price per token, and the top-up screen shows the platform fee before you pay. Use Configure routing to choose which tasks run on the model. If the balance runs out, reviews routed to Kodus models pause until you add credits. Models using your own provider keys keep working.Advanced settings
Each model’s form has an optional Advanced settings card: reasoning, temperature, output and input limits, and concurrency. The defaults suit most providers; see Model settings. Two settings are worth knowing before you need them.Custom JSON override
For a provider option Kodus has no field for, choose Custom in Thinking / Reasoning and paste the JSON. See Custom JSON override.Pinning OpenRouter providers
On an OpenRouter model, OpenRouter routing pins which upstream providers serve it. See Pinning OpenRouter providers.Best Practices
Security
Dedicated Keys
Create separate API keys for Kodus. Makes usage auditing and key rotation easier.
Regular Rotation
Rotate keys periodically and update them with Edit provider on the AI providers page.
Monitor Usage
Check your provider dashboards for unusual patterns.
Secure Storage
Never commit keys to repositories. Kodus stores them encrypted at rest and in transit.
Routing strategy
- Use a different provider for your default and fallback (e.g. Anthropic default, Google fallback). Protects against provider-specific outages.
- Subscriptions with tight concurrency limits (GLM Coding Plan Lite/Pro, Kimi Code Plan) make poor solo configurations — pair them with a pay-per-token fallback so bursty PRs don’t starve.
- Route the heavy tasks (code review) to your strongest model and the light ones (summaries, chat) to a cheaper one under Other task models on Code review → Routing.
Reference
Supported providers
Get a key and connect each provider, including Kimi, GLM and OpenRouter.
Model settings
Reasoning, temperature, custom options and concurrency limits.
Troubleshooting and FAQ
Fix Test errors, rate limits and unexpected costs.