fix(code-review): use configured model for title/aux calls (BYOK) - #4725
fix(code-review): use configured model for title/aux calls (BYOK)#4725baanish wants to merge 4 commits into
Conversation
Code Review sessions only set KILO_CONFIG.model, so kilo's title/aux calls fell through to kilo-auto/small → Gemma and billed Kilo credits even when the primary review model was BYOK. Pin small_model and the title agent to the configured review model for code-review sessions. Fixes Kilo-Org#4268
Always set the title agent model to the configured review model for code-review sessions, even when a runtime agent named title was already merged. Preserve other title-agent options.
…l-9bef fix(code-review): use configured model for title/aux calls (BYOK)
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Executive SummaryReviewed the code-review-session model-pinning fix in Files Reviewed (2 files)
Reviewed by claude-sonnet-5 · Input: 16 · Output: 3.3K · Cached: 310.5K Review guidance: REVIEW.md from base branch |
|
Thanks for digging into this — the revised diagnosis in your PR body is correct, and it's worth recording the confirmation here since it contradicts the original theory in #4268. The chain checks out end to end:
So Gemma under Code Reviews is the small-model fallback, not gastown's Workers AI call. The mechanism you used is also correct: The one change we'd like before mergingThe gate is The intent behind Our preference for where that lives, which keeps most of your diff intact:
If you'd rather keep this contained to Smaller items
Happy to take this over if you'd rather not carry it further — let us know. |
Summary
KILO_CONFIG.model, so kilo's title/aux calls fell through to the CLI default (kilo-auto/small→google/gemma-4-26b-a4b-it) and billed Kilo credits even when the primary review model was BYOK.createdOnPlatform === 'code-review', pinsmall_modeland thetitleagent to the same configured review model.Fixes #4268
Note on root cause
Issue #4268 attributed Gemma usage under Code Reviews to gastown's Workers AI
areThreadsBlocking()call. That path does use hardcoded Gemma, but it does not go through the AI gateway and would not appear as gateway Code Reviews usage (especially not with Vercel-style versioned model ids / multi-million-token volume). The Usage dashboard symptom matches kilo's title/aux model defaulting tokilo-auto/smallduring Code Reviewer sessions.Test plan
small_model+agent.title.modelequal to the configured review modelsmall_modelSummary by CodeRabbit