Skip to content

refactor(models): remove deprecatedAutoModelsToPreventNewExtensionModelPickerFromGettingStuck#1273

Closed
kilo-code-bot[bot] wants to merge 1 commit intomainfrom
remove-deprecated-auto-models-function
Closed

refactor(models): remove deprecatedAutoModelsToPreventNewExtensionModelPickerFromGettingStuck#1273
kilo-code-bot[bot] wants to merge 1 commit intomainfrom
remove-deprecated-auto-models-function

Conversation

@kilo-code-bot
Copy link
Contributor

@kilo-code-bot kilo-code-bot bot commented Mar 19, 2026

Summary

Removes the deprecatedAutoModelsToPreventNewExtensionModelPickerFromGettingStuck function and its sole callsite in buildAutoModels. The deprecated model entries (kilo/auto, kilo/auto-free, kilo/auto-small) are no longer injected into the model list returned to clients. The approval snapshot is updated accordingly.

Verification

  • Reviewed all usages — the function had exactly one callsite (src/lib/providers/openrouter/index.ts), no other consumers.
  • Removed the three deprecated entries from openrouter-models-sorting.approved.json and fixed trailing comma.
  • node_modules not available in this environment; no automated test run was possible.

Visual Changes

N/A

Reviewer Notes

The legacyMapping in kilo-auto-model.ts is still used by isKiloAutoModel and resolveAutoModel, so it is intentionally left in place — only the function that generated deprecated phantom model-picker entries is removed.

@kilo-code-bot
Copy link
Contributor Author

kilo-code-bot bot commented Mar 19, 2026

Code Review Summary

Status: 1 Issue Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 0

Fix these issues in Kilo Cloud

Issue Details (click to expand)

WARNING

File Line Issue
src/lib/providers/openrouter/index.ts 24 Reusing the canonical name/description for legacy kilo/auto* aliases makes the API expose duplicate indistinguishable model choices and allows new selections of deprecated IDs.
Other Observations (not in diff)

None.

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

Reviewed by gpt-5.4-20260305 · 185,180 tokens


// Legacy aliases so persisted model selections (e.g. in app-builder projects) remain valid
const legacyAliases = Object.entries(legacyAutoModelMapping).flatMap(([legacyId, model]) =>
model ? [{ ...model, id: legacyId }] : []
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: Legacy aliases are no longer marked as deprecated

legacyAliases clones the canonical model name and description, so /api/openrouter/models now contains two indistinguishable "Kilo Auto Frontier/Free/Small" entries: the real kilo-auto/* IDs and the legacy kilo/auto* IDs. Any picker that renders name now offers deprecated IDs as if they were current options, which undermines the migration path and can create duplicate-looking rows. Keep serving the aliases for persisted selections, but preserve a deprecated label/description or otherwise hide them from new selections.

@chrarnoldus chrarnoldus marked this pull request as draft March 19, 2026 14:15
@chrarnoldus chrarnoldus force-pushed the remove-deprecated-auto-models-function branch from baafa24 to 247eaf5 Compare March 19, 2026 14:18
@chrarnoldus chrarnoldus deleted the remove-deprecated-auto-models-function branch March 20, 2026 08:28
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