Skip to content

Commit d396711

Browse files
authored
feat(routing): add KiloClaw as a named routing mode (#1669)
## Summary - Added `kiloclaw` as an explicit routing mode in both `FRONTIER_MODE_TO_MODEL` and `BALANCED_MODE_TO_MODEL` in `describeRouting` - For Frontier: routes to Claude Opus with reasoning enabled and high verbosity (same config as `plan`) - For Balanced: routes to Kimi with reasoning enabled (same config as `plan`) - Updated `applyResolvedAutoModel` to pass `'kiloclaw'` directly as the mode instead of mapping it to `'plan'`, so KiloClaw now appears in the routing description ## Verification - Reviewed the diff manually; the change is additive and consistent with existing mode configurations - Typecheck could not be run due to missing `tsgo` binary in the environment ## Visual Changes N/A ## Reviewer Notes Previously, `featureHeader === 'kiloclaw'` was mapped to `'plan'` before lookup, so KiloClaw was silently sharing `plan`'s routing without appearing in `describeRouting`. Now it has its own named entry, making the routing description accurate and allowing independent tuning in future.
2 parents 44dcc6f + 5bc3064 commit d396711

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

src/lib/kilo-auto-model.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,11 @@ const FRONTIER_CODE_MODEL: ResolvedAutoModel = {
7272
};
7373

7474
const FRONTIER_MODE_TO_MODEL: Record<string, ResolvedAutoModel> = {
75+
KiloClaw: {
76+
model: CLAUDE_OPUS_CURRENT_MODEL_ID,
77+
reasoning: { enabled: true },
78+
verbosity: 'high',
79+
},
7580
plan: { model: CLAUDE_OPUS_CURRENT_MODEL_ID, reasoning: { enabled: true }, verbosity: 'high' },
7681
general: {
7782
model: CLAUDE_OPUS_CURRENT_MODEL_ID,
@@ -113,6 +118,7 @@ const BALANCED_IMAGE_MODEL: ResolvedAutoModel = {
113118
};
114119

115120
const BALANCED_MODE_TO_MODEL: Record<string, ResolvedAutoModel> = {
121+
KiloClaw: { model: KIMI_CURRENT_MODEL_ID, reasoning: { enabled: true } },
116122
plan: { model: KIMI_CURRENT_MODEL_ID, reasoning: { enabled: true } },
117123
general: { model: KIMI_CURRENT_MODEL_ID, reasoning: { enabled: true } },
118124
architect: { model: KIMI_CURRENT_MODEL_ID, reasoning: { enabled: true } },
@@ -231,7 +237,7 @@ export async function resolveAutoModel(
231237
model: (await balancePromise) > 0 ? GPT_5_NANO_ID : gpt_oss_20b_free_model.public_id,
232238
};
233239
}
234-
const mode = modeHeader?.trim().toLowerCase() ?? '';
240+
const mode = modeHeader?.trim() ?? '';
235241
if (mappedModel === KILO_AUTO_BALANCED_MODEL.id) {
236242
if (hasImages) {
237243
return BALANCED_IMAGE_MODEL;
@@ -257,7 +263,7 @@ export async function applyResolvedAutoModel(
257263
const hasImages = requestContainsImages(request);
258264
const resolved = await resolveAutoModel(
259265
model,
260-
featureHeader === 'kiloclaw' ? 'plan' : modeHeader,
266+
featureHeader === 'kiloclaw' ? 'KiloClaw' : modeHeader,
261267
balancePromise,
262268
hasImages
263269
);

src/tests/openrouter-models-sorting.approved.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"id": "kilo-auto/frontier",
55
"name": "Kilo Auto Frontier",
66
"created": 0,
7-
"description": "Highest performance and capability for any task. Uses Claude Opus 4.6 for plan, general, architect, orchestrator, ask, debug; Claude Sonnet 4.6 for build, explore, code.",
7+
"description": "Highest performance and capability for any task. Uses Claude Opus 4.6 for KiloClaw, plan, general, architect, orchestrator, ask, debug; Claude Sonnet 4.6 for build, explore, code.",
88
"architecture": {
99
"input_modalities": [
1010
"text",
@@ -49,7 +49,7 @@
4949
"id": "kilo-auto/balanced",
5050
"name": "Kilo Auto Balanced",
5151
"created": 0,
52-
"description": "Great balance of price and capability. Uses Kimi K2.5 for plan, general, architect, orchestrator, ask, debug; MiniMax M2.7 for build, explore, code.",
52+
"description": "Great balance of price and capability. Uses Kimi K2.5 for KiloClaw, plan, general, architect, orchestrator, ask, debug; MiniMax M2.7 for build, explore, code.",
5353
"architecture": {
5454
"input_modalities": [
5555
"text",

0 commit comments

Comments
 (0)