Skip to content

refactor(auto-routing): remove auto-decider candidate sync - #7541

Merged
iscekic merged 3 commits into
mainfrom
igor/auto-routing-remove-auto-decider
Oct 14, 2026
Merged

iscekic merged 3 commits into
mainfrom
igor/auto-routing-remove-auto-decider

Conversation

@iscekic

@iscekic iscekic commented Oct 14, 2026

Copy link
Copy Markdown
Collaborator

bot: Remove the auto-decider sync. The decider candidates for the efficient and frontier routers now come only from the models an admin picks. This PR is stacked on #7519.

Change

  • Deleted:
    • the auto-decider sync and its daily cron step;
    • candidate discovery from Kilo Bench terminal-bench scores, and its internal web endpoint;
    • the autoDeciderModels, exclusion and min/max cost config, with its admin UI.
  • The manual and auto split is gone: deciderModels is the admin list.
  • D1 migration 0017 drops config_auto_decider_models, config_auto_decider_exclusions and the auto-decider cost columns.
  • A config PUT from an older client still parses, because zod strips the removed fields.
  • terminal-bench.ts stays, because the OpenRouter model sync still uses it.

Effect after deploy

  • The platform list shrinks to the admin-picked models. The models that only the auto-decider picked lose platform_requested at the next reconcile, and the next publish ranks only configured pairs.
  • Their measurement rows stay, for history and for owner pools.

Verification

  • VM: contracts 119, auto-routing 303, auto-routing-benchmark 520 tests pass. Web admin, model-stats and client Jest pass 1132 tests. Typecheck passes, and type-aware lint is clean.
  • Migration test: applied migrations 0001–0016 to a fresh SQLite database, seeded config and profile rows, then applied 0017. The rows survive.

Comment thread services/auto-routing-benchmark/migrations/0017_serious_lila_cheney.sql Outdated
Comment thread services/auto-routing-benchmark/src/config.ts
@kilo-code-bot

kilo-code-bot Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: 1 Issue Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 0
Issue Details (click to expand)

WARNING

File Line Issue
services/auto-routing-benchmark/src/config.ts 46 A router whose config_decider_models rows are empty now resolves to a null config, so syncPlatformRegistry/publishPlatformRoutingTable/drainQueue early-return and the last routing_tables row keeps being served until an admin re-saves. Re-verified on current HEAD; the author declined with a production-data rationale, but the latent behavior is unchanged.
Files Reviewed (23 files)
  • apps/web/src/app/admin/api/auto-routing/benchmark-config/route.test.ts
  • apps/web/src/app/admin/auto-routing/BenchmarksSection.test.ts
  • apps/web/src/app/admin/auto-routing/BenchmarksSection.tsx
  • apps/web/src/app/api/internal/auto-routing-benchmark/decider-candidates/route.test.ts (deleted)
  • apps/web/src/app/api/internal/auto-routing-benchmark/decider-candidates/route.ts (deleted)
  • apps/web/src/lib/model-stats/auto-routing-decider-candidates.test.ts (deleted)
  • apps/web/src/lib/model-stats/auto-routing-decider-candidates.ts (deleted)
  • packages/auto-routing-contracts/src/benchmark.ts
  • packages/auto-routing-contracts/src/contracts.test.ts
  • packages/web-shared/src/lib/ai-gateway/auto-routing-benchmark-admin-client.test.ts
  • services/auto-routing-benchmark/README.md
  • services/auto-routing-benchmark/src/admin.test.ts
  • services/auto-routing-benchmark/src/auto-decider-sync.test.ts (deleted)
  • services/auto-routing-benchmark/src/auto-decider-sync.ts (deleted)
  • services/auto-routing-benchmark/src/config.test.ts
  • services/auto-routing-benchmark/src/config.ts - 1 issue
  • services/auto-routing-benchmark/src/db-schema.ts
  • services/auto-routing-benchmark/src/db.ts
  • services/auto-routing-benchmark/src/index-queue.test.ts
  • services/auto-routing-benchmark/src/index.ts
  • services/auto-routing-benchmark/src/profile-runs.test.ts
  • services/auto-routing-benchmark/src/router-isolation.test.ts
  • services/auto-routing-benchmark/src/run-process-job.test.ts

Notes: the previously flagged 0017 drop migration is no longer part of the net tree (moved to a stacked follow-up), so that warning is resolved. No dangling references remain to the removed auto-decider sync, contract schemas, internal decider-candidates endpoint, or admin UI helpers, and the daily platform cron now runs the same sweep/reconcile/drain/publish pipeline that syncAutoDeciderModels used to.

