feat(ai): add openrouter "auto" model alias (#1361)

Add a manually inserted "auto" model entry for OpenRouter alongside
the existing "openrouter/auto" entry, allowing users to select the
auto-routing model with a shorter identifier.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Shashank Goyal 2026-02-07 09:35:21 -05:00 committed by GitHub
parent f9161c4d4e
commit 3fb33da429
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 63 additions and 46 deletions

View file

@ -860,11 +860,11 @@ async function generateModels() {
});
}
// Add missing OpenRouter model
if (!allModels.some(m => m.provider === "openrouter" && m.id === "openrouter/auto")) {
// Add "auto" alias for openrouter/auto
if (!allModels.some(m => m.provider === "openrouter" && m.id === "auto")) {
allModels.push({
id: "openrouter/auto",
name: "OpenRouter: Auto Router",
id: "auto",
name: "Auto",
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",