Skip to content

KLAI AI Routing

Menu Location: Kiva Tools > KLAI AI Routing

Last Updated: 2026-09-28


Overview

The KLAI AI Routing page (klai-ai-routing.php) decides which AI engine handles each kind of KLAI work. Set one default engine, then override individual kinds of work where you want a different engine. The setting takes effect on the next cron minute, with no deploy needed.

Primary Features

Default Engine

A Default engine dropdown sets the engine used by every kind of KLAI work that is set to "follow default." The available engines are:

  • Anthropic (Claude)
  • DeepSeek

An engine with no API key configured is listed with " (no API key set)" after its name. Choosing one of those is not fatal: KLAI falls back to Anthropic for that work and logs a warning.

Per-Type Engine Overrides

Below the default is a table with one row per kind of KLAI work, each with its own engine dropdown:

Kind of KLAI work Internal name
Support tickets ticket
Error auto-fix error_fix
Deploy safety gate deploy_gate
Email commands (Wayne to KLAI) email_command
Sales outreach sales_outreach
Commit: reports check commit_reports_check
Commit: docs check commit_docs_check
Commit: schema check commit_schema_check
Daily journal daily_journal

Each row's dropdown offers Follow default (showing which engine that currently resolves to) plus one entry per available engine. Choosing Follow default leaves the row unpinned, so it keeps tracking the default engine if you change it later.

Judgment-Heavy Warning

Rows for work that plans and touches real code are badged judgment-heavy: support tickets, error auto-fix, the deploy safety gate, and email commands. The page warns that cheaper engines such as DeepSeek tend to loop until they hit the turn limit and return nothing, which can cost more than Anthropic rather than less, and advises pointing those at a cheap engine only when testing it.

Adding More Engines

The list of engines is a registry. Adding an engine there makes it appear in both dropdowns automatically, with no change to this page.

Common Use Cases

Sending the Cheap, Structured Work to a Cheaper Engine

Leave the default engine on Anthropic, then set the routine kinds of work (commit checks, daily journal, sales outreach) to DeepSeek individually. The judgment-heavy kinds stay on Anthropic without you having to pin each one.

Testing a New Engine Safely

Point one low-risk kind of work at the new engine, then watch the avg turns column for that work on the KLAI AI Cost page. A run that never finishes shows up as far more turns per session, and you can put that row back on Follow default.

Switching Everything to One Engine

Set the default engine and leave every row on Follow default. This is the simplest configuration, and the one to use if you are not trying to split work between engines.

Troubleshooting

A row still uses the old engine after I changed it

Confirm you clicked Save routing. The setting is read on the next cron minute, so a change made mid-run applies to the following run, not one already underway.

I picked DeepSeek but the work still ran on Anthropic

Check whether DeepSeek shows " (no API key set)" in the dropdown. With no usable key, KLAI falls back to Anthropic and records a warning rather than failing the run.

A kind of work got much more expensive after switching engines

That is the failure the judgment-heavy badge warns about: a cheap engine looping to its turn limit can cost more than the engine it replaced. Compare the avg turns for that work on the KLAI AI Cost page, and set the row back to Follow default.

Recent Updates

  • 2026-09-28: Added the KLAI AI Routing page: one default engine plus per-type overrides, an engine registry that new engines drop into automatically, and a judgment-heavy warning on the code-touching kinds of work (r28090).