Skip to content

feat(auto): add Kilo Auto Balanced model#1031

Merged
chrarnoldus merged 9 commits intomainfrom
feat/kilo-auto-balanced
Mar 12, 2026
Merged

feat(auto): add Kilo Auto Balanced model#1031
chrarnoldus merged 9 commits intomainfrom
feat/kilo-auto-balanced

Conversation

@lambertjosh
Copy link
Contributor

Summary

Adds a new kilo-auto/balanced auto model that mirrors Frontier's mode-based routing structure but uses cheaper underlying models:

  • Kimi K2.5 (moonshotai/kimi-k2.5) for heavy modes: plan, general, architect, orchestrator, ask, debug (where Frontier uses Opus)
  • Minimax M2.5 (minimax/minimax-m2.5) for implementation modes: build, explore, code (where Frontier uses Sonnet)

Context length and max completion tokens are derived from the minimum of both models (204,800 / 65,536). Pricing set at $2/$8 per M tokens. Added to preferredModels between Frontier and Free.

Verification

  • pnpm typecheck — passes (no new errors introduced; all existing errors are in unrelated files)

Visual Changes

N/A

Reviewer Notes

  • Pricing (prompt_price / completion_price) is placeholder — may need adjustment based on actual upstream costs.
  • supports_images is false since Minimax M2.5 lacks vision support, even though Kimi K2.5 does support it.
  • opencode_settings is undefined since neither underlying model fits the existing families (claude, gpt, gemini, llama, mistral).
  • Renamed internal constants (CODE_MODELFRONTIER_CODE_MODEL, MODE_TO_MODELFRONTIER_MODE_TO_MODEL) for clarity now that there are two routing tables.

Routes to Kimi K2.5 for heavy modes (plan, general, architect,
orchestrator, ask, debug) and Minimax M2.5 for implementation modes
(build, explore, code), offering a lower-cost alternative to Frontier.
@kilo-code-bot
Copy link
Contributor

kilo-code-bot bot commented Mar 11, 2026

Code Review Summary

Status: 2 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 2
SUGGESTION 0

Fix these issues in Kilo Cloud

Issue Details (click to expand)

WARNING

File Line Issue
src/lib/kilo-auto-model.ts 59 Advertised max_completion_tokens exceeds the moonshotai/kimi-k2.5 limit used by several Balanced modes, which can lead to provider-side 400s for otherwise valid requests.
src/lib/kilo-auto-model.ts 149 Balanced routes to minimax/minimax-m2.5:free when the free variant is enabled, so auth, rate limiting, and billing all treat this paid auto model as free.
Other Observations (not in diff)

N/A

Files Reviewed (3 files)
  • src/lib/kilo-auto-model.ts - 2 issues
  • src/lib/models.ts - 0 issues
  • src/tests/openrouter-models-sorting.approved.json - 0 issues

Reviewed by gpt-5.4-20260305 · 448,089 tokens

The deprecatedAutoModels function was producing entries with undefined
IDs for models without legacy mappings (like the new balanced model),
causing the /api/openrouter/models endpoint to return 500.
@lambertjosh
Copy link
Contributor Author

@lambertjosh lambertjosh requested a review from chrarnoldus March 11, 2026 22:07
@lambertjosh
Copy link
Contributor Author

Also validated that the modes do hit the correct models on the backend and used both. Flipping between modes in the same session also appears to work correctly.

Minimax M2.5 needs search_and_replace only (no apply_diff/edit_file).
Apply this restriction globally since the extension can't know which
underlying model handles each request.
@lambertjosh
Copy link
Contributor Author

@chrarnoldus - one item I wasn't sure about, there are different roo settings for minimax:m2.5 and Kimi:k2.5. I applied the minimax ones as I wanted to be restrictive, but would love your guidance here.

lambertjosh and others added 4 commits March 11, 2026 18:29
The nvidia entry was accidentally dropped during the merge. Restoring
it fixes the preferredIndex values in the approval test.
* Update Kimi prices
* Use edit_file instead of apply_diff
* Use free MiniMax instead of paid
* Remove unsupported parameters
* Simplify deprecated mapping without flatMap
@chrarnoldus
Copy link
Contributor

I applied the minimax ones as I wanted to be restrictive, but would love your guidance here.

edit_file is simpler, so I changed it to that one.

@chrarnoldus
Copy link
Contributor

chrarnoldus commented Mar 12, 2026

The PR originally used paid MiniMax, was that intentional? I changed it to free, but we can always change it back.

edit: roadmap says free

@chrarnoldus chrarnoldus merged commit 65074d9 into main Mar 12, 2026
18 checks passed
@chrarnoldus chrarnoldus deleted the feat/kilo-auto-balanced branch March 12, 2026 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants