Skip to content

fix: prefer allowed Efficient pool models before platform fallback - #5773

Open
chrarnoldus wants to merge 5 commits into
mainfrom
fix/efficient-allowed-pool-fallback
Open

fix: prefer allowed Efficient pool models before platform fallback#5773
chrarnoldus wants to merge 5 commits into
mainfrom
fix/efficient-allowed-pool-fallback

Conversation

@chrarnoldus

@chrarnoldus chrarnoldus commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Prefer the first permitted, available configured Efficient pool model and exact variant in saved order when the routing worker cannot return a usable decision; preserve organization-over-personal pool precedence.
  • Skip incompatible APIs, image modalities, undersized context windows, and stale catalog variants; retain the platform fallback and final organization authorization checks when no configured entry is usable.
  • Bound settings lookups and clarify settings help and selected-model rejection text.

Verification

  • CI passes: tests (including builder and container usage Postgres suites), build, typecheck, lint, formatting, migration checks, secret scanning, and extension checks/E2E.
  • Fixed CI mock-hoisting failures and the review finding about valid null-variant models; review thread resolved and latest Kilo Code Review passed.
  • Tests ran in CI only, as requested. Local changed-file formatting, oxlint, and git diff --check passed; the full local typecheck hit the environment timeout, while CI typecheck passed.
  • Regression coverage includes pool inheritance/order, effective policy, variants (including GPT-4o without reasoning), request compatibility, settings failures/timeouts, and UI/error copy.

UI copy follows the Kilo Cloud overlay and voice reference; no layout changes.

Co-authored-by: kiloconnect[bot] <240665456+kiloconnect[bot]@users.noreply.github.com>
@chrarnoldus chrarnoldus self-assigned this Aug 31, 2026
Co-authored-by: kiloconnect[bot] <240665456+kiloconnect[bot]@users.noreply.github.com>
Comment thread apps/web/src/lib/ai-gateway/auto-model/resolution.ts Outdated
@kilo-code-bot

kilo-code-bot Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (12 files)
  • apps/web/src/app/api/openrouter/[...path]/route.test.ts
  • apps/web/src/app/api/openrouter/[...path]/route.ts
  • apps/web/src/components/auto-routing/AutoRoutingModeCard.test.ts
  • apps/web/src/components/auto-routing/AutoRoutingModeCard.tsx
  • apps/web/src/lib/ai-gateway/auto-model/resolution.test.ts
  • apps/web/src/lib/ai-gateway/auto-model/resolution.ts
  • apps/web/src/lib/ai-gateway/auto-routing-admin-client.test.ts
  • apps/web/src/lib/ai-gateway/auto-routing-admin-client.ts
  • apps/web/src/lib/ai-gateway/auto-routing-denied-models.test.ts
  • apps/web/src/lib/ai-gateway/auto-routing-denied-models.ts
  • apps/web/src/lib/ai-gateway/llm-proxy-helpers.test.ts
  • apps/web/src/lib/ai-gateway/llm-proxy-helpers.ts
Previous Review Summaries (2 snapshots, latest commit afb107a)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit afb107a)

Status: 1 Issue Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 1
WARNING 0
SUGGESTION 0

Fix these issues in Kilo Cloud

Issue Details (click to expand)

CRITICAL

File Line Issue
apps/web/src/lib/ai-gateway/auto-model/resolution.ts 332 Null-variant pool entries skipped when family fallback variants exist
Files Reviewed (12 files)
  • apps/web/src/app/api/openrouter/[...path]/route.test.ts - 0 issues
  • apps/web/src/app/api/openrouter/[...path]/route.ts - 0 issues
  • apps/web/src/components/auto-routing/AutoRoutingModeCard.test.ts - 0 issues
  • apps/web/src/components/auto-routing/AutoRoutingModeCard.tsx - 0 issues
  • apps/web/src/lib/ai-gateway/auto-model/resolution.test.ts - 0 issues
  • apps/web/src/lib/ai-gateway/auto-model/resolution.ts - 1 issue
  • apps/web/src/lib/ai-gateway/auto-routing-admin-client.test.ts - 0 issues
  • apps/web/src/lib/ai-gateway/auto-routing-admin-client.ts - 0 issues
  • apps/web/src/lib/ai-gateway/auto-routing-denied-models.test.ts - 0 issues
  • apps/web/src/lib/ai-gateway/auto-routing-denied-models.ts - 0 issues
  • apps/web/src/lib/ai-gateway/llm-proxy-helpers.test.ts - 0 issues
  • apps/web/src/lib/ai-gateway/llm-proxy-helpers.ts - 0 issues

Previous review (commit e16a04f)

Status: 1 Issue Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 1
WARNING 0
SUGGESTION 0

Fix these issues in Kilo Cloud

Issue Details (click to expand)

CRITICAL

File Line Issue
apps/web/src/lib/ai-gateway/auto-model/resolution.ts 332 Null-variant pool entries skipped when family fallback variants exist
Files Reviewed (12 files)
  • apps/web/src/app/api/openrouter/[...path]/route.test.ts - 0 issues
  • apps/web/src/app/api/openrouter/[...path]/route.ts - 0 issues
  • apps/web/src/components/auto-routing/AutoRoutingModeCard.test.ts - 0 issues
  • apps/web/src/components/auto-routing/AutoRoutingModeCard.tsx - 0 issues
  • apps/web/src/lib/ai-gateway/auto-model/resolution.test.ts - 0 issues
  • apps/web/src/lib/ai-gateway/auto-model/resolution.ts - 1 issue
  • apps/web/src/lib/ai-gateway/auto-routing-admin-client.test.ts - 0 issues
  • apps/web/src/lib/ai-gateway/auto-routing-admin-client.ts - 0 issues
  • apps/web/src/lib/ai-gateway/auto-routing-denied-models.test.ts - 0 issues
  • apps/web/src/lib/ai-gateway/auto-routing-denied-models.ts - 0 issues
  • apps/web/src/lib/ai-gateway/llm-proxy-helpers.test.ts - 0 issues
  • apps/web/src/lib/ai-gateway/llm-proxy-helpers.ts - 0 issues

Reviewed by grok-4.6 · Input: 161.2K · Output: 13K · Cached: 531.8K

Review guidance: REVIEW.md from base branch main

chrarnoldus and others added 3 commits August 31, 2026 11:38
Co-authored-by: kiloconnect[bot] <240665456+kiloconnect[bot]@users.noreply.github.com>
Co-authored-by: kiloconnect[bot] <240665456+kiloconnect[bot]@users.noreply.github.com>
Co-authored-by: kiloconnect[bot] <240665456+kiloconnect[bot]@users.noreply.github.com>
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