Fix these issues in Kilo Cloud

Previous Review Summaries (2 snapshots, latest commit b034571)

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

Previous review (commit b034571)

Status: 1 Issue Found | Recommendation: Address before merge

Executive Summary

The migration-drop warning is resolved by removing 0017 (moved to a stacked follow-up PR, so this PR changes no schema), but a config whose decider list was populated only by the removed auto-sync still resolves to a null config, so the published routing table can freeze until an admin re-saves.

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 0
Issue Details (click to expand)

WARNING

File Line Issue
services/auto-routing-benchmark/src/config.ts 46 Auto-only configs now resolve to a null config, freezing the published routing table
Files Reviewed (3 files)
  • services/auto-routing-benchmark/migrations/0017_serious_lila_cheney.sql (deleted)
  • services/auto-routing-benchmark/migrations/meta/0017_snapshot.json (deleted)
  • services/auto-routing-benchmark/migrations/meta/_journal.json

Fix these issues in Kilo Cloud

Previous review (commit 27b2b3a)

Status: 2 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 2
SUGGESTION 0
Issue Details (click to expand)

WARNING

File Line Issue
services/auto-routing-benchmark/migrations/0017_serious_lila_cheney.sql 1 Migration drops columns/tables the live Worker still reads; predeploy applies it before the new bundle deploys
services/auto-routing-benchmark/src/config.ts 46 Configs whose decider list came only from the auto-sync (empty config_decider_models) now resolve to null, freezing the published routing table until an admin re-saves
Files Reviewed (26 files)
  • apps/web/src/app/admin/api/auto-routing/benchmark-config/route.test.ts
  • apps/web/src/app/admin/auto-routing/BenchmarksSection.test.ts
  • apps/web/src/app/admin/auto-routing/BenchmarksSection.tsx
  • apps/web/src/app/api/internal/auto-routing-benchmark/decider-candidates/route.test.ts (deleted)
  • apps/web/src/app/api/internal/auto-routing-benchmark/decider-candidates/route.ts (deleted)
  • apps/web/src/lib/model-stats/auto-routing-decider-candidates.test.ts (deleted)
  • apps/web/src/lib/model-stats/auto-routing-decider-candidates.ts (deleted)
  • packages/auto-routing-contracts/src/benchmark.ts
  • packages/auto-routing-contracts/src/contracts.test.ts
  • packages/web-shared/src/lib/ai-gateway/auto-routing-benchmark-admin-client.test.ts
  • services/auto-routing-benchmark/README.md
  • services/auto-routing-benchmark/migrations/0017_serious_lila_cheney.sql - 1 issue
  • services/auto-routing-benchmark/migrations/meta/0017_snapshot.json
  • services/auto-routing-benchmark/migrations/meta/_journal.json
  • services/auto-routing-benchmark/src/admin.test.ts
  • services/auto-routing-benchmark/src/auto-decider-sync.test.ts (deleted)
  • services/auto-routing-benchmark/src/auto-decider-sync.ts (deleted)
  • services/auto-routing-benchmark/src/config.test.ts
  • services/auto-routing-benchmark/src/config.ts - 1 issue
  • services/auto-routing-benchmark/src/db-schema.ts
  • services/auto-routing-benchmark/src/db.ts
  • services/auto-routing-benchmark/src/index-queue.test.ts
  • services/auto-routing-benchmark/src/index.ts
  • services/auto-routing-benchmark/src/profile-runs.test.ts
  • services/auto-routing-benchmark/src/router-isolation.test.ts
  • services/auto-routing-benchmark/src/run-process-job.test.ts

Fix these issues in Kilo Cloud


Reviewed by deepseek-v4.1-flash · Input: 176.1K · Output: 21.9K · Cached: 1.5M

Review guidance: REVIEW.md from base branch main

Base automatically changed from igor/auto-frontier-router to main October 14, 2026 22:07
@iscekic
iscekic force-pushed the igor/auto-routing-remove-auto-decider branch from 8331b42 to 4c5c6ad Compare October 14, 2026 22:07
@iscekic
iscekic merged commit c7e6dfe into main Oct 14, 2026
31 checks passed
@iscekic
iscekic deleted the igor/auto-routing-remove-auto-decider branch October 14, 2026 22:31
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