Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the app’s default LLM model selection behavior, primarily moving OpenRouter defaults to newer model IDs and adding support for selecting per-provider “fast vs smart” models when creating the LLM client.
Changes:
- Updated OpenRouter default model IDs in stored defaults and in the LLM factory defaults.
- Expanded settings sanitization to also normalize OpenRouter model values (in addition to Gemini).
- Introduced per-provider model selection (
getModelForProvider) increateLLM()and used it during provider failover.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/store.js | Updates default OpenRouter model IDs and extends sanitize() to normalize Gemini/OpenRouter model settings. |
| src/llm.js | Updates default OpenRouter model, adds per-provider model selection in createLLM(), and applies it during failover. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| function createLLM(settings) { | ||
| const primaryProvider = settings.provider || 'gemini'; | ||
| const primaryProvider = settings.provider || 'geminihow are you'; |
Comment on lines
+118
to
+122
| const getModelForProvider = (p) => { | ||
| const isSmart = !!settings.smart; | ||
| if (settings.models && settings.models[p]) { | ||
| return isSmart ? settings.models[p].smart : settings.models[p].fast; | ||
| } |
Comment on lines
+56
to
63
| if (settings.models.openrouter) { | ||
| if (!settings.models.openrouter.fast || settings.models.openrouter.fast.includes('gemini-2.0') || settings.models.openrouter.fast.includes('lite-001')) { | ||
| settings.models.openrouter.fast = 'google/gemini-2.5-flash'; | ||
| } | ||
| if (!settings.models.openrouter.smart || settings.models.openrouter.smart.includes('gemini-2.0') || settings.models.openrouter.smart.includes('lite-001')) { | ||
| settings.models.openrouter.smart = 'meta-llama/llama-3.3-70b-instruct:free'; | ||
| } | ||
| } |
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.
add the bharat to main branch