Skip to content

feat(models): add kilo/auto model with centralized configuration#10

Merged
iscekic merged 5 commits intomainfrom
add-auto-model
Feb 4, 2026
Merged

feat(models): add kilo/auto model with centralized configuration#10
iscekic merged 5 commits intomainfrom
add-auto-model

Conversation

@iscekic
Copy link
Copy Markdown
Contributor

@iscekic iscekic commented Feb 4, 2026

No description provided.

Extract kilo/auto model constants into a shared module and inject the model into both OpenRouter hooks and provider lists. This ensures the auto-routing model appears consistently across the application with unified metadata (context length, pricing, description).

- Create kilo-auto-model.ts with centralized model constants
- Add buildKiloAutoModel() and buildAutoModel() factory functions
- Update API route to use KILO_AUTO_MODEL_ID constant
- Inject auto model into useOpenRouterModelsAndProviders hook
- Add auto model to enhancedModelList with preferredIndex -1
- Update test snapshot to include kilo/auto model entry
Update the kilo/auto model description to be more user-friendly and adjust preferredIndex values for all models to accommodate the new auto model at position 0.
Add KILO_AUTO_MODEL_ID as the first entry in the recommended models array with tool_choice_required and random_vercel_routing both set to false.
@iscekic iscekic requested review from Copilot and markijbema February 4, 2026 12:26
@iscekic iscekic self-assigned this Feb 4, 2026
@vercel
Copy link
Copy Markdown

vercel Bot commented Feb 4, 2026

Deployment failed with the following error:

The value for maxDuration must be between 1 second and 300 seconds, in order to increase this limit upgrade your plan: https://vercel.com/pricing

Learn More: https://vercel.com/docs/functions/limitations

Comment thread src/app/api/openrouter/[...path]/route.ts Outdated
@kilo-code-bot
Copy link
Copy Markdown
Contributor

kilo-code-bot Bot commented Feb 4, 2026

Code Review Summary

Status: 1 Issues Found | Recommendation: Address before merge

Overview

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

WARNING

File Line Issue
src/lib/providers/openrouter/index.ts 67 Potential duplicate kilo/auto in enhanced model list if upstream ever includes it
Other Observations (not in diff)

Issues found in unchanged code that cannot receive inline comments:

File Line Issue
N/A N/A Existing PR inline discussion about kilo/auto allow-list logic appears addressed by computing requestedAutoModel before resolving to the concrete model; consider resolving/outdating those threads if no longer applicable.
Files Reviewed (6 files)
  • src/app/api/openrouter/[...path]/route.ts - 0 issues
  • src/app/api/openrouter/hooks.ts - 0 issues
  • src/lib/kilo-auto-model.ts - 0 issues
  • src/lib/providers/openrouter/index.ts - 1 issue
  • src/lib/providers/recommended-models.ts - 0 issues
  • src/tests/openrouter-models-sorting.approved.json - 0 issues

Fix these issues in Kilo Cloud

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces a new "kilo/auto" model with centralized configuration constants. The auto model dynamically routes requests to the best model for the task based on the mode header.

Changes:

  • Created a new centralized constants file (src/lib/kilo-auto-model.ts) with model ID, name, description, pricing, and context length constants
  • Added "kilo/auto" to the recommended models list with highest priority (preferredIndex: -1)
  • Refactored the API route to use the centralized constant instead of a local constant
  • Updated test fixtures to reflect the new model in the sorted models list

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/lib/kilo-auto-model.ts New centralized configuration file defining all constants for the kilo/auto model
src/lib/providers/recommended-models.ts Adds kilo/auto as the top recommended model
src/lib/providers/openrouter/index.ts Imports centralized constants and uses them in buildAutoModel function
src/app/api/openrouter/hooks.ts Imports centralized constants and uses them in buildKiloAutoModel function
src/app/api/openrouter/[...path]/route.ts Refactors to use centralized KILO_AUTO_MODEL_ID constant instead of local AUTO_MODEL_ID constant
src/tests/openrouter-models-sorting.approved.json Updates test fixture with kilo/auto model entry and adjusted preferredIndex values

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/app/api/openrouter/[...path]/route.ts Outdated
Previously, the model restriction check was incorrectly skipped when requestedAutoModel was true due to inverted logic. This fix ensures that organization model allow list validation is always performed, including for kilo/auto model requests.
Comment thread src/lib/providers/openrouter/index.ts
@iscekic iscekic merged commit 22e98f9 into main Feb 4, 2026
9 checks passed
@iscekic iscekic deleted the add-auto-model branch February 4, 2026 13:11
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.

3 participants