Skip to content

feat(routing): add is_openai_deactivated flag to route balanced to Kimi K2.5#2569

Draft
kilo-code-bot[bot] wants to merge 2 commits intomainfrom
feat/is-openai-deactivated
Draft

feat(routing): add is_openai_deactivated flag to route balanced to Kimi K2.5#2569
kilo-code-bot[bot] wants to merge 2 commits intomainfrom
feat/is-openai-deactivated

Conversation

@kilo-code-bot
Copy link
Copy Markdown
Contributor

@kilo-code-bot kilo-code-bot bot commented Apr 17, 2026

Summary

  • Adds is_openai_deactivated boolean column (default false, not null) to kilocode_users table
  • When set, kilo-auto/balanced routes to moonshotai/kimi-k2.5 instead of openai/gpt-5.3-codex
  • Admins can toggle the flag from the user detail page via a new button in account info

Verification

  • TypeScript type-checked with tsgo (exit 0)
  • Code formatted with pnpm format
  • Migration generated with pnpm drizzle generate (committed separately as 0097_pink_patriot.sql)

Visual Changes

N/A

Reviewer Notes

  • The routing check in resolution.ts awaits the user promise (already fetched for the KiloClaw setup promo check in the same branch), so there's no extra DB round-trip in the non-KiloClaw path.
  • The BALANCED_KIMI_MODEL constant has no reasoning config — Kimi K2.5 does not require it. The applyMoonshotModelSettings middleware will strip unsupported params (temperature/top_p) via the existing provider handler.

kilo-code-bot bot added 2 commits April 17, 2026 22:27
…imi K2.5

When is_openai_deactivated is set on a user, kilo-auto/balanced routes to
moonshotai/kimi-k2.5 instead of openai/gpt-5.3-codex. Admins can toggle
this flag from the user detail page.
@kilo-code-bot
Copy link
Copy Markdown
Contributor Author

kilo-code-bot bot commented Apr 17, 2026

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (9 files)
  • apps/web/src/app/admin/components/UserAdmin/UserAdminAccountInfo.tsx
  • apps/web/src/app/api/cloud-agent/sessions/prepare/route.test.ts
  • apps/web/src/lib/kilo-auto/index.ts
  • apps/web/src/lib/kilo-auto/resolution.ts
  • apps/web/src/lib/token.test.ts
  • apps/web/src/routers/admin-router.ts
  • apps/web/src/tests/helpers/user.helper.ts
  • packages/db/src/migrations/0097_pink_patriot.sql
  • packages/db/src/schema.ts

Reviewed by gpt-5.4-20260305 · 1,193,174 tokens

@kilo-code-bot kilo-code-bot bot marked this pull request as draft April 17, 2026 22:43
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.

1 participant