feat(vscode): show Auto model routes for every kilo-auto model

Show the underlying model list in the selector whenever an Auto model
includes autoRouting, not only kilo-auto/efficient.

Co-authored-by: kiloconnect[bot] <240665456+kiloconnect[bot]@users.noreply.github.com>
This commit is contained in:
chrarnoldus
2026-08-09 15:44:33 +00:00
parent 001fb21f7c
commit 4ff8f5e110
5 changed files with 55 additions and 10 deletions
+5
View File
@@ -0,0 +1,5 @@
---
"kilo-code": patch
---
Show underlying models for every Auto model in the model selector when the catalog includes them.
@@ -80,6 +80,20 @@ test("auto efficient details show server description and model choices", async (
await expect(preview).not.toContainText("openai/gpt-5.5")
})
test("auto frontier details show model choices when routes are present", async ({ page }) => {
await load(page, "shared--model-selector-accessible")
await page.getByRole("button", { name: "Review model: Alpha" }).click()
await page.getByRole("treeitem", { name: /Kilo Auto Frontier/ }).click()
const preview = page.locator(".model-selector-preview")
await expect(preview).toContainText("Routes each request to the strongest available models.")
await expect(preview).toContainText("Model choices")
await expect(preview).toContainText("openai/gpt-5.5")
await expect(preview).toContainText("anthropic/claude-opus-4.6")
await expect(preview).not.toContainText("google/gemini-2.5-flash")
})
test("search uses a flat relevance-ranked result list with provider labels", async ({ page }) => {
await load(page, "shared--model-selector-accessible")
@@ -128,7 +128,7 @@ describe("isAuto", () => {
})
describe("autoChoices", () => {
it("uses backend Auto Efficient routes and resolves names when available", () => {
it("uses backend Auto routes and resolves names when available", () => {
expect(
autoChoices(
{
@@ -144,12 +144,32 @@ describe("autoChoices", () => {
])
})
it("ignores missing routes and non-efficient Auto models", () => {
it("shows routes for any Auto model when present", () => {
expect(
autoChoices(
{
providerID: KILO_GATEWAY_ID,
id: "kilo-auto/frontier",
autoRouting: { models: ["provider/model"] },
},
[{ id: "provider/model", name: "Provider: Model" }],
),
).toEqual([{ id: "provider/model", name: "Model" }])
expect(
autoChoices({
providerID: KILO_GATEWAY_ID,
id: "kilo-auto/free",
autoRouting: { models: ["provider/model"] },
}),
).toEqual([{ id: "provider/model", name: "provider/model" }])
})
it("ignores missing routes and non-Auto models", () => {
expect(autoChoices({ providerID: KILO_GATEWAY_ID, id: "kilo-auto/efficient" })).toEqual([])
expect(
autoChoices({
providerID: KILO_GATEWAY_ID,
id: "kilo-auto/frontier",
id: "anthropic/claude-sonnet",
autoRouting: { models: ["provider/model"] },
}),
).toEqual([])
@@ -10,7 +10,6 @@ import {
export { KILO_GATEWAY_ID, PROVIDER_ORDER }
export const KILO_AUTO_SMALL_IDS = new Set(["kilo-auto/small", "auto-small"])
export const KILO_AUTO_EFFICIENT_ID = "kilo-auto/efficient"
const AUTO_FALLBACK = "Routes requests automatically."
interface Choice {
@@ -24,15 +23,11 @@ export function isAuto(model: Pick<EnrichedModel, "providerID" | "id">): boolean
)
}
export function isAutoEfficient(model: Pick<EnrichedModel, "providerID" | "id">): boolean {
return model.providerID === KILO_GATEWAY_ID && model.id === KILO_AUTO_EFFICIENT_ID
}
export function autoChoices(
model: Pick<EnrichedModel, "providerID" | "id" | "autoRouting">,
catalog: readonly Pick<EnrichedModel, "id" | "name">[] = [],
): readonly Choice[] {
if (!isAutoEfficient(model)) return []
if (!isAuto(model)) return []
const ids = model.autoRouting?.models
if (!ids?.length) return []
const names = new Map(catalog.map((item) => [item.id, stripSubProviderPrefix(sanitizeName(item.name))]))
@@ -72,7 +72,18 @@ const ACCESSIBLE_MODELS: EnrichedModel[] = [
},
autoRouting: { models: ["google/gemini-2.5-flash", "anthropic/claude-sonnet-4.6"] },
},
{ id: "omega", name: "Omega", providerID: "openai", providerName: "OpenAI", recommendedIndex: 1 },
{
id: "kilo-auto/frontier",
name: "Kilo Auto Frontier",
providerID: "kilo",
providerName: "Kilo",
recommendedIndex: 1,
options: {
description: "Routes each request to the strongest available models.",
},
autoRouting: { models: ["openai/gpt-5.5", "anthropic/claude-opus-4.6"] },
},
{ id: "omega", name: "Omega", providerID: "openai", providerName: "OpenAI", recommendedIndex: 2 },
{ id: "alpha", name: "Alpha", providerID: "kilo", providerName: "Kilo" },
{ id: "bravo", name: "Bravo", providerID: "kilo", providerName: "Kilo" },
{ id: "charlie", name: "Charlie", providerID: "kilo", providerName: "Kilo" },