feat(models): add kilo/auto model with centralized configuration#10
Merged
feat(models): add kilo/auto model with centralized configuration#10
Conversation
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.
|
Deployment failed with the following error: Learn More: https://vercel.com/docs/functions/limitations |
Contributor
Code Review SummaryStatus: 1 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
Other Observations (not in diff)Issues found in unchanged code that cannot receive inline comments:
Files Reviewed (6 files)
|
There was a problem hiding this comment.
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.
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.
markijbema
approved these changes
Feb 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.