From 9be325a40da6a77cb309600d132d0738b801f699 Mon Sep 17 00:00:00 2001 From: gubin-dev Date: Tue, 17 Nov 2026 15:12:00 +0300 Subject: [PATCH 1/4] feat(chat): unify profile, model and reasoning selection (#2479) --- src/core/webview/ClineProvider.ts | 60 +-- .../ClineProvider.apiHandlerRebuild.spec.ts | 128 ++++- .../__tests__/profileModelPatch.spec.ts | 216 +++++++++ .../__tests__/webviewMessageHandler.spec.ts | 110 +++++ src/core/webview/profileModelPatch.ts | 112 +++++ src/core/webview/webviewMessageHandler.ts | 46 +- .../gallery/UnifiedModelPicker.fixture.tsx | 56 +++ webview-ui/playwright/gallery/stories.tsx | 4 + .../src/components/chat/ApiConfigSelector.tsx | 204 +++++--- .../src/components/chat/ChatTextArea.tsx | 19 +- .../src/components/chat/ModelSelector.tsx | 323 ------------- .../src/components/chat/PickerSearchField.tsx | 47 ++ .../components/chat/ProfileQuickSettings.tsx | 58 +++ .../chat/__tests__/ApiConfigSelector.spec.tsx | 124 ++++- .../ChatTextArea.modelPicker.spec.tsx | 104 ++++ .../ModelPicker.integration.spec.tsx | 135 ++++++ .../chat/__tests__/ModelSelector.spec.tsx | 452 ------------------ .../chat/__tests__/PickerSearchField.spec.tsx | 42 ++ .../__tests__/ProfileQuickSettings.spec.tsx | 235 +++++++++ .../__tests__/UnifiedModelPicker.visual.tsx | 131 +++++ .../unified-model-picker-models-dark.png | Bin 0 -> 17814 bytes .../unified-model-picker-models-light.png | Bin 0 -> 18028 bytes .../unified-model-picker-profiles-dark.png | Bin 0 -> 12785 bytes .../unified-model-picker-profiles-light.png | Bin 0 -> 12591 bytes .../modelPicker.translations.spec.tsx | 54 +++ .../chat/__tests__/pickerTestFocus.ts | 22 + .../chat/model-picker/ModelResults.tsx | 102 ++++ .../components/chat/model-picker/README.md | 18 + .../chat/model-picker/ReasoningControls.tsx | 44 ++ .../__tests__/openAiModelDiscovery.spec.tsx | 265 ++++++++++ .../__tests__/profileModelPatches.spec.ts | 77 +++ .../model-picker/__tests__/reasoning.spec.ts | 205 ++++++++ .../__tests__/useProfileModelCatalog.spec.tsx | 149 ++++++ .../src/components/chat/model-picker/index.ts | 7 + .../chat/model-picker/openAiModelDiscovery.ts | 63 +++ .../chat/model-picker/pickerNavigation.ts | 30 ++ .../chat/model-picker/profileModelPatches.ts | 33 ++ .../components/chat/model-picker/reasoning.ts | 94 ++++ .../chat/model-picker/useModelPickerSubmit.ts | 23 + .../chat/model-picker/useModelSearch.ts | 30 ++ .../model-picker/useOpenAiModelCatalog.ts | 55 +++ .../model-picker/useProfileModelCatalog.ts | 74 +++ webview-ui/src/i18n/locales/ca/chat.json | 21 + webview-ui/src/i18n/locales/de/chat.json | 21 + webview-ui/src/i18n/locales/en/chat.json | 21 + webview-ui/src/i18n/locales/es/chat.json | 21 + webview-ui/src/i18n/locales/fr/chat.json | 21 + webview-ui/src/i18n/locales/hi/chat.json | 21 + webview-ui/src/i18n/locales/id/chat.json | 21 + webview-ui/src/i18n/locales/it/chat.json | 21 + webview-ui/src/i18n/locales/ja/chat.json | 21 + webview-ui/src/i18n/locales/ko/chat.json | 21 + webview-ui/src/i18n/locales/nl/chat.json | 21 + webview-ui/src/i18n/locales/pl/chat.json | 21 + webview-ui/src/i18n/locales/pt-BR/chat.json | 21 + webview-ui/src/i18n/locales/ru/chat.json | 21 + webview-ui/src/i18n/locales/tr/chat.json | 21 + webview-ui/src/i18n/locales/vi/chat.json | 21 + webview-ui/src/i18n/locales/zh-CN/chat.json | 21 + webview-ui/src/i18n/locales/zh-TW/chat.json | 21 + 60 files changed, 3401 insertions(+), 928 deletions(-) create mode 100644 src/core/webview/__tests__/profileModelPatch.spec.ts create mode 100644 src/core/webview/profileModelPatch.ts create mode 100644 webview-ui/playwright/gallery/UnifiedModelPicker.fixture.tsx delete mode 100644 webview-ui/src/components/chat/ModelSelector.tsx create mode 100644 webview-ui/src/components/chat/PickerSearchField.tsx create mode 100644 webview-ui/src/components/chat/ProfileQuickSettings.tsx create mode 100644 webview-ui/src/components/chat/__tests__/ChatTextArea.modelPicker.spec.tsx create mode 100644 webview-ui/src/components/chat/__tests__/ModelPicker.integration.spec.tsx delete mode 100644 webview-ui/src/components/chat/__tests__/ModelSelector.spec.tsx create mode 100644 webview-ui/src/components/chat/__tests__/PickerSearchField.spec.tsx create mode 100644 webview-ui/src/components/chat/__tests__/ProfileQuickSettings.spec.tsx create mode 100644 webview-ui/src/components/chat/__tests__/UnifiedModelPicker.visual.tsx create mode 100644 webview-ui/src/components/chat/__tests__/__screenshots__/unified-model-picker-models-dark.png create mode 100644 webview-ui/src/components/chat/__tests__/__screenshots__/unified-model-picker-models-light.png create mode 100644 webview-ui/src/components/chat/__tests__/__screenshots__/unified-model-picker-profiles-dark.png create mode 100644 webview-ui/src/components/chat/__tests__/__screenshots__/unified-model-picker-profiles-light.png create mode 100644 webview-ui/src/components/chat/__tests__/modelPicker.translations.spec.tsx create mode 100644 webview-ui/src/components/chat/__tests__/pickerTestFocus.ts create mode 100644 webview-ui/src/components/chat/model-picker/ModelResults.tsx create mode 100644 webview-ui/src/components/chat/model-picker/README.md create mode 100644 webview-ui/src/components/chat/model-picker/ReasoningControls.tsx create mode 100644 webview-ui/src/components/chat/model-picker/__tests__/openAiModelDiscovery.spec.tsx create mode 100644 webview-ui/src/components/chat/model-picker/__tests__/profileModelPatches.spec.ts create mode 100644 webview-ui/src/components/chat/model-picker/__tests__/reasoning.spec.ts create mode 100644 webview-ui/src/components/chat/model-picker/__tests__/useProfileModelCatalog.spec.tsx create mode 100644 webview-ui/src/components/chat/model-picker/index.ts create mode 100644 webview-ui/src/components/chat/model-picker/openAiModelDiscovery.ts create mode 100644 webview-ui/src/components/chat/model-picker/pickerNavigation.ts create mode 100644 webview-ui/src/components/chat/model-picker/profileModelPatches.ts create mode 100644 webview-ui/src/components/chat/model-picker/reasoning.ts create mode 100644 webview-ui/src/components/chat/model-picker/useModelPickerSubmit.ts create mode 100644 webview-ui/src/components/chat/model-picker/useModelSearch.ts create mode 100644 webview-ui/src/components/chat/model-picker/useOpenAiModelCatalog.ts create mode 100644 webview-ui/src/components/chat/model-picker/useProfileModelCatalog.ts diff --git a/src/core/webview/ClineProvider.ts b/src/core/webview/ClineProvider.ts index 6c9182fcfb..bb186fc6d1 100644 --- a/src/core/webview/ClineProvider.ts +++ b/src/core/webview/ClineProvider.ts @@ -73,7 +73,6 @@ import { DEFAULT_CHECKPOINT_TIMEOUT_SECONDS, getModelId, isRetiredProvider, - modelIdKeys, providerIdentifiers, } from "@roo-code/types" import { RateLimitClock, createRateLimitClock } from "../task/RateLimitClock" @@ -98,6 +97,7 @@ import { formatLanguage } from "../../shared/language" import { WebviewMessage } from "../../shared/WebviewMessage" import { EMBEDDING_MODEL_PROFILES } from "../../shared/embeddingModels" import { ProfileValidator } from "../../shared/ProfileValidator" +import { mergeProfileModelPatch } from "./profileModelPatch" import { Terminal } from "../../integrations/terminal/Terminal" import { downloadTask, getTaskFileName } from "../../integrations/misc/export-markdown" @@ -212,22 +212,6 @@ function scheduleTask( }) } -// Keys a model-selector patch may touch: model IDs plus settings reset on model change. -const PROFILE_MODEL_ID_PATCH_KEYS: ReadonlySet = new Set(modelIdKeys) - -const BEDROCK_CUSTOM_ARN_MODEL_ID = "custom-arn" - -// These keys can only be cleared. Setting `awsCustomArn` would let a patch invoke a Bedrock -// resource that the organization allow-list never checked, because the allow-list sees `apiModelId`. -const PROFILE_MODEL_RESET_ONLY_KEYS: ReadonlySet = new Set([ - "reasoningEffort", - "modelMaxTokens", - "modelMaxThinkingTokens", - "awsCustomArn", - "awsCustomArnBaseModelId", - "awsModelContextWindow", -]) - type GetStateOptions = { includeTaskHistory?: boolean } @@ -2294,7 +2278,7 @@ export class ClineProvider } /** - * Applies a model change to the latest stored profile inside the mutation queue, + * Applies a model/reasoning change to the latest stored profile inside the mutation queue, * so a stale webview snapshot cannot overwrite newer profile settings. * A `null` patch value clears the key. */ @@ -2315,45 +2299,11 @@ export class ClineProvider ) } - const merged: Record = { ...stored, apiProvider: storedProvider } - - for (const [key, value] of Object.entries(patch)) { - if (PROFILE_MODEL_ID_PATCH_KEYS.has(key)) { - if (typeof value !== "string" || value.length === 0) { - throw new Error(`Key "${key}" must be a non-empty string in a model patch`) - } - - merged[key] = value - } else if (PROFILE_MODEL_RESET_ONLY_KEYS.has(key)) { - if (value !== null && value !== undefined) { - throw new Error(`Key "${key}" can only be cleared in a model patch`) - } - - delete merged[key] - } else { - throw new Error(`Key "${key}" is not allowed in a model patch`) - } - } - - if (storedProvider === providerIdentifiers.bedrock) { - if (merged.apiModelId === BEDROCK_CUSTOM_ARN_MODEL_ID) { - // The allow-list only sees apiModelId, so a patch must not select an ARN it cannot supply. - if (!merged.awsCustomArn) { - throw new Error( - `Model "${BEDROCK_CUSTOM_ARN_MODEL_ID}" requires an existing custom ARN`, - ) - } - } else { - // A retained ARN would override the allow-listed model, so drop it with its context fields. - for (const key of PROFILE_MODEL_RESET_ONLY_KEYS) { - if (key.startsWith("aws")) delete merged[key] - } - } - } + const merged = mergeProfileModelPatch(stored, expectedProvider, patch) const { organizationAllowList } = await this.getState() - if (!ProfileValidator.isProfileAllowed(merged as ProviderSettings, organizationAllowList)) { + if (!ProfileValidator.isProfileAllowed(merged, organizationAllowList)) { throw new OrganizationAllowListViolationError( t("common:errors.violated_organization_allowlist"), ) @@ -2362,7 +2312,7 @@ export class ClineProvider if (signal.aborted) return try { - await this.persistProviderProfile(name, merged as ProviderSettings, true, signal) + await this.persistProviderProfile(name, merged, true, signal) } catch (persistError) { // Saving and activating are separate writes. Put the previous profile back so // storage, context settings, and the task do not disagree about the model. diff --git a/src/core/webview/__tests__/ClineProvider.apiHandlerRebuild.spec.ts b/src/core/webview/__tests__/ClineProvider.apiHandlerRebuild.spec.ts index 28531e964d..44b0ec90fb 100644 --- a/src/core/webview/__tests__/ClineProvider.apiHandlerRebuild.spec.ts +++ b/src/core/webview/__tests__/ClineProvider.apiHandlerRebuild.spec.ts @@ -5,7 +5,13 @@ import * as vscode from "vscode" import { makeCompositeDisposable } from "../../../test-utils/vscode" import { TelemetryService } from "@roo-code/telemetry" -import { getModelId, RooCodeEventName } from "@roo-code/types" +import { + getModelId, + openAiModelInfoSaneDefaults, + reasoningEffortSettingValues, + RooCodeEventName, + type ProviderSettings, +} from "@roo-code/types" import { ContextProxy } from "../../config/ContextProxy" import type { Mode } from "../../../shared/modes" @@ -444,6 +450,126 @@ describe("ClineProvider - API Handler Rebuild Guard", () => { vi.mocked(vscode.window.showErrorMessage).mockClear() }) + test.each(reasoningEffortSettingValues)("persists a reasoning-only update: %s", async (reasoningEffort) => { + await provider.updateProfileModel("test-config", providerIdentifiers.openrouter, { reasoningEffort }) + expect(provider["providerSettingsManager"].saveConfig).toHaveBeenCalledWith( + "test-config", + expect.objectContaining({ openRouterModelId: "openai/gpt-4", rateLimitSeconds: 5, reasoningEffort }), + ) + expect(vscode.window.showErrorMessage).not.toHaveBeenCalled() + }) + + test.each([true, false])("persists enableReasoningEffort=%s", async (enableReasoningEffort) => { + await provider.updateProfileModel("test-config", providerIdentifiers.openrouter, { enableReasoningEffort }) + expect(provider["providerSettingsManager"].saveConfig).toHaveBeenCalledWith( + "test-config", + expect.objectContaining({ openRouterModelId: "openai/gpt-4", enableReasoningEffort }), + ) + expect(vscode.window.showErrorMessage).not.toHaveBeenCalled() + }) + + test("applies reasoning-only changes to the current task even when its model stays the same", async () => { + const task = new Task({ ...defaultTaskOptions }) + await provider.addClineToStack(task) + await provider.updateProfileModel("test-config", providerIdentifiers.openrouter, { + reasoningEffort: "disable", + enableReasoningEffort: false, + }) + expect(task.updateApiConfiguration).toHaveBeenCalledWith( + expect.objectContaining({ + openRouterModelId: "openai/gpt-4", + reasoningEffort: "disable", + enableReasoningEffort: false, + }), + ) + }) + + test("merges queued effort into the profile written by the preceding model update", async () => { + const manager = provider["providerSettingsManager"] + let latest: ProviderSettings & { name: string } = { + name: "test-config", + apiProvider: providerIdentifiers.openai, + openAiModelId: "old-model", + openAiCustomModelInfo: { ...openAiModelInfoSaneDefaults, description: "original" }, + } + manager.getProfile = vi.fn().mockImplementation(async () => latest) + vi.mocked(manager.saveConfig).mockImplementation(async (name, config) => { + latest = { + ...config, + name, + openAiCustomModelInfo: { + ...(config.openAiCustomModelInfo ?? openAiModelInfoSaneDefaults), + description: "newer metadata", + }, + } + return "test-id" + }) + await Promise.all([ + provider.updateProfileModel("test-config", providerIdentifiers.openai, { openAiModelId: "new-model" }), + provider.updateProfileModel("test-config", providerIdentifiers.openai, { + openAiCustomModelInfo: { reasoningEffort: "high" }, + }), + ]) + expect(manager.saveConfig).toHaveBeenCalledTimes(2) + expect(vi.mocked(manager.saveConfig).mock.calls[1][1]).toMatchObject({ + openAiModelId: "new-model", + openAiCustomModelInfo: { description: "newer metadata", reasoningEffort: "high" }, + }) + }) + + test.each(["high", null] as const)( + "merges nested custom effort %s into stored metadata", + async (reasoningEffort) => { + const info = { ...openAiModelInfoSaneDefaults, contextWindow: 12345, description: "custom metadata" } + const profile: ProviderSettings & { name: string } = { + name: "test-config", + apiProvider: providerIdentifiers.openai, + openAiModelId: "custom-model", + openAiApiKey: "secret", + openAiCustomModelInfo: { ...info, reasoningEffort: "low" }, + } + provider["providerSettingsManager"].getProfile = vi.fn().mockResolvedValue(profile) + await provider.updateProfileModel("test-config", providerIdentifiers.openai, { + openAiCustomModelInfo: { reasoningEffort }, + }) + const saved = vi.mocked(provider["providerSettingsManager"].saveConfig).mock.calls[0][1] + expect(saved).toMatchObject({ openAiModelId: "custom-model", openAiApiKey: "secret" }) + if (reasoningEffort === null) expect(saved.openAiCustomModelInfo).toEqual(info) + else expect(saved.openAiCustomModelInfo).toEqual({ ...info, reasoningEffort }) + expect(profile.openAiCustomModelInfo?.reasoningEffort).toBe("low") + }, + ) + + test.each([ + { apiModelId: "wrong-provider-field" }, + { reasoningEffort: "invalid" }, + { reasoningEffort: true }, + { enableReasoningEffort: "false" }, + { enableReasoningEffort: 1 }, + { openAiCustomModelInfo: { reasoningEffort: "high" } }, + ])("rejects invalid partial updates without persisting: %j", async (patch) => { + await provider.updateProfileModel("test-config", providerIdentifiers.openrouter, patch) + expect(provider["providerSettingsManager"].saveConfig).not.toHaveBeenCalled() + expect(vscode.window.showErrorMessage).toHaveBeenCalled() + }) + + test.each([ + { reasoningEffort: "disable" }, + { reasoningEffort: 1 }, + { reasoningEffort: "high", contextWindow: 1 }, + { openAiApiKey: "replacement" }, + null, + [], + ])("rejects unsafe nested metadata updates: %j", async (openAiCustomModelInfo) => { + provider["providerSettingsManager"].getProfile = vi.fn().mockResolvedValue({ + name: "test-config", + apiProvider: providerIdentifiers.openai, + }) + await provider.updateProfileModel("test-config", providerIdentifiers.openai, { openAiCustomModelInfo }) + expect(provider["providerSettingsManager"].saveConfig).not.toHaveBeenCalled() + expect(vscode.window.showErrorMessage).toHaveBeenCalled() + }) + test("merges the patch into the latest stored profile, keeping newer settings and clearing null keys", async () => { await provider.updateProfileModel("test-config", providerIdentifiers.openrouter, { openRouterModelId: "anthropic/claude", diff --git a/src/core/webview/__tests__/profileModelPatch.spec.ts b/src/core/webview/__tests__/profileModelPatch.spec.ts new file mode 100644 index 0000000000..1ae7887695 --- /dev/null +++ b/src/core/webview/__tests__/profileModelPatch.spec.ts @@ -0,0 +1,216 @@ +import { + modelIdKeys, + openAiModelInfoSaneDefaults, + providerDefinitionList, + providerIdentifiers, + reasoningEffortSettingValues, + reasoningEffortsExtended, + type ProviderDefinition, + type ProviderSettings, +} from "@roo-code/types" + +import { mergeProfileModelPatch } from "../profileModelPatch" + +const stored: ProviderSettings = { + apiProvider: providerIdentifiers.openrouter, + openRouterModelId: "old-model", + openRouterApiKey: "secret", + rateLimitSeconds: 5, + reasoningEffort: "high", + enableReasoningEffort: true, +} + +const customInfo = { + ...openAiModelInfoSaneDefaults, + contextWindow: 12345, + description: "Keep custom metadata", + supportsReasoningEffort: true, + inputPrice: 0.25, + reasoningEffort: "low", +} satisfies NonNullable + +describe("mergeProfileModelPatch", () => { + it.each(providerDefinitionList)( + "only permits the primary model field for $apiProvider", + (definition) => { + const profile: ProviderSettings = { apiProvider: definition.apiProvider } + for (const key of modelIdKeys) { + const merge = () => mergeProfileModelPatch(profile, definition.apiProvider, { [key]: "new-model" }) + if (key === definition.modelIdKey) expect(merge()).toMatchObject({ [key]: "new-model" }) + else expect(merge).toThrow() + } + }, + ) + + it.each(reasoningEffortSettingValues)( + "accepts top-level effort %s without changing the model", + (reasoningEffort) => { + const merged = mergeProfileModelPatch(stored, providerIdentifiers.openrouter, { reasoningEffort }) + expect(merged).toEqual({ ...stored, reasoningEffort }) + expect(stored.reasoningEffort).toBe("high") + }, + ) + + it.each([true, false])("accepts enableReasoningEffort=%s", (enableReasoningEffort) => { + expect(mergeProfileModelPatch(stored, providerIdentifiers.openrouter, { enableReasoningEffort })).toEqual({ + ...stored, + enableReasoningEffort, + }) + }) + + it.each([null, undefined])("clears controls and reset-only fields using %s", (value) => { + const profile: ProviderSettings = { + ...stored, + modelMaxTokens: 10, + modelMaxThinkingTokens: 5, + awsCustomArn: "existing-arn", + awsCustomArnBaseModelId: "base-model", + awsModelContextWindow: 100, + } + const keys = [ + "reasoningEffort", + "enableReasoningEffort", + "modelMaxTokens", + "modelMaxThinkingTokens", + "awsCustomArn", + "awsCustomArnBaseModelId", + "awsModelContextWindow", + ] + const patch = Object.fromEntries(keys.map((key) => [key, value])) + const merged = mergeProfileModelPatch(profile, providerIdentifiers.openrouter, patch) + for (const key of keys) expect(merged).not.toHaveProperty(key) + expect(profile).toHaveProperty("awsCustomArn", "existing-arn") + }) + + it.each(reasoningEffortsExtended)( + "merges nested effort %s without replacing custom metadata", + (reasoningEffort) => { + const profile: ProviderSettings = { + apiProvider: providerIdentifiers.openai, + openAiCustomModelInfo: Object.freeze({ ...customInfo }), + } + const merged = mergeProfileModelPatch(Object.freeze(profile), providerIdentifiers.openai, { + openAiCustomModelInfo: { reasoningEffort }, + }) + expect(merged.openAiCustomModelInfo).toEqual({ ...customInfo, reasoningEffort }) + expect(profile.openAiCustomModelInfo?.reasoningEffort).toBe("low") + }, + ) + + it.each([null, undefined])("clears only the nested effort using %s", (reasoningEffort) => { + const { reasoningEffort: _effort, ...rest } = customInfo + const merged = mergeProfileModelPatch( + { apiProvider: providerIdentifiers.openai, openAiCustomModelInfo: customInfo }, + providerIdentifiers.openai, + { openAiCustomModelInfo: { reasoningEffort } }, + ) + expect(merged.openAiCustomModelInfo).toEqual(rest) + }) + + it.each([null, undefined])("uses existing sane defaults when nested metadata is %s", (openAiCustomModelInfo) => { + const profile: ProviderSettings = { apiProvider: providerIdentifiers.openai, openAiCustomModelInfo } + expect( + mergeProfileModelPatch(profile, providerIdentifiers.openai, { + openAiCustomModelInfo: { reasoningEffort: "high" }, + }).openAiCustomModelInfo, + ).toEqual({ ...openAiModelInfoSaneDefaults, reasoningEffort: "high" }) + expect( + mergeProfileModelPatch(profile, providerIdentifiers.openai, { + openAiCustomModelInfo: { reasoningEffort: null }, + }).openAiCustomModelInfo, + ).toBe(openAiCustomModelInfo) + }) + + it.each([null, undefined, [], "patch", 1, false])("rejects non-object patches: %s", (patch) => { + expect(() => mergeProfileModelPatch(stored, providerIdentifiers.openrouter, patch)).toThrow() + }) + + it.each([ + { openRouterModelId: "" }, + { openRouterModelId: " " }, + { openRouterModelId: 1 }, + { openRouterModelId: null }, + { openRouterModelId: undefined }, + { reasoningEffort: "invalid" }, + { reasoningEffort: 1 }, + { reasoningEffort: false }, + { reasoningEffort: {} }, + { enableReasoningEffort: "false" }, + { enableReasoningEffort: 0 }, + { enableReasoningEffort: [] }, + { apiProvider: providerIdentifiers.openai }, + { openRouterApiKey: "replacement" }, + { openAiApiKey: "replacement" }, + { rateLimitSeconds: 1 }, + { modelTemperature: 0.5 }, + { modelMaxTokens: 1 }, + { modelMaxThinkingTokens: 1 }, + { awsCustomArn: "new-arn" }, + { awsCustomArnBaseModelId: "new-model" }, + { awsModelContextWindow: 1 }, + { openAiCustomModelInfo: { reasoningEffort: "high" } }, + ])("rejects invalid or restricted fields: %j", (patch) => { + expect(() => mergeProfileModelPatch(stored, providerIdentifiers.openrouter, patch)).toThrow() + }) + + it.each([ + null, + undefined, + [], + "high", + { reasoningEffort: "disable" }, + { reasoningEffort: "invalid" }, + { reasoningEffort: 1 }, + { reasoningEffort: false }, + { reasoningEffort: "high", contextWindow: 1 }, + { reasoningEffort: "high", openAiApiKey: "secret" }, + { supportsReasoningEffort: false }, + ])("rejects unsafe custom metadata patches: %j", (openAiCustomModelInfo) => { + expect(() => + mergeProfileModelPatch({ apiProvider: providerIdentifiers.openai }, providerIdentifiers.openai, { + openAiCustomModelInfo, + }), + ).toThrow() + }) + + it("rejects a mismatched or unsupported provider and resolves an unset provider to anthropic", () => { + expect(() => mergeProfileModelPatch(stored, providerIdentifiers.openai, {})).toThrow() + expect(() => mergeProfileModelPatch(stored, "unknown", {})).toThrow() + expect(mergeProfileModelPatch({}, providerIdentifiers.anthropic, { apiModelId: "claude" })).toEqual({ + apiProvider: providerIdentifiers.anthropic, + apiModelId: "claude", + }) + }) + + it("keeps empty patches as no-ops without clearing custom metadata", () => { + expect(mergeProfileModelPatch(stored, providerIdentifiers.openrouter, {})).toEqual(stored) + const profile: ProviderSettings = { apiProvider: providerIdentifiers.openai, openAiCustomModelInfo: customInfo } + expect(mergeProfileModelPatch(profile, providerIdentifiers.openai, { openAiCustomModelInfo: {} })).toEqual( + profile, + ) + }) + + it("preserves Bedrock ARN defenses for model and reasoning-only changes", () => { + const profile: ProviderSettings = { + apiProvider: providerIdentifiers.bedrock, + apiModelId: "custom-arn", + awsCustomArn: "stored-arn", + awsCustomArnBaseModelId: "base-model", + awsModelContextWindow: 100, + } + expect(mergeProfileModelPatch(profile, providerIdentifiers.bedrock, { reasoningEffort: "high" })).toEqual({ + ...profile, + reasoningEffort: "high", + }) + const merged = mergeProfileModelPatch(profile, providerIdentifiers.bedrock, { apiModelId: "catalog-model" }) + expect(merged).not.toHaveProperty("awsCustomArn") + expect(merged).not.toHaveProperty("awsCustomArnBaseModelId") + expect(merged).not.toHaveProperty("awsModelContextWindow") + expect(() => mergeProfileModelPatch(profile, providerIdentifiers.bedrock, { awsCustomArn: null })).toThrow() + expect(() => + mergeProfileModelPatch({ apiProvider: providerIdentifiers.bedrock }, providerIdentifiers.bedrock, { + apiModelId: "custom-arn", + }), + ).toThrow() + }) +}) diff --git a/src/core/webview/__tests__/webviewMessageHandler.spec.ts b/src/core/webview/__tests__/webviewMessageHandler.spec.ts index 98c306a4f3..961bd25010 100644 --- a/src/core/webview/__tests__/webviewMessageHandler.spec.ts +++ b/src/core/webview/__tests__/webviewMessageHandler.spec.ts @@ -80,6 +80,7 @@ vi.mock("@roo-code/telemetry", () => ({ import type { ModelRecord } from "@roo-code/types" import * as vsCodeLmProvider from "../../../api/providers/vscode-lm" import * as copilotProvider from "../../../api/providers/github-copilot" +import * as openAiProvider from "../../../api/providers/openai" import { webviewMessageHandler } from "../webviewMessageHandler" import { registerCopilotModelBroadcast } from "../../../services/language-models/copilotModelBroadcast" @@ -138,6 +139,115 @@ const mockClineProvider = { cwd: "/mock/workspace", } as unknown as ClineProvider +describe("webviewMessageHandler - OpenAI model discovery", () => { + const values = { baseUrl: "https://compatible.test/v1", apiKey: "secret", openAiHeaders: { custom: "header" } } + + beforeEach(() => vi.clearAllMocks()) + afterEach(() => vi.restoreAllMocks()) + + it.each([undefined, "request-1", ""])("preserves the response contract for requestId %j", async (requestId) => { + const fetch = vi.spyOn(openAiProvider, "getOpenAiModels").mockResolvedValue(["model"]) + await webviewMessageHandler(mockClineProvider, { + type: "requestOpenAiModels", + ...(requestId !== undefined ? { requestId } : {}), + values, + }) + expect(fetch).toHaveBeenCalledExactlyOnceWith(values.baseUrl, values.apiKey, values.openAiHeaders) + expect(mockClineProvider.postMessageToWebview).toHaveBeenCalledExactlyOnceWith({ + type: "openAiModels", + openAiModels: ["model"], + ...(requestId !== undefined ? { requestId } : {}), + }) + }) + + it.each([undefined, "empty-request"])( + "returns empty catalogs with the same correlation contract: %j", + async (requestId) => { + vi.spyOn(openAiProvider, "getOpenAiModels").mockResolvedValue([]) + await webviewMessageHandler(mockClineProvider, { type: "requestOpenAiModels", requestId, values }) + expect(mockClineProvider.postMessageToWebview).toHaveBeenCalledExactlyOnceWith({ + type: "openAiModels", + openAiModels: [], + ...(requestId !== undefined ? { requestId } : {}), + }) + }, + ) + + it.each([ + undefined, + {}, + { baseUrl: values.baseUrl }, + { apiKey: values.apiKey }, + { ...values, apiKey: "" }, + { ...values, baseUrl: "" }, + ])("answers correlated missing configuration but preserves legacy silence: %j", async (incomplete) => { + const fetch = vi.spyOn(openAiProvider, "getOpenAiModels") + await webviewMessageHandler(mockClineProvider, { type: "requestOpenAiModels", values: incomplete }) + expect(mockClineProvider.postMessageToWebview).not.toHaveBeenCalled() + await webviewMessageHandler(mockClineProvider, { + type: "requestOpenAiModels", + requestId: "missing", + values: incomplete, + }) + expect(mockClineProvider.postMessageToWebview).toHaveBeenCalledExactlyOnceWith({ + type: "openAiModels", + requestId: "missing", + openAiModels: [], + error: "Configure an OpenAI-compatible base URL and API key in Settings.", + }) + expect(fetch).not.toHaveBeenCalled() + }) + + it("returns a correlated failure without exposing fetch error credentials", async () => { + vi.spyOn(openAiProvider, "getOpenAiModels").mockRejectedValue(new Error("Authorization: secret")) + await webviewMessageHandler(mockClineProvider, { type: "requestOpenAiModels", requestId: "failed", values }) + expect(mockClineProvider.postMessageToWebview).toHaveBeenCalledExactlyOnceWith({ + type: "openAiModels", + requestId: "failed", + openAiModels: [], + error: "Model discovery failed; configure this model in Settings.", + }) + }) + + it("preserves legacy propagation of unexpected fetch errors without a new response payload", async () => { + vi.spyOn(openAiProvider, "getOpenAiModels").mockRejectedValue(new Error("unexpected failure")) + await expect(webviewMessageHandler(mockClineProvider, { type: "requestOpenAiModels", values })).rejects.toThrow( + "unexpected failure", + ) + expect(mockClineProvider.postMessageToWebview).not.toHaveBeenCalled() + }) + + it("echoes each request's identifier when concurrent fetches complete out of order", async () => { + let completeFirst!: (models: string[]) => void + vi.spyOn(openAiProvider, "getOpenAiModels") + .mockImplementationOnce( + () => + new Promise((resolve) => { + completeFirst = resolve + }), + ) + .mockResolvedValueOnce(["new"]) + const first = webviewMessageHandler(mockClineProvider, { + type: "requestOpenAiModels", + requestId: "first", + values, + }) + await webviewMessageHandler(mockClineProvider, { type: "requestOpenAiModels", requestId: "second", values }) + completeFirst(["old"]) + await first + expect(mockClineProvider.postMessageToWebview).toHaveBeenNthCalledWith(1, { + type: "openAiModels", + requestId: "second", + openAiModels: ["new"], + }) + expect(mockClineProvider.postMessageToWebview).toHaveBeenNthCalledWith(2, { + type: "openAiModels", + requestId: "first", + openAiModels: ["old"], + }) + }) +}) + describe("webviewMessageHandler - Copilot authentication", () => { beforeEach(() => { vi.clearAllMocks() diff --git a/src/core/webview/profileModelPatch.ts b/src/core/webview/profileModelPatch.ts new file mode 100644 index 0000000000..0c6f5830e4 --- /dev/null +++ b/src/core/webview/profileModelPatch.ts @@ -0,0 +1,112 @@ +import { + modelIdKeys, + modelInfoSchema, + openAiModelInfoSaneDefaults, + providerDefinitionList, + providerIdentifiers, + providerSettingsSchema, + reasoningEffortSettingSchema, + type ProviderSettings, +} from "@roo-code/types" + +// These fields remain reset-only: in particular, an ARN cannot bypass the model allow-list. +const RESET_ONLY_KEYS = [ + "modelMaxTokens", + "modelMaxThinkingTokens", + "awsCustomArn", + "awsCustomArnBaseModelId", + "awsModelContextWindow", +] as const satisfies readonly (keyof ProviderSettings)[] + +function requireRecord(value: unknown): Record { + if (!value || typeof value !== "object" || Array.isArray(value)) { + throw new Error("A model patch must be an object") + } + + return value as Record +} + +function mergeCustomReasoningEffort( + stored: ProviderSettings["openAiCustomModelInfo"], + value: unknown, +): ProviderSettings["openAiCustomModelInfo"] { + const patch = requireRecord(value) + + if (Object.keys(patch).some((key) => key !== "reasoningEffort")) { + throw new Error("Only reasoningEffort may be patched in openAiCustomModelInfo") + } + + if (!Object.hasOwn(patch, "reasoningEffort")) return stored + + if (patch.reasoningEffort === null || patch.reasoningEffort === undefined) { + if (!stored) return stored + const { reasoningEffort: _effort, ...rest } = stored + return rest + } + + // Model metadata uses the wire effort enum, not the top-level "disable" control value. + const reasoningEffort = modelInfoSchema.shape.reasoningEffort.unwrap().parse(patch.reasoningEffort) + return { ...(stored ?? openAiModelInfoSaneDefaults), reasoningEffort } +} + +function enforceBedrockArnInvariant(merged: ProviderSettings): void { + if (merged.apiProvider !== providerIdentifiers.bedrock) return + + if (merged.apiModelId === "custom-arn") { + if (!merged.awsCustomArn) { + throw new Error('Model "custom-arn" requires an existing custom ARN') + } + } else { + // A retained ARN would override the allow-listed model, so drop its context fields too. + delete merged.awsCustomArn + delete merged.awsCustomArnBaseModelId + delete merged.awsModelContextWindow + } +} + +/** + * Merge only model/reasoning controls into the latest stored profile without mutating it. + * Null/undefined clear controls; model IDs must be non-empty strings. Nested custom model + * metadata is effort-only and uses its own schema. Organization validation remains the caller's job. + */ +export function mergeProfileModelPatch( + stored: ProviderSettings, + expectedProvider: string, + patch: unknown, +): ProviderSettings { + const apiProvider = stored.apiProvider ?? providerIdentifiers.anthropic + const definition = providerDefinitionList.find((entry) => entry.apiProvider === expectedProvider) + if (apiProvider !== expectedProvider || !definition) { + throw new Error("Profile provider does not match a supported expected provider") + } + + const modelIdKey = modelIdKeys.find((key) => key === definition.modelIdKey) + const merged: ProviderSettings = { ...stored, apiProvider } + + for (const [key, value] of Object.entries(requireRecord(patch))) { + if (modelIdKey !== undefined && key === modelIdKey) { + if (typeof value !== "string" || value.trim().length === 0) { + throw new Error(`Key "${key}" must be a non-empty string in a model patch`) + } + merged[modelIdKey] = value + } else if (key === "reasoningEffort") { + if (value === null || value === undefined) delete merged.reasoningEffort + else merged.reasoningEffort = reasoningEffortSettingSchema.parse(value) + } else if (key === "enableReasoningEffort") { + if (value === null || value === undefined) delete merged.enableReasoningEffort + else merged.enableReasoningEffort = providerSettingsSchema.shape.enableReasoningEffort.unwrap().parse(value) + } else if (key === "openAiCustomModelInfo" && apiProvider === providerIdentifiers.openai) { + merged.openAiCustomModelInfo = mergeCustomReasoningEffort(stored.openAiCustomModelInfo, value) + } else { + const resetKey = RESET_ONLY_KEYS.find((candidate) => candidate === key) + if (!resetKey) throw new Error(`Key "${key}" is not allowed in a model patch`) + if (value !== null && value !== undefined) { + throw new Error(`Key "${key}" can only be cleared in a model patch`) + } + delete merged[resetKey] + } + } + + enforceBedrockArnInvariant(merged) + return merged +} diff --git a/src/core/webview/webviewMessageHandler.ts b/src/core/webview/webviewMessageHandler.ts index cf9d209191..227c8f9277 100644 --- a/src/core/webview/webviewMessageHandler.ts +++ b/src/core/webview/webviewMessageHandler.ts @@ -1577,18 +1577,46 @@ export const webviewMessageHandler = async ( }) break } - case OpenAiModelsMessageType.requestOpenAiModels: - if (message?.values?.baseUrl && message?.values?.apiKey) { - const openAiModels = await getOpenAiModels( - message?.values?.baseUrl, - message?.values?.apiKey, - message?.values?.openAiHeaders, - ) - - await provider.postMessageToWebview({ type: OpenAiModelsMessageType.openAiModels, openAiModels }) + case OpenAiModelsMessageType.requestOpenAiModels: { + const correlation = message.requestId !== undefined ? { requestId: message.requestId } : {} + if (!message.values?.baseUrl || !message.values?.apiKey) { + // Legacy clients expect no response until both values are configured. + if (message.requestId !== undefined) { + await provider.postMessageToWebview({ + type: OpenAiModelsMessageType.openAiModels, + ...correlation, + openAiModels: [], + error: "Configure an OpenAI-compatible base URL and API key in Settings.", + }) + } + break } + let openAiModels: string[] + try { + openAiModels = await getOpenAiModels( + message.values.baseUrl, + message.values.apiKey, + message.values.openAiHeaders, + ) + } catch (error) { + if (message.requestId === undefined) throw error + // Do not echo fetch errors: they may contain credentials or headers. + await provider.postMessageToWebview({ + type: OpenAiModelsMessageType.openAiModels, + ...correlation, + openAiModels: [], + error: "Model discovery failed; configure this model in Settings.", + }) + break + } + await provider.postMessageToWebview({ + type: OpenAiModelsMessageType.openAiModels, + ...correlation, + openAiModels, + }) break + } case VsCodeLmModelsMessageType.githubCopilotSignIn: case VsCodeLmModelsMessageType.githubCopilotReconnect: { // Plain sign-in and Reconnect run as separate attempts, so an older one can finish after a newer one. diff --git a/webview-ui/playwright/gallery/UnifiedModelPicker.fixture.tsx b/webview-ui/playwright/gallery/UnifiedModelPicker.fixture.tsx new file mode 100644 index 0000000000..96b2e72bab --- /dev/null +++ b/webview-ui/playwright/gallery/UnifiedModelPicker.fixture.tsx @@ -0,0 +1,56 @@ +import { useState } from "react" +import { providerIdentifiers, type ProviderSettings } from "@roo-code/types" + +import { ApiConfigSelector } from "@/components/chat/ApiConfigSelector" +import { ProfileQuickSettings } from "@/components/chat/ProfileQuickSettings" + +import { AppProviders } from "../AppProviders" + +const profiles = [ + { id: "work", name: "Work", modelId: "gpt-5" }, + { id: "personal", name: "Personal", modelId: "gpt-5-mini" }, + { id: "review", name: "Review", modelId: "gpt-5.4" }, +] + +/** Real picker, static production catalog, and fresh browser-owned state on every mount. */ +export function UnifiedModelPickerStory() { + const [profileId, setProfileId] = useState("work") + const [pinned, setPinned] = useState>({ work: true }) + const [locked, setLocked] = useState(false) + const profile = profiles.find(({ id }) => id === profileId) ?? profiles[0] + const apiConfiguration: ProviderSettings = { + apiProvider: providerIdentifiers.openaiNative, + apiModelId: profile.modelId, + reasoningEffort: "high", + enableReasoningEffort: true, + } + + return ( + +
+ } + title="Choose profile and model" + triggerClassName="max-w-full self-start" + onChange={setProfileId} + listApiConfigMeta={profiles} + pinnedApiConfigs={pinned} + togglePinnedApiConfig={(id) => setPinned((previous) => ({ ...previous, [id]: !previous[id] }))} + lockApiConfigAcrossModes={locked} + onToggleLockApiConfig={() => setLocked((previous) => !previous)} + /> +
+
+ ) +} diff --git a/webview-ui/playwright/gallery/stories.tsx b/webview-ui/playwright/gallery/stories.tsx index 6459aad7aa..67bde368fc 100644 --- a/webview-ui/playwright/gallery/stories.tsx +++ b/webview-ui/playwright/gallery/stories.tsx @@ -12,6 +12,10 @@ const mermaidGantt = `gantt Ship release :active, release, after scope, 3d` export const stories: Record = { + "unified-model-picker": async () => { + const { UnifiedModelPickerStory } = await import("./UnifiedModelPicker.fixture") + return + }, "terminal-settings": async () => { const [{ AppProviders }, { TerminalSettings }] = await Promise.all([ import("../AppProviders"), diff --git a/webview-ui/src/components/chat/ApiConfigSelector.tsx b/webview-ui/src/components/chat/ApiConfigSelector.tsx index ef5151a00d..06a1cc898a 100644 --- a/webview-ui/src/components/chat/ApiConfigSelector.tsx +++ b/webview-ui/src/components/chat/ApiConfigSelector.tsx @@ -1,5 +1,6 @@ -import { useState, useMemo, useCallback } from "react" +import { useState, useMemo, useCallback, useEffect, type ReactNode } from "react" import { Fzf } from "fzf" +import { Brain, ChevronDown } from "lucide-react" import { cn } from "@/lib/utils" import { enabledSelectorTriggerClassName, selectorTriggerClassName } from "@/components/ui/selectorTriggerStyles" @@ -10,10 +11,15 @@ import { vscode } from "@/utils/vscode" import { Button } from "@/components/ui" import { IconButton } from "./IconButton" +import { PickerSearchField } from "./PickerSearchField" +import { handlePickerNavigation, pickerResultsClassName } from "./model-picker/pickerNavigation" interface ApiConfigSelectorProps { value: string displayName: string + modelId?: string + reasoningEffort?: string + quickSettings?: ReactNode disabled?: boolean title: string onChange: (value: string) => void @@ -28,6 +34,9 @@ interface ApiConfigSelectorProps { export const ApiConfigSelector = ({ value, displayName, + modelId, + reasoningEffort, + quickSettings, disabled = false, title, onChange, @@ -41,6 +50,12 @@ export const ApiConfigSelector = ({ const { t } = useAppTranslation() const [open, setOpen] = useState(false) const [searchValue, setSearchValue] = useState("") + const [showProfiles, setShowProfiles] = useState(false) + const [pendingProfileId, setPendingProfileId] = useState(null) + const isProfileView = !quickSettings || showProfiles + useEffect(() => { + if (pendingProfileId === value) setPendingProfileId(null) + }, [value, pendingProfileId]) const portalContainer = useRooPortal("roo-portal") // Create searchable items for fuzzy search. @@ -79,10 +94,13 @@ export const ApiConfigSelector = ({ const handleSelect = useCallback( (configId: string) => { onChange(configId) - setOpen(false) + if (quickSettings) { + setPendingProfileId(configId === value ? null : configId) + setShowProfiles(false) + } else setOpen(false) setSearchValue("") }, - [onChange], + [onChange, quickSettings, value], ) const handleEditClick = useCallback(() => { @@ -97,25 +115,28 @@ export const ApiConfigSelector = ({ return (
handleSelect(config.id)} className={cn( "px-3 py-1.5 text-sm cursor-pointer flex items-center group", "hover:bg-vscode-list-hoverBackground", isCurrentConfig && "bg-vscode-list-activeSelectionBackground text-vscode-list-activeSelectionForeground", )}> -
+
+
{isCurrentConfig && (
@@ -126,7 +147,8 @@ export const ApiConfigSelector = ({
) }, - [value, handleSelect, t, togglePinnedApiConfig], + [value, handleSelect, t, togglePinnedApiConfig, disabled], ) return ( - + { + setOpen(nextOpen) + if (!nextOpen) { + setShowProfiles(false) + setSearchValue("") + } + }} + data-testid="api-config-selector-root"> - {displayName} + + + {displayName} + {modelId && <> / {modelId}} + + {reasoningEffort && reasoningEffort !== "disable" && ( + + + )} + -
- {/* Search input or info blurb */} - {listApiConfigMeta.length > 6 ? ( -
- setSearchValue(e.target.value)} - placeholder={t("common:ui.search_placeholder")} - className="w-full h-8 px-2 py-1 text-xs bg-vscode-input-background text-vscode-input-foreground border border-vscode-input-border rounded focus:outline-0" - autoFocus + className="flex max-h-[var(--radix-popover-content-available-height)] w-[300px] max-w-[calc(100vw-16px)] flex-col overflow-hidden p-0"> +
+ {quickSettings && ( +
- ) : ( -
-

- {t("prompts:apiConfiguration.select")} -

-
+ )} - - {/* Config list - single scroll container */} - {filteredConfigs.length === 0 && searchValue ? ( -
{t("common:ui.no_results")}
- ) : ( -
- {/* Pinned configs - sticky header */} - {pinnedConfigs.length > 0 && ( +
+ {!isProfileView && + (pendingProfileId && pendingProfileId !== value ? (
0 && "border-b border-vscode-dropdown-foreground/10", - )} - aria-label="Pinned configurations"> - {pinnedConfigs.map((config) => renderConfigItem(config, true))} + pickerResultsClassName, + "p-3 text-xs text-vscode-descriptionForeground", + )}> + {t("chat:modelPicker.loadingProfile")}
- )} + ) : ( + quickSettings + ))} + {isProfileView && ( + <> + {/* Search input or info blurb */} + {quickSettings || listApiConfigMeta.length > 6 ? ( + + ) : ( +
+

+ {t("prompts:apiConfiguration.select")} +

+
+ )} - {/* Unpinned configs */} - {unpinnedConfigs.length > 0 && ( -
- {unpinnedConfigs.map((config) => renderConfigItem(config, false))} -
- )} -
- )} + {/* Config list - single scroll container */} +
+ {filteredConfigs.length === 0 ? ( +
+ {t("common:ui.no_results")} +
+ ) : ( +
+ {/* Pinned configs - sticky header */} + {pinnedConfigs.length > 0 && ( +
0 && + "border-b border-vscode-dropdown-foreground/10", + )} + aria-label="Pinned configurations"> + {pinnedConfigs.map((config) => renderConfigItem(config, true))} +
+ )} + {/* Unpinned configs */} + {unpinnedConfigs.length > 0 && ( +
+ {unpinnedConfigs.map((config) => renderConfigItem(config, false))} +
+ )} +
+ )} +
+ + )} +
{/* Bottom bar with buttons on left and title on right */} -
+
( enterBehavior, lockApiConfigAcrossModes, } = useExtensionState() + const { id: selectedModelId, info: selectedModelInfo } = useSelectedModel(apiConfiguration) + const { currentEffort: reasoningEffort } = getReasoningSelection(apiConfiguration, selectedModelInfo) // Find the ID and display text for the currently selected API configuration. const { currentConfigId, displayName } = useMemo(() => { @@ -1334,6 +1338,11 @@ export const ChatTextArea = forwardRef( + } disabled={selectApiConfigDisabled} title={t("chat:selectApiConfig")} onChange={handleApiConfigChange} @@ -1344,12 +1353,6 @@ export const ChatTextArea = forwardRef( lockApiConfigAcrossModes={!!lockApiConfigAcrossModes} onToggleLockApiConfig={handleToggleLockApiConfig} /> -
diff --git a/webview-ui/src/components/chat/ModelSelector.tsx b/webview-ui/src/components/chat/ModelSelector.tsx deleted file mode 100644 index 063682e646..0000000000 --- a/webview-ui/src/components/chat/ModelSelector.tsx +++ /dev/null @@ -1,323 +0,0 @@ -import React from "react" -import { Fzf } from "fzf" -import { Check, X } from "lucide-react" - -import { - type ProviderSettings, - type ProviderName, - type ModelInfo, - providerIdentifiers, - isRetiredProvider, -} from "@roo-code/types" - -import { cn } from "@/lib/utils" -import { enabledSelectorTriggerClassName, selectorTriggerClassName } from "@/components/ui/selectorTriggerStyles" -import { useRooPortal } from "@/components/ui/hooks/useRooPortal" -import { useRouterModels } from "@/components/ui/hooks/useRouterModels" -import { useSelectedModel } from "@/components/ui/hooks/useSelectedModel" -import { Popover, PopoverContent, PopoverTrigger, StandardTooltip } from "@/components/ui" -import { useAppTranslation } from "@/i18n/TranslationContext" -import { vscode } from "@/utils/vscode" -import { useExtensionState } from "@/context/ExtensionStateContext" -import { - isStaticModelProvider, - getStaticModelsForProvider, - getProviderModelConfig, - handleModelChangeSideEffects, -} from "@/components/settings/utils/providerModelConfig" -import { filterModels } from "@/components/settings/utils/organizationFilters" - -import { IconButton } from "./IconButton" - -const SEARCH_THRESHOLD = 6 - -const BEDROCK_CUSTOM_ARN_MODEL_ID = "custom-arn" - -// Providers whose model can only be picked via a bespoke Settings UI -// (freeform text, local model discovery, or a compound vendor/family selector) -// rather than a simple id list. -const UNSUPPORTED_QUICK_PICK_PROVIDERS: ProviderName[] = [ - providerIdentifiers.openai, - providerIdentifiers.ollama, - providerIdentifiers.lmstudio, - providerIdentifiers.vscodeLm, -] - -function getModelIdField(provider: ProviderName): string | undefined { - return getProviderModelConfig(provider)?.field -} - -function useModelListForProvider(provider: ProviderName | undefined, apiConfiguration: ProviderSettings) { - const isStatic = provider ? isStaticModelProvider(provider) : false - const field = provider ? getModelIdField(provider) : undefined - const isUnsupported = !provider || !field || UNSUPPORTED_QUICK_PICK_PROVIDERS.includes(provider) - const isRouterProvider = !isStatic && !isUnsupported - // Friendli keeps a static list in MODELS_BY_PROVIDER, but it is only the fallback for the fetched catalog. - const fetchesStaticFallbackCatalog = provider === providerIdentifiers.friendli && !isUnsupported - - const routerModels = useRouterModels({ provider, enabled: isRouterProvider || fetchesStaticFallbackCatalog }) - const allRouterModels = routerModels.data - const routerModelsData = allRouterModels as Record> | undefined - const isLoading = isRouterProvider && routerModels.isLoading - - return React.useMemo(() => { - if (!provider || !field || isUnsupported) { - return { isUnsupported: true as const, field: undefined, models: null, isLoading: false } - } - - const models = isStatic - ? getStaticModelsForProvider(provider, undefined, apiConfiguration, allRouterModels) - : (routerModelsData?.[provider] ?? null) - - return { isUnsupported: false as const, field, models, isLoading } - }, [provider, field, isUnsupported, isStatic, apiConfiguration, allRouterModels, routerModelsData, isLoading]) -} - -interface ModelSelectorProps { - apiConfiguration: ProviderSettings - disabled?: boolean - title: string - triggerClassName?: string -} - -export const ModelSelector = ({ - apiConfiguration, - disabled = false, - title, - triggerClassName = "", -}: ModelSelectorProps) => { - const [open, setOpen] = React.useState(false) - const [searchValue, setSearchValue] = React.useState("") - const searchInputRef = React.useRef(null) - const portalContainer = useRooPortal("roo-portal") - const { t } = useAppTranslation() - const { organizationAllowList, currentApiConfigName } = useExtensionState() - - const providerRaw = apiConfiguration.apiProvider || providerIdentifiers.openrouter - const provider: ProviderName | undefined = isRetiredProvider(providerRaw) ? undefined : providerRaw - - const { id: selectedModelId, info: selectedModelInfo } = useSelectedModel(apiConfiguration) - const { isUnsupported, field, models, isLoading } = useModelListForProvider(provider, apiConfiguration) - - const filteredModelRecord = React.useMemo( - () => filterModels(models, provider, organizationAllowList), - [models, provider, organizationAllowList], - ) - - const modelIds = React.useMemo(() => { - if (!filteredModelRecord) return [] - return Object.entries(filteredModelRecord) - .filter(([id, info]) => { - if (id === selectedModelId) return true - // The host cannot set awsCustomArn, so picking this here would save a model id without an ARN. - if (id === BEDROCK_CUSTOM_ARN_MODEL_ID) return false - return !info.deprecated - }) - .map(([id]) => id) - .sort((a, b) => a.localeCompare(b)) - }, [filteredModelRecord, selectedModelId]) - - const searchableItems = React.useMemo( - () => - modelIds.map((id) => ({ - id, - searchStr: [id, filteredModelRecord?.[id]?.displayName].filter(Boolean).join(" "), - })), - [modelIds, filteredModelRecord], - ) - - const fzfInstance = React.useMemo( - () => new Fzf(searchableItems, { selector: (item) => item.searchStr }), - [searchableItems], - ) - - const filteredModelIds = React.useMemo(() => { - if (!searchValue) return modelIds - return fzfInstance.find(searchValue).map((result) => result.item.id) - }, [modelIds, searchValue, fzfInstance]) - - const triggerLabel = selectedModelInfo?.displayName ?? selectedModelId ?? "" - - const openSettings = React.useCallback(() => { - vscode.postMessage({ type: "switchTab", tab: "settings" }) - setOpen(false) - }, []) - - // The host merges this patch into the latest stored profile, so a stale - // snapshot cannot overwrite newer settings. `null` clears a key. - const handleModelChange = React.useCallback( - (modelIdField: string, modelId: string) => { - if (!provider) return - - const patch: Record = { [modelIdField]: modelId } - - handleModelChangeSideEffects(provider, modelId, (f, v) => { - // The host accepts only `null` to clear a key, but the shared helper clears Bedrock fields with "". - patch[f] = v === undefined || v === "" ? null : v - }) - - vscode.postMessage({ - type: "updateProfileModel", - text: currentApiConfigName, - values: { expectedProvider: provider, patch }, - }) - }, - [currentApiConfigName, provider], - ) - - const handleSelect = React.useCallback( - (modelId: string) => { - if (!field) return - if (modelId !== selectedModelId) handleModelChange(field, modelId) - setOpen(false) - setSearchValue("") - }, - [field, handleModelChange, selectedModelId], - ) - - const onClearSearch = React.useCallback(() => { - setSearchValue("") - searchInputRef.current?.focus() - }, []) - - const onOpenChange = React.useCallback((isOpen: boolean) => { - setOpen(isOpen) - if (!isOpen) setSearchValue("") - }, []) - - React.useEffect(() => { - if (open && searchInputRef.current) { - searchInputRef.current.focus() - } - }, [open]) - - const triggerClasses = cn( - "inline-flex items-center relative whitespace-nowrap px-1.5 py-1 text-xs", - selectorTriggerClassName, - disabled ? "opacity-50 cursor-not-allowed" : enabledSelectorTriggerClassName, - triggerClassName, - ) - - if (isUnsupported) { - return ( - - - - ) - } - - const showSearch = modelIds.length > SEARCH_THRESHOLD - - return ( - - - - {triggerLabel} - - - -
- {showSearch ? ( -
- setSearchValue(e.target.value)} - placeholder={t("chat:modelSelector.searchPlaceholder")} - className="w-full h-8 px-2 py-1 text-xs bg-vscode-input-background text-vscode-input-foreground border border-vscode-input-border rounded focus:outline-0" - data-testid="model-search-input" - /> - {searchValue.length > 0 && ( -
- -
- )} -
- ) : ( -
-

- {t("chat:modelSelector.description")} -

-
- )} - -
- {isLoading ? ( -
- {t("chat:modelSelector.loading")} -
- ) : filteredModelIds.length === 0 ? ( -
- {t("common:ui.no_results")} -
- ) : ( -
- {filteredModelIds.map((modelId) => { - const isSelected = modelId === selectedModelId - const modelInfo = filteredModelRecord?.[modelId] - return ( - - ) - })} -
- )} -
- -
-
- -
-
- {showSearch && ( - - - - )} -

- {t("chat:modelSelector.title")} -

-
-
-
-
-
- ) -} diff --git a/webview-ui/src/components/chat/PickerSearchField.tsx b/webview-ui/src/components/chat/PickerSearchField.tsx new file mode 100644 index 0000000000..f09a257721 --- /dev/null +++ b/webview-ui/src/components/chat/PickerSearchField.tsx @@ -0,0 +1,47 @@ +import { useRef } from "react" +import { Search, X } from "lucide-react" + +import { useAppTranslation } from "@src/i18n/TranslationContext" + +interface PickerSearchFieldProps { + label: string + value: string + onChange: (value: string) => void + disabled?: boolean +} + +/** Shared geometry and interactions for the profile and model views of the picker. */ +export function PickerSearchField({ label, value, onChange, disabled = false }: PickerSearchFieldProps) { + const { t } = useAppTranslation() + const inputRef = useRef(null) + return ( +
+
+
+
+ ) +} diff --git a/webview-ui/src/components/chat/ProfileQuickSettings.tsx b/webview-ui/src/components/chat/ProfileQuickSettings.tsx new file mode 100644 index 0000000000..4ce8fb3a48 --- /dev/null +++ b/webview-ui/src/components/chat/ProfileQuickSettings.tsx @@ -0,0 +1,58 @@ +import { useState } from "react" + +import { useExtensionState } from "@/context/ExtensionStateContext" +import { useSelectedModel } from "@/components/ui/hooks/useSelectedModel" +import { filterModels } from "@/components/settings/utils/organizationFilters" +import { PickerSearchField } from "./PickerSearchField" +import { useAppTranslation } from "@/i18n/TranslationContext" +import { vscode } from "@/utils/vscode" +import { createModelPatch, createReasoningPatch, getReasoningSelection, useProfileModelCatalog } from "./model-picker" +import { ModelResults } from "./model-picker/ModelResults" +import { ReasoningControls } from "./model-picker/ReasoningControls" +import { useModelPickerSubmit } from "./model-picker/useModelPickerSubmit" +import { handlePickerNavigation } from "./model-picker/pickerNavigation" + +/** Immediate, partial saves only; the host owns merging and publishing the resulting profile. */ +export function ProfileQuickSettings({ disabled = false }: { disabled?: boolean }) { + const { t } = useAppTranslation() + const { apiConfiguration, currentApiConfigName, organizationAllowList } = useExtensionState() + const { id: modelId, info } = useSelectedModel(apiConfiguration) + const catalog = useProfileModelCatalog(apiConfiguration) + const reasoning = getReasoningSelection(apiConfiguration, info) + const [search, setSearch] = useState("") + const submit = useModelPickerSubmit(currentApiConfigName, catalog.provider, disabled) + const models = filterModels(catalog.models, catalog.provider, organizationAllowList) + const canSelect = !disabled && !!currentApiConfigName && !!catalog.field && !catalog.isLoading && !catalog.isError + + return ( +
+ + vscode.postMessage({ type: "switchTab", tab: "settings" })} + onSelect={(id) => { + if (canSelect && id !== modelId) submit(createModelPatch(apiConfiguration, id)) + }} + /> + submit(createReasoningPatch(apiConfiguration, effort, info))} + /> +
+ ) +} diff --git a/webview-ui/src/components/chat/__tests__/ApiConfigSelector.spec.tsx b/webview-ui/src/components/chat/__tests__/ApiConfigSelector.spec.tsx index 420249b365..fd15b86af0 100644 --- a/webview-ui/src/components/chat/__tests__/ApiConfigSelector.spec.tsx +++ b/webview-ui/src/components/chat/__tests__/ApiConfigSelector.spec.tsx @@ -3,6 +3,7 @@ import { vscode } from "@/utils/vscode" import { providerIdentifiers } from "@roo-code/types" import { ApiConfigSelector } from "../ApiConfigSelector" +import type { ComponentProps, PropsWithChildren } from "react" // Mock the dependencies vi.mock("@/utils/vscode", () => ({ @@ -31,26 +32,33 @@ vi.mock("@/context/ExtensionStateContext", () => ({ }), })) -// Mock the getModelId function from @roo-code/types -vi.mock("@roo-code/types", () => ({ - getModelId: (config: any) => config?.apiModelId || undefined, -})) - // Mock Popover components to be testable vi.mock("@/components/ui", () => ({ - Popover: ({ children, open }: any) => ( + Popover: ({ + children, + open, + onOpenChange, + }: { + children: React.ReactNode + open: boolean + onOpenChange: (open: boolean) => void + }) => (
+ {children}
), - PopoverTrigger: ({ children, disabled, ...props }: any) => ( - ), - PopoverContent: ({ children }: any) =>
{children}
, - StandardTooltip: ({ children }: any) => <>{children}, - Button: ({ children, onClick, ...props }: any) => ( + PopoverAnchor: ({ children }: { children: React.ReactNode }) => <>{children}, + PopoverContent: ({ children }: PropsWithChildren) =>
{children}
, + StandardTooltip: ({ children }: PropsWithChildren) => <>{children}, + Button: ({ children, onClick, ...props }: ComponentProps<"button">) => ( @@ -89,6 +97,88 @@ describe("ApiConfigSelector", () => { expect(trigger).toHaveTextContent("Config 1") }) + test("shows models by default and temporarily replaces them with profiles", () => { + const { rerender } = render( + Model settings panel
} />, + ) + fireEvent.click(screen.getByTestId("toggle-popover")) + expect(screen.getByText("Model settings panel")).toBeInTheDocument() + expect(screen.queryByText("Config 2")).not.toBeInTheDocument() + fireEvent.click(screen.getByRole("button", { name: "chat:modelPicker.selectProfile" })) + expect(screen.queryByText("Model settings panel")).not.toBeInTheDocument() + fireEvent.mouseEnter(screen.getByText("Config 2")) + expect(mockOnChange).not.toHaveBeenCalled() + fireEvent.click(screen.getByText("Config 2")) + expect(mockOnChange).toHaveBeenCalledWith("config2") + expect(screen.getByText("chat:modelPicker.loadingProfile")).toBeInTheDocument() + expect(screen.getByTestId("popover-root")).toHaveAttribute("data-open", "true") + rerender( + New profile models
} + />, + ) + expect(screen.getByText("New profile models")).toBeInTheDocument() + expect(screen.queryByText("chat:modelPicker.loadingProfile")).not.toBeInTheDocument() + }) + + test("can return from profile selection without changing the active profile", () => { + render(Model settings panel
} />) + const header = screen.getByRole("button", { name: "chat:modelPicker.selectProfile" }) + fireEvent.click(header) + fireEvent.click(header) + expect(screen.getByText("Model settings panel")).toBeInTheDocument() + expect(mockOnChange).not.toHaveBeenCalled() + }) + + test("keeps the picker open after interacting with model settings", () => { + render(Choose model} />) + fireEvent.click(screen.getByTestId("toggle-popover")) + expect(screen.getByTestId("popover-root")).toHaveAttribute("data-open", "true") + fireEvent.click(screen.getByRole("button", { name: "Choose model" })) + expect(screen.getByTestId("popover-root")).toHaveAttribute("data-open", "true") + }) + + test("keeps profile search available for a short profile list in the combined picker", () => { + render(Model settings panel
} />) + fireEvent.click(screen.getByRole("button", { name: "chat:modelPicker.selectProfile" })) + const input = screen.getByRole("textbox") + expect(input.parentElement?.parentElement).toHaveClass("px-3", "py-2") + const focus = vi.fn() + input.focus = focus + fireEvent.change(input, { target: { value: "Config 2" } }) + fireEvent.click(screen.getByRole("button", { name: "chat:modelPicker.clearSearch" })) + expect(input).toHaveValue("") + expect(focus).toHaveBeenCalled() + }) + + test("shows profile / model and the reasoning badge on the existing trigger", () => { + render() + const trigger = screen.getByTestId("dropdown-trigger") + expect(trigger).toHaveTextContent("Config 1 / gpt-6.1-sol") + expect(trigger.querySelector('[aria-label="chat:modelPicker.reasoningEffortValue"]')).toHaveTextContent( + "chat:modelPicker.effort.high", + ) + fireEvent.click(screen.getByText("Config 2")) + expect(mockOnChange).toHaveBeenCalledWith("config2") + }) + + test.each([undefined, "disable"])("hides the badge when effort is %s", (reasoningEffort) => { + render() + expect( + screen + .getByTestId("dropdown-trigger") + .querySelector('[aria-label="chat:modelPicker.reasoningEffortValue"]'), + ).toBeNull() + }) + + test("keeps none visible as a valid reasoning effort", () => { + render() + expect(screen.getByLabelText("chat:modelPicker.reasoningEffortValue")).toBeInTheDocument() + }) + test("handles disabled state correctly", () => { render() @@ -429,8 +519,8 @@ describe("ApiConfigSelector", () => { fireEvent.change(searchInput, { target: { value: "Config" } }) // Pin a config - const config2Row = screen.getByText("Config 2").closest("div") - const pinButton = config2Row?.querySelector("button") + const config2Row = screen.getByText("Config 2").closest("button")?.parentElement + const pinButton = config2Row?.querySelector('button[aria-label="chat:pin"]') if (pinButton) { fireEvent.click(pinButton) } @@ -464,8 +554,8 @@ describe("ApiConfigSelector", () => { const popoverContent = screen.getByTestId("popover-content") - // Should have a single scroll container with max-h-[300px] and overflow-y-auto - const scrollContainer = popoverContent.querySelector(".max-h-\\[300px\\].overflow-y-auto") + // Results keep a fixed height regardless of result count. + const scrollContainer = popoverContent.querySelector(".h-\\[300px\\].overflow-y-auto") expect(scrollContainer).toBeInTheDocument() // Check for pinned configs sticky header @@ -518,8 +608,8 @@ describe("ApiConfigSelector", () => { const popoverContent = screen.getByTestId("popover-content") - // Should have a single scroll container with max-h-[300px] and overflow-y-auto - const scrollContainer = popoverContent.querySelector(".max-h-\\[300px\\].overflow-y-auto") + // Results keep a fixed height regardless of result count. + const scrollContainer = popoverContent.querySelector(".h-\\[300px\\].overflow-y-auto") expect(scrollContainer).toBeInTheDocument() // No pinned section should exist when no configs are pinned diff --git a/webview-ui/src/components/chat/__tests__/ChatTextArea.modelPicker.spec.tsx b/webview-ui/src/components/chat/__tests__/ChatTextArea.modelPicker.spec.tsx new file mode 100644 index 0000000000..5047efcc7b --- /dev/null +++ b/webview-ui/src/components/chat/__tests__/ChatTextArea.modelPicker.spec.tsx @@ -0,0 +1,104 @@ +import { providerIdentifiers, type ModelInfo, type ProviderSettings } from "@roo-code/types" + +import { renderWithExtensionState, screen } from "@/utils/test-utils" +import { defaultModeSlug } from "@roo/modes" +import { ChatTextArea } from "../ChatTextArea" + +const mocks = vi.hoisted(() => ({ info: undefined as ModelInfo | undefined })) +vi.mock("@/utils/vscode", () => ({ vscode: { postMessage: vi.fn() } })) +vi.mock("@/components/ui/hooks/useSelectedModel", () => ({ + useSelectedModel: () => ({ id: "chosen-model", info: mocks.info }), +})) + +describe("unified chat model trigger", () => { + const renderTrigger = (apiConfiguration: ProviderSettings) => + renderWithExtensionState( + , + { + state: { + apiConfiguration, + currentApiConfigName: "Work", + listApiConfigMeta: [{ id: "work", name: "Work" }], + }, + }, + ) + + it.each([ + { + name: "required default", + config: { apiProvider: providerIdentifiers.openaiNative }, + info: { requiredReasoningEffort: true, supportsReasoningEffort: ["low", "high"], reasoningEffort: "high" }, + effort: "high", + }, + { + name: "explicit disable", + config: { + apiProvider: providerIdentifiers.openaiNative, + enableReasoningEffort: false, + reasoningEffort: "high", + }, + info: { supportsReasoningEffort: true }, + effort: undefined, + }, + { + name: "unsupported stale effort", + config: { apiProvider: providerIdentifiers.openaiNative, reasoningEffort: "high" }, + info: {}, + effort: undefined, + }, + { + name: "OpenAI nested effort", + config: { + apiProvider: providerIdentifiers.openai, + enableReasoningEffort: true, + reasoningEffort: "low", + openAiCustomModelInfo: { contextWindow: 128000, supportsPromptCache: false, reasoningEffort: "xhigh" }, + }, + info: {}, + effort: "xhigh", + }, + { + name: "OpenAI unset enable", + config: { + apiProvider: providerIdentifiers.openai, + openAiCustomModelInfo: { contextWindow: 128000, supportsPromptCache: false, reasoningEffort: "high" }, + }, + info: {}, + effort: undefined, + }, + { + name: "enabled none", + config: { apiProvider: providerIdentifiers.openaiNative, reasoningEffort: "none" }, + info: { supportsReasoningEffort: ["none", "high"] }, + effort: "none", + }, + ] satisfies Array<{ + name: string + config: ProviderSettings + info: Partial + effort: string | undefined + }>)("shows effective badge semantics for $name without a second model picker", ({ config, info, effort }) => { + mocks.info = { contextWindow: 128000, supportsPromptCache: false, ...info } + renderTrigger(config) + const trigger = screen.getByTestId("dropdown-trigger") + expect(trigger).toHaveTextContent("Work / chosen-model") + expect(screen.queryByTestId("model-selector-trigger")).not.toBeInTheDocument() + const badge = trigger.querySelector('[aria-label="chat:modelPicker.reasoningEffortValue"]') + if (effort) expect(badge).toHaveTextContent(`chat:modelPicker.effort.${effort}`) + else expect(badge).toBeNull() + }) +}) diff --git a/webview-ui/src/components/chat/__tests__/ModelPicker.integration.spec.tsx b/webview-ui/src/components/chat/__tests__/ModelPicker.integration.spec.tsx new file mode 100644 index 0000000000..df98438b06 --- /dev/null +++ b/webview-ui/src/components/chat/__tests__/ModelPicker.integration.spec.tsx @@ -0,0 +1,135 @@ +import userEvent from "@testing-library/user-event" +import { render, screen, within, waitFor } from "@/utils/test-utils" +import { providerIdentifiers, type ProviderSettings } from "@roo-code/types" + +import { ApiConfigSelector } from "../ApiConfigSelector" +import { ProfileQuickSettings } from "../ProfileQuickSettings" +import { setupNativePickerFocus } from "./pickerTestFocus" + +setupNativePickerFocus() + +const mocks = vi.hoisted(() => ({ + postMessage: vi.fn(), + configuration: {} as ProviderSettings, + profileName: "Work", +})) + +vi.mock("@/utils/vscode", () => ({ vscode: { postMessage: mocks.postMessage } })) +vi.mock("@/components/ui/hooks/useRooPortal", () => ({ useRooPortal: () => document.body })) +vi.mock("@/context/ExtensionStateContext", () => ({ + useExtensionState: () => ({ apiConfiguration: mocks.configuration, currentApiConfigName: mocks.profileName }), +})) +vi.mock("@/components/ui/hooks/useSelectedModel", () => ({ + useSelectedModel: () => ({ + id: "model-a", + info: { + contextWindow: 1000, + supportsPromptCache: false, + supportsReasoningEffort: ["low", "high"], + requiredReasoningEffort: true, + }, + }), +})) +vi.mock("../model-picker/useProfileModelCatalog", () => ({ + useProfileModelCatalog: () => ({ + provider: providerIdentifiers.openaiNative, + field: "apiModelId", + models: { "model-a": {}, "model-b": {} }, + isLoading: false, + isError: false, + isUnsupported: false, + refetch: vi.fn(), + }), +})) + +describe("production model picker popover", () => { + const props = { + value: "work", + displayName: "Work", + modelId: "model-a", + reasoningEffort: "high", + title: "Choose profile and model", + listApiConfigMeta: [ + { id: "work", name: "Work" }, + { id: "personal", name: "Personal" }, + ], + onChange: vi.fn(), + togglePinnedApiConfig: vi.fn(), + lockApiConfigAcrossModes: false, + onToggleLockApiConfig: vi.fn(), + } + beforeEach(() => { + vi.clearAllMocks() + mocks.profileName = "Work" + mocks.configuration = { apiProvider: providerIdentifiers.openaiNative, apiModelId: "model-a" } + }) + + it("keeps open for model and effort selection, then dismisses on outside click", async () => { + const user = userEvent.setup() + render( + <> + + } /> + , + ) + await user.click(screen.getByTestId("dropdown-trigger")) + const dialog = screen.getByRole("dialog") + expect(dialog).toHaveClass("max-h-[var(--radix-popover-content-available-height)]", "flex", "overflow-hidden") + await user.click(within(dialog).getByRole("button", { name: "model-b" })) + expect(screen.getByRole("dialog")).toBeInTheDocument() + expect(mocks.postMessage).toHaveBeenLastCalledWith( + expect.objectContaining({ type: "updateProfileModel", text: "Work" }), + ) + await user.click(within(dialog).getByRole("button", { name: "chat:modelPicker.effort.low" })) + expect(screen.getByRole("dialog")).toBeInTheDocument() + expect(mocks.postMessage).toHaveBeenLastCalledWith({ + type: "updateProfileModel", + text: "Work", + values: { + expectedProvider: providerIdentifiers.openaiNative, + patch: { reasoningEffort: "low", enableReasoningEffort: true }, + }, + }) + await user.click(screen.getByRole("button", { name: "Outside" })) + await waitFor(() => expect(screen.queryByRole("dialog")).not.toBeInTheDocument()) + }) + + it("waits for the requested active profile id before mounting new model controls", async () => { + const user = userEvent.setup() + const { rerender } = render(} />) + await user.click(screen.getByTestId("dropdown-trigger")) + await user.click(screen.getByRole("button", { name: "chat:modelPicker.selectProfile" })) + const profiles = screen.getByRole("button", { name: "Personal" }).closest(".h-\\[300px\\]") + expect(profiles).toHaveClass("h-[300px]", "shrink-0", "overflow-y-auto") + await user.type(screen.getByRole("textbox"), "zzzzz") + expect(screen.getByText("common:ui.no_results").parentElement).toHaveClass("h-[300px]") + await user.click(screen.getByRole("button", { name: "chat:modelPicker.clearSearch" })) + await user.keyboard("{ArrowDown}{End}{Enter}") + expect(props.onChange).toHaveBeenCalledWith("personal") + expect(screen.getByRole("dialog")).toBeInTheDocument() + expect(screen.getByRole("status")).toHaveClass("h-[300px]", "shrink-0", "overflow-y-auto") + expect(screen.queryByRole("button", { name: "model-b" })).not.toBeInTheDocument() + // An unrelated active id must not release the stale pane. + rerender(} />) + expect(screen.queryByRole("button", { name: "model-b" })).not.toBeInTheDocument() + await user.keyboard("{Escape}") + await user.click(screen.getByTestId("dropdown-trigger")) + expect(screen.queryByRole("button", { name: "model-b" })).not.toBeInTheDocument() + mocks.profileName = "Personal" + rerender( + } + />, + ) + await user.click(screen.getByRole("button", { name: "model-b" })) + expect(mocks.postMessage).toHaveBeenLastCalledWith( + expect.objectContaining({ text: "Personal", type: "updateProfileModel" }), + ) + expect(screen.getByRole("dialog")).toBeInTheDocument() + await user.keyboard("{Escape}") + expect(screen.queryByRole("dialog")).not.toBeInTheDocument() + }) +}) diff --git a/webview-ui/src/components/chat/__tests__/ModelSelector.spec.tsx b/webview-ui/src/components/chat/__tests__/ModelSelector.spec.tsx deleted file mode 100644 index 5632ccfa0f..0000000000 --- a/webview-ui/src/components/chat/__tests__/ModelSelector.spec.tsx +++ /dev/null @@ -1,452 +0,0 @@ -import { render, screen, fireEvent } from "@/utils/test-utils" - -import { friendliModels, providerIdentifiers, type ProviderSettings } from "@roo-code/types" - -import { ModelSelector } from "../ModelSelector" - -vi.mock("@/utils/vscode", () => ({ - vscode: { - postMessage: vi.fn(), - }, -})) - -const extensionState = vi.hoisted(() => ({ - organizationAllowList: { allowAll: true, providers: {} } as Record, - currentApiConfigName: "default", -})) - -vi.mock("@/context/ExtensionStateContext", () => ({ - useExtensionState: () => extensionState, -})) - -vi.mock("@/i18n/TranslationContext", () => ({ - useAppTranslation: () => ({ - t: (key: string) => key, - }), -})) - -vi.mock("@/components/ui/hooks/useRooPortal", () => ({ - useRooPortal: () => document.body, -})) - -const routerModelsResult = vi.hoisted(() => ({ - value: { data: undefined, isLoading: false } as { data: unknown; isLoading: boolean }, - calls: [] as unknown[], -})) - -vi.mock("@/components/ui/hooks/useRouterModels", () => ({ - useRouterModels: (opts: unknown) => { - routerModelsResult.calls.push(opts) - return routerModelsResult.value - }, -})) - -const staticModelsOverride = vi.hoisted(() => ({ value: undefined as Record | undefined })) - -vi.mock("@/components/settings/utils/providerModelConfig", async (importOriginal) => { - const actual = await importOriginal() - return { - ...actual, - getStaticModelsForProvider: (...args: Parameters) => - staticModelsOverride.value ?? actual.getStaticModelsForProvider(...args), - } -}) - -const selectedModelOverride = vi.hoisted(() => ({ - value: undefined as { id: string; info?: { displayName?: string } } | undefined, -})) - -vi.mock("@/components/ui/hooks/useSelectedModel", async (importOriginal) => { - const actual = await importOriginal() - return { - ...actual, - useSelectedModel: (...args: Parameters) => - selectedModelOverride.value ?? actual.useSelectedModel(...args), - } -}) - -import { vscode } from "@/utils/vscode" - -const base = { contextWindow: 1000, supportsPromptCache: false } - -describe("ModelSelector", () => { - const anthropicConfig: ProviderSettings = { - apiProvider: providerIdentifiers.anthropic, - apiModelId: "claude-sonnet-4-5", - } - - beforeEach(() => { - vi.clearAllMocks() - staticModelsOverride.value = undefined - selectedModelOverride.value = undefined - routerModelsResult.value = { data: undefined, isLoading: false } - routerModelsResult.calls = [] - extensionState.organizationAllowList = { allowAll: true, providers: {} } - }) - - test("shows the currently selected model on the trigger for a static-model provider", () => { - render() - - expect(screen.getByTestId("model-selector-trigger")).toHaveTextContent("claude-sonnet-4-5") - }) - - test("disables the trigger when disabled", () => { - render() - - expect(screen.getByTestId("model-selector-trigger")).toBeDisabled() - }) - - test("shows a search bar since anthropic has more than 6 models and filters the list", () => { - render() - - fireEvent.click(screen.getByTestId("model-selector-trigger")) - - expect(screen.getByTestId("model-search-input")).toBeInTheDocument() - const allItems = screen.getAllByTestId("model-selector-item") - expect(allItems.length).toBeGreaterThan(6) - - fireEvent.change(screen.getByTestId("model-search-input"), { target: { value: "claude-opus-4-6" } }) - - const filteredItems = screen.getAllByTestId("model-selector-item") - expect(filteredItems.length).toBeLessThan(allItems.length) - }) - - test("shows the description instead of a search bar when there are 6 or fewer models", () => { - staticModelsOverride.value = { "model-a": base, "model-b": base } - - render() - fireEvent.click(screen.getByTestId("model-selector-trigger")) - - expect(screen.queryByTestId("model-search-input")).not.toBeInTheDocument() - expect(screen.getByText("chat:modelSelector.description")).toBeInTheDocument() - expect(screen.getAllByTestId("model-selector-item")).toHaveLength(2) - }) - - test("selecting a model patches the latest profile via updateProfileModel and closes the popover", () => { - render() - - fireEvent.click(screen.getByTestId("model-selector-trigger")) - fireEvent.change(screen.getByTestId("model-search-input"), { target: { value: "claude-opus-4-6" } }) - - fireEvent.click(screen.getAllByTestId("model-selector-item")[0]) - - expect(vscode.postMessage).toHaveBeenCalledWith({ - type: "updateProfileModel", - text: "default", - values: { - expectedProvider: providerIdentifiers.anthropic, - patch: expect.objectContaining({ - apiModelId: "claude-opus-4-6", - reasoningEffort: null, - modelMaxTokens: null, - modelMaxThinkingTokens: null, - }), - }, - }) - expect(screen.queryByTestId("model-search-input")).not.toBeInTheDocument() - }) - - test("selecting a Bedrock model clears the ARN fields with null, never an empty string", () => { - staticModelsOverride.value = { "model-a": base, "model-b": base } - const bedrockConfig: ProviderSettings = { - apiProvider: providerIdentifiers.bedrock, - apiModelId: "model-a", - awsCustomArn: "arn:aws:bedrock:us-east-1:123456789012:inference-profile/old", - } - render() - - fireEvent.click(screen.getByTestId("model-selector-trigger")) - fireEvent.click(screen.getAllByTestId("model-selector-item")[1]) - - const [message] = vi.mocked(vscode.postMessage).mock.calls[0] - const patch: Record = message.values?.patch ?? {} - expect(patch).toMatchObject({ - apiModelId: "model-b", - awsCustomArn: null, - awsCustomArnBaseModelId: null, - awsModelContextWindow: null, - }) - expect(Object.values(patch)).not.toContain("") - }) - - describe("display names", () => { - const named = { - "model-a": { ...base, displayName: "Alpha Fast" }, - "model-b": { ...base, displayName: "Beta Deep" }, - } - - test("shows the selected model's display name instead of its id on the trigger", () => { - selectedModelOverride.value = { id: "model-a", info: { displayName: "Alpha Fast" } } - - render() - - const trigger = screen.getByTestId("model-selector-trigger") - expect(trigger).toHaveTextContent("Alpha Fast") - expect(trigger).not.toHaveTextContent("model-a") - }) - - test("lists display names and finds a model by searching its display name", () => { - staticModelsOverride.value = { - ...named, - "model-c": { ...base, displayName: "Gamma" }, - "model-d": { ...base, displayName: "Delta" }, - "model-e": { ...base, displayName: "Epsilon" }, - "model-f": { ...base, displayName: "Zeta" }, - "model-g": { ...base, displayName: "Eta" }, - } - - render( - , - ) - fireEvent.click(screen.getByTestId("model-selector-trigger")) - expect(screen.getByText("Beta Deep")).toBeInTheDocument() - - fireEvent.change(screen.getByTestId("model-search-input"), { target: { value: "Beta Deep" } }) - - const items = screen.getAllByTestId("model-selector-item") - expect(items).toHaveLength(1) - expect(items[0]).toHaveTextContent("Beta Deep") - - fireEvent.click(items[0]) - expect(vi.mocked(vscode.postMessage).mock.calls[0][0].values?.patch).toMatchObject({ - apiModelId: "model-b", - }) - }) - }) - - test("hides the Bedrock custom-arn pseudo-model unless it is already selected", () => { - staticModelsOverride.value = { "model-a": base, "custom-arn": base } - const bedrockConfig: ProviderSettings = { apiProvider: providerIdentifiers.bedrock, apiModelId: "model-a" } - const { unmount } = render() - - fireEvent.click(screen.getByTestId("model-selector-trigger")) - expect(screen.getAllByTestId("model-selector-item")).toHaveLength(1) - expect(screen.queryByText("custom-arn")).not.toBeInTheDocument() - unmount() - - render( - , - ) - fireEvent.click(screen.getByTestId("model-selector-trigger")) - expect(screen.getAllByTestId("model-selector-item")).toHaveLength(2) - }) - - test("model items are real buttons so keyboard users can select them", () => { - staticModelsOverride.value = { "model-a": base, "model-b": base } - - render() - fireEvent.click(screen.getByTestId("model-selector-trigger")) - - for (const item of screen.getAllByTestId("model-selector-item")) { - expect(item.tagName).toBe("BUTTON") - } - }) - - test("re-selecting the active model does not post a config update", () => { - render() - - fireEvent.click(screen.getByTestId("model-selector-trigger")) - fireEvent.change(screen.getByTestId("model-search-input"), { target: { value: "claude-sonnet-4-5" } }) - const items = screen.getAllByTestId("model-selector-item") - const active = items.find((el) => el.querySelector(".lucide-check"))! - fireEvent.click(active) - - expect(vscode.postMessage).not.toHaveBeenCalled() - expect(screen.queryByTestId("model-search-input")).not.toBeInTheDocument() - }) - - test("hides deprecated models except the currently selected one", () => { - staticModelsOverride.value = { - "model-active": { ...base, deprecated: true }, - "model-old": { ...base, deprecated: true }, - "model-new": base, - } - - render( - , - ) - - fireEvent.click(screen.getByTestId("model-selector-trigger")) - - const labels = screen.getAllByTestId("model-selector-item").map((el) => el.textContent) - expect(labels).toEqual(["model-active", "model-new"]) - }) - - test("hides models excluded by the organization allow-list", () => { - staticModelsOverride.value = { "model-a": base, "model-b": base, "model-c": base } - extensionState.organizationAllowList = { - allowAll: false, - providers: { [providerIdentifiers.anthropic]: { allowAll: false, models: ["model-a", "model-c"] } }, - } - - render( - , - ) - fireEvent.click(screen.getByTestId("model-selector-trigger")) - - const labels = screen.getAllByTestId("model-selector-item").map((el) => el.textContent) - expect(labels).toEqual(["model-a", "model-c"]) - }) - - describe("dynamic-model providers", () => { - const openRouterConfig: ProviderSettings = { - apiProvider: providerIdentifiers.openrouter, - openRouterModelId: "vendor/model-one", - } - - test("lists router models and selects through openRouterModelId", () => { - routerModelsResult.value = { - isLoading: false, - data: { openrouter: { "vendor/model-one": base, "vendor/model-two": base } }, - } - - render() - fireEvent.click(screen.getByTestId("model-selector-trigger")) - - const items = screen.getAllByTestId("model-selector-item") - expect(items.map((el) => el.textContent)).toEqual(["vendor/model-one", "vendor/model-two"]) - - fireEvent.click(items[1]) - - expect(vscode.postMessage).toHaveBeenCalledWith({ - type: "updateProfileModel", - text: "default", - values: { - expectedProvider: providerIdentifiers.openrouter, - patch: expect.objectContaining({ openRouterModelId: "vendor/model-two" }), - }, - }) - }) - - test("shows a loading state, not 'no results', while router models load", () => { - routerModelsResult.value = { data: undefined, isLoading: true } - - render() - fireEvent.click(screen.getByTestId("model-selector-trigger")) - - expect(screen.getByText("chat:modelSelector.loading")).toBeInTheDocument() - expect(screen.queryByText("common:ui.no_results")).not.toBeInTheDocument() - }) - - test("shows 'no results' when the router returns no models", () => { - routerModelsResult.value = { data: { openrouter: {} }, isLoading: false } - - render() - fireEvent.click(screen.getByTestId("model-selector-trigger")) - - expect(screen.getByText("common:ui.no_results")).toBeInTheDocument() - expect(screen.queryByText("chat:modelSelector.loading")).not.toBeInTheDocument() - }) - - test("shows 'no results' when the router request failed", () => { - routerModelsResult.value = { data: undefined, isLoading: false } - - render() - fireEvent.click(screen.getByTestId("model-selector-trigger")) - - expect(screen.getByText("common:ui.no_results")).toBeInTheDocument() - }) - - test("does not request router models for providers without a model field", () => { - render( - , - ) - - expect(routerModelsResult.calls.length).toBeGreaterThan(0) - expect(routerModelsResult.calls.every((opts) => (opts as { enabled: boolean }).enabled === false)).toBe( - true, - ) - expect(screen.getByTestId("model-selector-unsupported-trigger")).toBeInTheDocument() - }) - }) - - describe("Friendli (fetched catalog with a static fallback)", () => { - const friendliConfig: ProviderSettings = { - apiProvider: providerIdentifiers.friendli, - apiModelId: "zai-org/GLM-5.2", - } - const staticIds = Object.keys(friendliModels).sort((a, b) => a.localeCompare(b)) - - const openPicker = () => { - render() - fireEvent.click(screen.getByTestId("model-selector-trigger")) - return screen.getAllByTestId("model-selector-item").map((el) => el.textContent) - } - - test("requests the Friendli catalog", () => { - openPicker() - - // useSelectedModel also calls useRouterModels, so require every Friendli call (incl. the picker's) to be enabled. - const friendliCalls = routerModelsResult.calls.filter( - (opts) => (opts as { provider?: string }).provider === providerIdentifiers.friendli, - ) - expect(friendliCalls.length).toBeGreaterThan(0) - expect(friendliCalls.every((opts) => (opts as { enabled: boolean }).enabled)).toBe(true) - }) - - test("lists the fetched catalog, including models missing from the static list", () => { - routerModelsResult.value = { - isLoading: false, - data: { friendli: { "zai-org/GLM-5.2": base, "zai-org/GLM-5.3": base } }, - } - - expect(openPicker()).toEqual(["zai-org/GLM-5.2", "zai-org/GLM-5.3"]) - }) - - test.each([ - ["while loading", { data: undefined, isLoading: true }], - ["after a failed request", { data: undefined, isLoading: false }], - ["when the catalog is empty", { data: { friendli: {} }, isLoading: false }], - ])("falls back to the static list %s", (_label, result) => { - routerModelsResult.value = result - - expect(openPicker()).toEqual(staticIds) - expect(screen.queryByText("chat:modelSelector.loading")).not.toBeInTheDocument() - }) - - test("replaces the static list with the fetched catalog in the same mounted picker", () => { - const listed = () => screen.getAllByTestId("model-selector-item").map((el) => el.textContent) - const { rerender } = render() - fireEvent.click(screen.getByTestId("model-selector-trigger")) - expect(listed()).toEqual(staticIds) - - routerModelsResult.value = { - isLoading: false, - data: { friendli: { "zai-org/GLM-5.3": base, "vendor/fetched-only": base } }, - } - rerender() - - expect(listed()).toEqual(["vendor/fetched-only", "zai-org/GLM-5.3"]) - }) - }) - - test("falls back to a degraded trigger for providers without a simple model list, and jumps to Settings on click", () => { - render( - , - ) - - expect(screen.queryByTestId("model-selector-trigger")).not.toBeInTheDocument() - const unsupportedTrigger = screen.getByTestId("model-selector-unsupported-trigger") - expect(unsupportedTrigger).toBeInTheDocument() - - fireEvent.click(unsupportedTrigger) - - expect(vscode.postMessage).toHaveBeenCalledWith({ type: "switchTab", tab: "settings" }) - }) -}) diff --git a/webview-ui/src/components/chat/__tests__/PickerSearchField.spec.tsx b/webview-ui/src/components/chat/__tests__/PickerSearchField.spec.tsx new file mode 100644 index 0000000000..1c7fd122fa --- /dev/null +++ b/webview-ui/src/components/chat/__tests__/PickerSearchField.spec.tsx @@ -0,0 +1,42 @@ +import { useState } from "react" +import { fireEvent, render, screen } from "@testing-library/react" + +import { PickerSearchField } from "../PickerSearchField" + +function SearchFixture() { + const [value, setValue] = useState("") + return +} + +describe("PickerSearchField", () => { + it("uses shared spacing, placeholder and focus treatment", () => { + render() + const input = screen.getByRole("textbox", { name: "Search models" }) + expect(input).toHaveAttribute("placeholder", "common:ui.search_placeholder") + expect(input).toHaveClass("h-8") + expect(input.parentElement).toHaveClass("focus-within:ring-1") + expect(input.parentElement?.parentElement).toHaveClass("px-3", "py-2", "border-b") + }) + + it("clears the query and returns focus to the input", () => { + render() + const input = screen.getByRole("textbox") + // The shared test setup replaces native focus with a no-op for FAST compatibility. + const focus = vi.fn() + input.focus = focus + expect(screen.queryByRole("button", { name: "chat:modelPicker.clearSearch" })).not.toBeInTheDocument() + fireEvent.change(input, { target: { value: "query" } }) + fireEvent.click(screen.getByRole("button", { name: "chat:modelPicker.clearSearch" })) + expect(input).toHaveValue("") + expect(focus).toHaveBeenCalled() + }) + + it("disables both the input and clear button", () => { + const onChange = vi.fn() + render() + expect(screen.getByRole("textbox")).toBeDisabled() + expect(screen.getByRole("button", { name: "chat:modelPicker.clearSearch" })).toBeDisabled() + fireEvent.click(screen.getByRole("button", { name: "chat:modelPicker.clearSearch" })) + expect(onChange).not.toHaveBeenCalled() + }) +}) diff --git a/webview-ui/src/components/chat/__tests__/ProfileQuickSettings.spec.tsx b/webview-ui/src/components/chat/__tests__/ProfileQuickSettings.spec.tsx new file mode 100644 index 0000000000..d1d3d03a6d --- /dev/null +++ b/webview-ui/src/components/chat/__tests__/ProfileQuickSettings.spec.tsx @@ -0,0 +1,235 @@ +import { screen, render } from "@/utils/test-utils" +import userEvent from "@testing-library/user-event" +import { type ModelInfo, type ProviderSettings, type OrganizationAllowList, providerIdentifiers } from "@roo-code/types" + +import { ProfileQuickSettings } from "../ProfileQuickSettings" +import type { ProfileModelCatalog } from "../model-picker" +import { setupNativePickerFocus } from "./pickerTestFocus" + +setupNativePickerFocus() + +const mocks = vi.hoisted(() => ({ + configuration: {} as ProviderSettings, + info: {} as ModelInfo, + catalog: {} as ProfileModelCatalog, + allowList: undefined as OrganizationAllowList | undefined, + profileName: "Work", + postMessage: vi.fn(), + setApiConfiguration: vi.fn(), + refetch: vi.fn(), +})) + +vi.mock("@/utils/vscode", () => ({ vscode: { postMessage: mocks.postMessage } })) +vi.mock("@/context/ExtensionStateContext", () => ({ + useExtensionState: () => ({ + apiConfiguration: mocks.configuration, + currentApiConfigName: mocks.profileName, + setApiConfiguration: mocks.setApiConfiguration, + organizationAllowList: mocks.allowList, + }), +})) +vi.mock("@/components/ui/hooks/useSelectedModel", () => ({ + useSelectedModel: () => ({ + id: mocks.configuration.apiModelId ?? mocks.configuration.openAiModelId, + info: mocks.info, + }), +})) +vi.mock("../model-picker/useProfileModelCatalog", () => ({ useProfileModelCatalog: () => mocks.catalog })) + +describe("ProfileQuickSettings", () => { + beforeEach(() => { + vi.clearAllMocks() + mocks.profileName = "Work" + mocks.allowList = undefined + mocks.configuration = { + apiProvider: providerIdentifiers.openaiNative, + apiModelId: "model-a", + apiKey: "keep-secret", + } + mocks.info = { + contextWindow: 128000, + supportsPromptCache: false, + supportsReasoningEffort: ["low", "high"], + requiredReasoningEffort: true, + reasoningEffort: "high", + } + mocks.catalog = { + provider: providerIdentifiers.openaiNative, + field: "apiModelId", + models: { "model-a": mocks.info, "model-b": { ...mocks.info, displayName: "Friendly Beta" } }, + isLoading: false, + isError: false, + isUnsupported: false, + fallbackMessage: undefined, + refetch: mocks.refetch, + } + }) + + it("does not save on mount; fuzzy searches display names and clears without changing geometry", async () => { + const user = userEvent.setup() + render() + expect(mocks.postMessage).not.toHaveBeenCalled() + const results = screen.getByRole("group", { name: "chat:modelPicker.providerModels" }) + expect(results).toHaveClass("h-[300px]", "shrink-0", "overflow-y-auto") + await user.type(screen.getByRole("textbox"), "FrBt") + expect(screen.getByRole("button", { name: "Friendly Beta" })).toBeInTheDocument() + expect(screen.queryByRole("button", { name: "model-a" })).not.toBeInTheDocument() + await user.clear(screen.getByRole("textbox")) + await user.type(screen.getByRole("textbox"), "zzzzzz") + expect(screen.getByText("common:ui.no_results")).toBeInTheDocument() + expect(results).toHaveClass("h-[300px]") + await user.click(screen.getByRole("button", { name: "chat:modelPicker.clearSearch" })) + expect(screen.getByRole("textbox")).toHaveFocus() + expect(screen.getByRole("button", { name: "model-a" })).toBeInTheDocument() + }) + + it("sends independent model and effort patches, never snapshots or optimistic state", async () => { + const user = userEvent.setup() + render() + await user.click(screen.getByRole("button", { name: "Friendly Beta" })) + expect(mocks.postMessage).toHaveBeenLastCalledWith({ + type: "updateProfileModel", + text: "Work", + values: { + expectedProvider: providerIdentifiers.openaiNative, + patch: { + apiModelId: "model-b", + enableReasoningEffort: null, + reasoningEffort: null, + modelMaxTokens: null, + modelMaxThinkingTokens: null, + }, + }, + }) + await user.click(screen.getByRole("button", { name: "chat:modelPicker.effort.low" })) + expect(mocks.postMessage).toHaveBeenLastCalledWith({ + type: "updateProfileModel", + text: "Work", + values: { + expectedProvider: providerIdentifiers.openaiNative, + patch: { reasoningEffort: "low", enableReasoningEffort: true }, + }, + }) + expect(mocks.setApiConfiguration).not.toHaveBeenCalled() + expect(screen.queryByRole("button", { name: "chat:modelPicker.off" })).not.toBeInTheDocument() + }) + + it("does not reset reasoning when the already selected model is clicked", async () => { + const user = userEvent.setup() + render() + await user.click(screen.getByRole("button", { name: "model-a" })) + expect(mocks.postMessage).not.toHaveBeenCalled() + expect(screen.getByRole("textbox")).toBeInTheDocument() + }) + + it("selects via keyboard from search and keeps the controls mounted", async () => { + const user = userEvent.setup() + render() + await user.click(screen.getByRole("textbox")) + await user.keyboard("{ArrowDown}{End}{Enter}") + expect(screen.getByRole("button", { name: "Friendly Beta" })).toHaveFocus() + expect(mocks.postMessage).toHaveBeenCalledWith(expect.objectContaining({ type: "updateProfileModel" })) + expect(screen.getByRole("textbox")).toBeInTheDocument() + }) + + it("applies organization restrictions and hides deprecated models except the selected one", () => { + mocks.catalog.models = { + ...mocks.catalog.models, + "model-a": { ...mocks.info, deprecated: true }, + retired: { ...mocks.info, deprecated: true }, + forbidden: mocks.info, + } + mocks.allowList = { + allowAll: false, + providers: { + [providerIdentifiers.openaiNative]: { allowAll: false, models: ["model-a", "model-b", "retired"] }, + }, + } + render() + expect(screen.getByRole("button", { name: "model-a" })).toBeInTheDocument() + expect(screen.queryByRole("button", { name: "retired" })).not.toBeInTheDocument() + expect(screen.queryByRole("button", { name: "forbidden" })).not.toBeInTheDocument() + }) + + it.each([false, true])("allows Bedrock custom-arn only when configured (%s)", (configured) => { + mocks.configuration = { + apiProvider: providerIdentifiers.bedrock, + apiModelId: "model-a", + awsCustomArn: configured ? "arn:configured" : undefined, + } + mocks.catalog = { + ...mocks.catalog, + provider: providerIdentifiers.bedrock, + models: { "model-a": mocks.info, "custom-arn": mocks.info, "arn:new": mocks.info }, + } + render() + expect(!!screen.queryByRole("button", { name: "custom-arn" })).toBe(configured) + expect(screen.queryByRole("button", { name: "arn:new" })).not.toBeInTheDocument() + }) + + it("uses nested OpenAI effort patches without sending custom metadata snapshots", async () => { + mocks.configuration = { apiProvider: providerIdentifiers.openai, openAiModelId: "model-a" } + mocks.catalog = { ...mocks.catalog, provider: providerIdentifiers.openai, field: "openAiModelId" } + const user = userEvent.setup() + render() + await user.click(screen.getByRole("button", { name: "chat:modelPicker.effort.xhigh" })) + expect(mocks.postMessage).toHaveBeenLastCalledWith({ + type: "updateProfileModel", + text: "Work", + values: { + expectedProvider: providerIdentifiers.openai, + patch: { + enableReasoningEffort: true, + reasoningEffort: null, + openAiCustomModelInfo: { reasoningEffort: "xhigh" }, + }, + }, + }) + }) + + it.each(["loading", "error", "unsupported", "empty"] as const)( + "keeps %s inside fixed results and retains Settings/retry", + async (state) => { + mocks.catalog = { + ...mocks.catalog, + models: null, + isLoading: state === "loading", + isError: state === "error", + isUnsupported: state === "unsupported", + } + const user = userEvent.setup() + render() + expect(screen.getByRole("group", { name: "chat:modelPicker.providerModels" })).toHaveClass( + "h-[300px]", + "shrink-0", + "overflow-y-auto", + ) + if (state === "loading") expect(screen.getByRole("status")).toHaveTextContent("chat:modelSelector.loading") + else { + await user.click(screen.getByRole("button", { name: "chat:modelSelector.settings" })) + expect(mocks.postMessage).toHaveBeenCalledWith({ type: "switchTab", tab: "settings" }) + } + if (state === "error") { + await user.click(screen.getByRole("button", { name: "chat:retry.title" })) + expect(mocks.refetch).toHaveBeenCalledTimes(1) + } + // Settings-only catalogs must not remove otherwise supported reasoning controls. + expect(screen.getByRole("group", { name: "chat:modelPicker.reasoningEffort" })).toBeInTheDocument() + }, + ) + + it("hides effort controls for models without support", () => { + mocks.info = { contextWindow: 128000, supportsPromptCache: false } + render() + expect(screen.queryByRole("group", { name: "chat:modelPicker.reasoningEffort" })).not.toBeInTheDocument() + }) + + it.each(["disabled", "unnamed"])("prevents writes for %s profiles", async (state) => { + if (state === "unnamed") mocks.profileName = "" + const user = userEvent.setup() + render() + await user.click(screen.getByRole("button", { name: "Friendly Beta" })) + await user.click(screen.getByRole("button", { name: "chat:modelPicker.effort.low" })) + expect(mocks.postMessage).not.toHaveBeenCalled() + }) +}) diff --git a/webview-ui/src/components/chat/__tests__/UnifiedModelPicker.visual.tsx b/webview-ui/src/components/chat/__tests__/UnifiedModelPicker.visual.tsx new file mode 100644 index 0000000000..a4bd44fe59 --- /dev/null +++ b/webview-ui/src/components/chat/__tests__/UnifiedModelPicker.visual.tsx @@ -0,0 +1,131 @@ +import type { Locator } from "@playwright/test" + +import { expect, test } from "../../../../playwright/coverage-fixture" +import { + collectBoundedLayoutFailures, + expectBoundedLayout, + REFLOW_VIEWPORT_WIDTH, + WCAG_TEXT_SPACING, +} from "../../../../playwright/layout-contracts" +import { applyVisualTheme, visualThemes } from "../../../../playwright/themes" +import { getCapturedVscodeMessages } from "../../../../playwright/vscode-messages" + +const themes = visualThemes.filter(({ name }) => name === "dark" || name === "light") + +test.beforeEach(async ({ page }) => { + // A cold Vite dependency optimization can outlive the initial page load event. + await page.goto("/") + await page.waitForFunction(() => typeof window.mount === "function") +}) + +async function geometry(dialog: Locator, search: Locator) { + const picker = await dialog.boundingBox() + const input = await search.boundingBox() + // Both production views use the same fixed-height results viewport. + const results = await dialog.locator(".h-\\[300px\\]").boundingBox() + expect(picker).not.toBeNull() + expect(input).not.toBeNull() + expect(results).not.toBeNull() + return { + pickerY: picker!.y, + pickerHeight: picker!.height, + searchY: input!.y, + searchHeight: input!.height, + resultsY: results!.y, + resultsHeight: results!.height, + } +} + +for (const theme of themes) { + test(`unified picker model and profile views in ${theme.name}`, async ({ mount, page }) => { + await page.setViewportSize({ width: 360, height: 640 }) + await mount("unified-model-picker") + await applyVisualTheme(page, theme) + await page.getByTestId("dropdown-trigger").click() + const dialog = page.getByRole("dialog") + const models = dialog.getByRole("group", { name: "Models from the current provider" }) + await models.getByRole("button", { name: "gpt-5", exact: true }).scrollIntoViewIfNeeded() + await expect(dialog.getByRole("group", { name: "Reasoning effort" })).toBeVisible() + await page.mouse.move(350, 10) + await expect(page).toHaveScreenshot(`unified-model-picker-models-${theme.name}.png`) + + await dialog.getByRole("button", { name: "Choose profile", exact: true }).click() + await expect(dialog.locator("[data-picker-result]")).toHaveCount(3) + await page.mouse.move(350, 10) + await expect(page).toHaveScreenshot(`unified-model-picker-profiles-${theme.name}.png`) + }) +} + +for (const view of ["models", "profiles"] as const) { + for (const width of [360, REFLOW_VIEWPORT_WIDTH]) { + test(`${view} search keeps its upward-anchored geometry at ${width}px`, async ({ mount, page }) => { + await page.setViewportSize({ width, height: 640 }) + await mount("unified-model-picker") + await page.getByTestId("dropdown-trigger").click() + const dialog = page.getByRole("dialog") + if (view === "profiles") { + await dialog.getByRole("button", { name: "Choose profile", exact: true }).click() + } + const search = dialog.getByRole("textbox") + const results = dialog.locator("[data-picker-result]") + await expect(results.first()).toBeVisible() + await expect.poll(async () => (await geometry(dialog, search)).resultsHeight).toBe(300) + const initial = await geometry(dialog, search) + expect(initial.resultsHeight).toBe(300) + + await search.fill(view === "models" ? "gpt-5.1-codex-max" : "Personal") + await expect(results).toHaveCount(1) + await expect.poll(() => geometry(dialog, search)).toEqual(initial) + await expect.poll(() => dialog.evaluate(collectBoundedLayoutFailures)).toEqual([]) + + await search.fill("no-such-picker-result-2479") + await expect(results).toHaveCount(0) + await expect(dialog.getByText("No results found", { exact: true })).toBeVisible() + await expect.poll(() => geometry(dialog, search)).toEqual(initial) + await expect.poll(() => dialog.evaluate(collectBoundedLayoutFailures)).toEqual([]) + + if (width === REFLOW_VIEWPORT_WIDTH) { + // The picker is portaled beside #root, outside the shared helper's CSS scope. + await page.addStyleTag({ + content: `#roo-portal, #roo-portal * { + line-height: ${WCAG_TEXT_SPACING.lineHeight} !important; + letter-spacing: ${WCAG_TEXT_SPACING.letterSpacing} !important; + word-spacing: ${WCAG_TEXT_SPACING.wordSpacing} !important; + }`, + }) + await expectBoundedLayout(page, dialog, { focusedControl: search }) + const spaced = await geometry(dialog, search) + await search.fill(view === "models" ? "gpt-5.1-codex-max" : "Personal") + await expect(results).toHaveCount(1) + await expect.poll(() => geometry(dialog, search)).toEqual(spaced) + await expectBoundedLayout(page, dialog, { + focusedControl: results.first(), + actionRows: view === "models" ? [dialog.getByRole("group", { name: "Reasoning effort" })] : [], + }) + } + }) + } +} + +test("model and effort clicks retain the open picker layout", async ({ mount, page }) => { + await page.setViewportSize({ width: 360, height: 640 }) + await mount("unified-model-picker") + await page.getByTestId("dropdown-trigger").click() + const dialog = page.getByRole("dialog") + const search = dialog.getByRole("textbox", { name: "Search models" }) + await search.fill("gpt-5.1-codex-max") + await expect.poll(async () => (await geometry(dialog, search)).resultsHeight).toBe(300) + const initial = await geometry(dialog, search) + await dialog.getByRole("button", { name: "gpt-5.1-codex-max", exact: true }).click() + await expect(dialog).toBeVisible() + await expect.poll(() => geometry(dialog, search)).toEqual(initial) + await dialog + .getByRole("group", { name: "Reasoning effort" }) + .getByRole("button", { name: "Low", exact: true }) + .click() + await expect(dialog).toBeVisible() + await expect.poll(() => geometry(dialog, search)).toEqual(initial) + // Use the shared bridge capture, not console output, to ensure the real controls ran. + const messages = await getCapturedVscodeMessages(page) + expect(messages.filter(({ type }) => type === "updateProfileModel")).toHaveLength(2) +}) diff --git a/webview-ui/src/components/chat/__tests__/__screenshots__/unified-model-picker-models-dark.png b/webview-ui/src/components/chat/__tests__/__screenshots__/unified-model-picker-models-dark.png new file mode 100644 index 0000000000000000000000000000000000000000..c6ef2cbbeaa384dc95cda9cbd6f2b7c97da67ba1 GIT binary patch literal 17814 zcmeI4bySw^w(h07M7lvjKtMq0egOd$5D}2>P*O^|yO9)-5(QCOx>G_@r5gmLyE&7! z_FCtxvDeyTuRYFRXPob^_v3}U*DVqd#<4Nu`d;_NEX+w zA^Tt=!%xIrowlxBBfO@7kb2^pwl;;K^IiQCW2-feK?W5A8#5buLu_C&QHb{N+sM#J zdHOT)C~qw-p>8q7hoAT>m%2VxSNh?QAv0#PDIJ`6*S!BFeu#vKa;PRds?)D`JwKY7 ziQ70nYxs3GOS`L>z>dYpNRsCla-YcGKjift!I1kD|Np`N3tvJCj@bP&XSacak5Ak+ zq!4I5qW8)teHE6mVx`~iU8g>r@K|-d=!`pjgu}?LxlKYTTYix}AEgRU4yh}+*cn?9 zQlO^lrTV`a;ES>+jO9hgAi8C2_uqUVgB~0ouSSI@At6CVmQ=SkRQGCE${+oeo7=q? zql7aj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a2sT9H-~#%BUS6ttD(!6yvSR^g{z0!m?3a6TrVW3^Y$3e~jI@ip?)Z`-;geR=yu} zmjKYf3hX05-+!!)iwp#m@Dpv%r-e5Ix>0RK=Qn1n%cN0T*9F?Zt-sP59F~nnu$_+Y z`Ze$UX()g9D>TQ`=-;Bde?p51_k2X*;v?{@`7B(e+DH1ewoTjeUKG5v zgA9?Bpilc)u#vivhcx1=dK}ulbt-mcfMjESORd--_bu`x{W6JWRoYw3oT8@QaF!w+ z4Mnw3Qc)6?Yw*}5P2i)CBGH%m%M*=S3FaZwB3BqCJ~6v6hcq+=ka=`eCr35P4v^Z0 zc|Wn9nvspbKwP9i+Eo~BGhsrptuKK8=!TlV6v0y|)H0*x-%F*%4pJS%C9n3B_mQ13 zcLbLokDe_j^zMCk!*?65us^?yn79(!zU+P$$_=M|n+*Mn=pCIrlB$+<EOo(gDf66=&kYQU~R8XCkK&YI`*LaZ^ z*Ow+mOh*|ZvKz<1I-x1Kb;k>CAXGIeQge)7eslC_!nL`fzv0pM#F*6M^Jo@rekjVpqcsNBnHrQ^??18ByH9&Y$KP8NM@wbfZJhFrldGud5GN zus%4CQm(;q)t%>uJ@Ij3NtaZ+lo_Spa2vL%jc0~R#9tIJM#OOkiy`m}9 z^zR~VH2GPPye$2u*Kfz0N$Ft?Q~4mK)$)8eKp;1Q^Z9Vm<*E+iQ6>j}d<-kYrE=)G zulXHOnxQ@Z(nQE1N}TPF>8Qie)a#jqf1Ku>@cVOAuu-h!BZ;Ei z(bCJccyFmA8)kok76{{>UcDgKQb^R2s$NrWdD58gtG1m7x*%a}8 zSV$}opF5ieZf)rz-YMlvb<029Nu&6|H~(f5ETr28mf2~aXDU4>9b8~A^jCl$LGTg| nJ^~IGIQw=UzBqsOSqShrOQl%t?tZxf-@%iYQI;-}eCGFWEC$=; literal 0 HcmV?d00001 diff --git a/webview-ui/src/components/chat/__tests__/modelPicker.translations.spec.tsx b/webview-ui/src/components/chat/__tests__/modelPicker.translations.spec.tsx new file mode 100644 index 0000000000..17792dbd47 --- /dev/null +++ b/webview-ui/src/components/chat/__tests__/modelPicker.translations.spec.tsx @@ -0,0 +1,54 @@ +import i18next from "i18next" +import { render, screen } from "@testing-library/react" + +import english from "@src/i18n/locales/en/chat.json" +import russian from "@src/i18n/locales/ru/chat.json" +import { TranslationContext } from "@src/i18n/TranslationContext" +import { PickerSearchField } from "../PickerSearchField" + +const locales = import.meta.glob<{ modelPicker: typeof english.modelPicker }>("../../../i18n/locales/*/chat.json", { + eager: true, + import: "default", +}) + +describe("model picker translations", () => { + it("provides every new label and effort level in all 18 locales", () => { + expect(Object.keys(locales)).toHaveLength(18) + for (const locale of Object.values(locales)) { + expect(Object.keys(locale.modelPicker).sort()).toEqual(Object.keys(english.modelPicker).sort()) + expect(Object.keys(locale.modelPicker.effort).sort()).toEqual( + Object.keys(english.modelPicker.effort).sort(), + ) + expect(locale.modelPicker.reasoningEffortValue).toContain("{{effort}}") + for (const value of Object.values(locale.modelPicker)) { + if (typeof value === "string") expect(value.trim()).not.toBe("") + } + } + }) + + it.each([ + ["en", "Clear search"], + ["ru", "Очистить поиск"], + ])("renders the search controls using the %s locale", async (language, clearLabel) => { + const instance = i18next.createInstance() + await instance.init({ + lng: language, + fallbackLng: "en", + resources: { en: { chat: english }, ru: { chat: russian } }, + }) + render( + + + , + ) + expect(screen.getByRole("button", { name: clearLabel })).toBeInTheDocument() + expect(screen.getByRole("textbox")).toHaveAccessibleName(instance.t("chat:modelPicker.searchModels")) + expect( + instance.t("chat:modelPicker.reasoningEffortValue", { effort: instance.t("chat:modelPicker.effort.high") }), + ).not.toContain("{{") + }) +}) diff --git a/webview-ui/src/components/chat/__tests__/pickerTestFocus.ts b/webview-ui/src/components/chat/__tests__/pickerTestFocus.ts new file mode 100644 index 0000000000..24a98ac97c --- /dev/null +++ b/webview-ui/src/components/chat/__tests__/pickerTestFocus.ts @@ -0,0 +1,22 @@ +/** Restore real DOM focus locally: the shared FAST setup otherwise replaces it with a no-op. */ +export function setupNativePickerFocus() { + let frame: HTMLIFrameElement + let original: PropertyDescriptor + beforeAll(() => { + frame = document.createElement("iframe") + document.body.append(frame) + const nativeFocus = frame.contentDocument?.createElement("button").focus + const descriptor = Object.getOwnPropertyDescriptor(HTMLElement.prototype, "focus") + if (!nativeFocus || !descriptor) throw new Error("Native DOM focus is unavailable") + original = descriptor + Object.defineProperty(HTMLElement.prototype, "focus", { + configurable: true, + value: nativeFocus, + writable: true, + }) + }) + afterAll(() => { + Object.defineProperty(HTMLElement.prototype, "focus", original) + frame.remove() + }) +} diff --git a/webview-ui/src/components/chat/model-picker/ModelResults.tsx b/webview-ui/src/components/chat/model-picker/ModelResults.tsx new file mode 100644 index 0000000000..5b418af255 --- /dev/null +++ b/webview-ui/src/components/chat/model-picker/ModelResults.tsx @@ -0,0 +1,102 @@ +import { Check } from "lucide-react" +import type { ModelRecord, ProviderName } from "@roo-code/types" + +import { useAppTranslation } from "@/i18n/TranslationContext" +import { cn } from "@/lib/utils" +import { useModelSearch } from "./useModelSearch" +import { pickerResultsClassName } from "./pickerNavigation" + +interface ModelResultsProps { + models: ModelRecord | null + selectedId: string | undefined + search: string + provider: ProviderName | undefined + allowCustomArn: boolean + isLoading: boolean + isError: boolean + settingsOnly: boolean + disabled: boolean + onSelect: (id: string) => void + onRetry: () => void + onSettings: () => void +} + +export function ModelResults(props: ModelResultsProps) { + const { t } = useAppTranslation() + const { + models, + selectedId, + search, + provider, + allowCustomArn, + isLoading, + isError, + settingsOnly, + disabled, + onSelect, + onRetry, + onSettings, + } = props + const results = useModelSearch(models, selectedId, search, provider, allowCustomArn) + return ( +
+ {isLoading ? ( +
+ {t("chat:modelSelector.loading")} +
+ ) : isError ? ( +
+ {t("chat:error")} + +
+ ) : settingsOnly ? ( +
+ {t("chat:modelPicker.modelSettingsHint")} +
+ ) : results.length === 0 ? ( +
+ {t("common:ui.no_results")} +
+ ) : ( + results.map(({ id, info }) => ( + + )) + )} + {!isLoading && (settingsOnly || isError || results.length === 0) && ( + + )} +
+ ) +} diff --git a/webview-ui/src/components/chat/model-picker/README.md b/webview-ui/src/components/chat/model-picker/README.md new file mode 100644 index 0000000000..773123cb4e --- /dev/null +++ b/webview-ui/src/components/chat/model-picker/README.md @@ -0,0 +1,18 @@ +# Profile model picker helpers + +Public exports are in [index.ts](index.ts). These helpers do not save settings or replace profile state. + +- [`useProfileModelCatalog(apiConfiguration)`](useProfileModelCatalog.ts:33) returns the resolved provider, typed model-ID field, raw catalog (or null), loading/error/unsupported flags, a settings fallback message, and a void retry callback. Requires the application's React Query provider. Friendli discovery overrides its static fallback. Local/compound providers stay settings-only. +- Consumers **must** apply [`filterModels(models, provider, organizationAllowList)`](../../settings/utils/organizationFilters.ts:27) before presenting choices. Also omit deprecated models except the current selection, and omit Bedrock's custom-ARN pseudo-choice unless an ARN is already configured. An empty discovery result is a successful empty catalog; allow opening Settings for manual model IDs. +- [`getReasoningSelection(config, modelInfo)`](reasoning.ts:23) returns supported options, the effective current effort (possibly undefined), and whether reasoning is enabled. Explicit capability arrays are authoritative; required effort cannot be disabled. Unset flags follow defaults, while false disables optional effort. OpenAI-compatible manual controls match Settings and use nested custom-model effort, not a stale top-level effort. Binary/budget models expose no effort choices. +- [`createReasoningPatch(config, effort, modelInfo?)`](reasoning.ts:76) returns a wire patch. Pass model metadata to reject unsupported choices; without it, standard providers validate the effort enum only. Manual OpenAI choices are always checked. Null restores defaults; disable turns reasoning off; none is an enabled wire level where advertised. OpenAI nested patches contain only effort. +- [`createModelPatch(config, id)`](profileModelPatches.ts:16) uses the shared provider field and side effects, adds null clears for the enable flag and OpenAI nested effort, and rejects empty IDs or Bedrock choices requiring new ARN configuration. It does not validate catalog membership: select from the filtered catalog, with the host enforcing the allowlist again. +- Submit either patch through the existing profile-model message with the target profile name, expected provider, and values patch. Do not merge the patch into a whole settings snapshot or optimistically overwrite the profile. The host merges it into current storage. + +## OpenAI discovery constraints + +[`discoverOpenAiModels()`](openAiModelDiscovery.ts:10) sends one typed host request with a fresh request identifier and accepts only the matching response. Uncorrelated Settings responses and stale responses from another profile or retry are ignored. Abort, completion, transport failure, and the ten-second timeout remove the listener and timer immediately. Requests are independent: no serialization, drain listeners, or session-wide failure flags; retry works without reloading. + +The host echoes the identifier only when the request includes one, preserving the existing response shape for legacy Settings clients. Correlated missing-config and unexpected fetch failures return an error promptly. The existing fetcher converts network failures and invalid URLs into an empty model list; an empty list remains a successful empty catalog, not an invented default model. + +[`useOpenAiModelCatalog()`](useOpenAiModelCatalog.ts:14) requires an explicit base URL and API key, matching the host discovery gate. Inference's default OpenAI URL and placeholder key are **not** discovery defaults; missing/empty configuration is immediately settings-only without sending a request. Empty catalogs, errors, and timeouts must also retain the Settings fallback for manual model IDs. Headers and credentials remain in effect closures and the host payload, never React Query keys or shared catalog caches. Disabled discovery sends no requests and reports neither loading nor error. diff --git a/webview-ui/src/components/chat/model-picker/ReasoningControls.tsx b/webview-ui/src/components/chat/model-picker/ReasoningControls.tsx new file mode 100644 index 0000000000..f2f35ef86e --- /dev/null +++ b/webview-ui/src/components/chat/model-picker/ReasoningControls.tsx @@ -0,0 +1,44 @@ +import { Brain } from "lucide-react" + +import { useAppTranslation } from "@/i18n/TranslationContext" +import { cn } from "@/lib/utils" +import type { ReasoningOption, ReasoningSelection } from "./reasoning" + +export function ReasoningControls({ + selection, + disabled, + onSelect, +}: { + selection: ReasoningSelection + disabled: boolean + onSelect: (effort: ReasoningOption) => void +}) { + const { t } = useAppTranslation() + if (!selection.supportedOptions.length) return null + return ( +
+
+
+
+ {selection.supportedOptions.map((effort) => ( + + ))} +
+
+ ) +} diff --git a/webview-ui/src/components/chat/model-picker/__tests__/openAiModelDiscovery.spec.tsx b/webview-ui/src/components/chat/model-picker/__tests__/openAiModelDiscovery.spec.tsx new file mode 100644 index 0000000000..c18addbc4d --- /dev/null +++ b/webview-ui/src/components/chat/model-picker/__tests__/openAiModelDiscovery.spec.tsx @@ -0,0 +1,265 @@ +import { act, renderHook } from "@testing-library/react" + +import { providerIdentifiers, type ExtensionMessage, type ProviderSettings } from "@roo-code/types" + +import { vscode } from "@/utils/vscode" + +import { discoverOpenAiModels } from "../openAiModelDiscovery" +import { useOpenAiModelCatalog } from "../useOpenAiModelCatalog" + +vi.mock("@/utils/vscode", () => ({ vscode: { postMessage: vi.fn() } })) + +const first: ProviderSettings = { + apiProvider: providerIdentifiers.openai, + openAiBaseUrl: "https://first.test/v1", + openAiApiKey: "first-secret", + openAiHeaders: { Authorization: "header-secret" }, +} +const second: ProviderSettings = { ...first, openAiBaseUrl: "https://second.test/v1", openAiApiKey: "second-secret" } + +const flush = async () => { + await act(async () => { + await Promise.resolve() + }) +} +const reply = async (data: ExtensionMessage) => { + await act(async () => { + window.dispatchEvent(new MessageEvent("message", { data })) + }) +} +const requestId = () => vi.mocked(vscode.postMessage).mock.calls.at(-1)?.[0].requestId +const correlatedReply = (openAiModels: string[]) => + reply({ type: "openAiModels", requestId: requestId(), openAiModels }) + +describe("OpenAI model discovery", () => { + beforeEach(() => { + vi.clearAllMocks() + }) + afterEach(() => vi.restoreAllMocks()) + + it("sends the typed host payload and ignores mismatched correlated replies", async () => { + const { result } = renderHook(() => useOpenAiModelCatalog(first, true)) + await flush() + expect(vscode.postMessage).toHaveBeenCalledWith({ + type: "requestOpenAiModels", + requestId: expect.any(String), + values: { baseUrl: first.openAiBaseUrl, apiKey: first.openAiApiKey, openAiHeaders: first.openAiHeaders }, + }) + await reply({ type: "openAiModels", requestId: "not-ours", openAiModels: ["wrong"] }) + await reply({ type: "openAiModels", openAiModels: ["legacy-settings"] }) + await reply({ type: "state", requestId: requestId() }) + expect(result.current.isLoading).toBe(true) + await reply({ type: "openAiModels", requestId: requestId(), openAiModels: ["model", "__proto__"] }) + expect(result.current.models).toHaveProperty("model.contextWindow") + expect(Object.hasOwn(result.current.models ?? {}, "__proto__")).toBe(true) + expect(result.current.isError).toBe(false) + }) + + it("starts a new profile immediately and ignores the aborted profile's late response", async () => { + const { result, rerender } = renderHook(({ config }) => useOpenAiModelCatalog(config, true), { + initialProps: { config: first }, + }) + await flush() + const oldRequestId = requestId() + rerender({ config: second }) + await flush() + expect(vscode.postMessage).toHaveBeenCalledTimes(2) + expect(result.current.models).toBeNull() + await reply({ type: "openAiModels", requestId: oldRequestId, openAiModels: ["first-only"] }) + expect(result.current.models).toBeNull() + await correlatedReply(["second-only"]) + expect(Object.keys(result.current.models ?? {})).toEqual(["second-only"]) + }) + + it("clears completed results immediately on credential/header changes and retries", async () => { + const { result, rerender } = renderHook(({ config }) => useOpenAiModelCatalog(config, true), { + initialProps: { config: first }, + }) + await flush() + await correlatedReply(["old"]) + rerender({ config: { ...first, openAiApiKey: "rotated", openAiHeaders: { custom: "changed" } } }) + expect(result.current.models).toBeNull() + await flush() + await correlatedReply([]) + expect(result.current.models).toEqual({}) + expect(result.current.isError).toBe(false) + const previousRequestId = requestId() + act(() => result.current.refetch()) + expect(result.current.isLoading).toBe(true) + await flush() + await reply({ type: "openAiModels", requestId: previousRequestId, openAiModels: ["stale"] }) + expect(result.current.isLoading).toBe(true) + await correlatedReply(["retried"]) + expect(Object.keys(result.current.models ?? {})).toEqual(["retried"]) + }) + + it("does not reuse a completed catalog after disabling and re-enabling discovery", async () => { + const { result, rerender } = renderHook(({ enabled }) => useOpenAiModelCatalog(first, enabled), { + initialProps: { enabled: true }, + }) + await flush() + await correlatedReply(["old"]) + rerender({ enabled: false }) + expect(result.current.models).toBeNull() + rerender({ enabled: true }) + expect(result.current.models).toBeNull() + expect(result.current.isLoading).toBe(true) + await flush() + await correlatedReply(["new"]) + expect(Object.keys(result.current.models ?? {})).toEqual(["new"]) + }) + + it("removes an unmounted request's listener immediately without waiting for a reply", async () => { + const remove = vi.spyOn(window, "removeEventListener") + const { unmount } = renderHook(() => useOpenAiModelCatalog(first, true)) + await flush() + unmount() + expect(remove).toHaveBeenCalledWith("message", expect.any(Function)) + }) + + it("isolates concurrent requests even when responses arrive in reverse order", async () => { + const active = new AbortController() + const other = new AbortController() + const one = discoverOpenAiModels(first, active.signal) + const firstRequestId = requestId() + const two = discoverOpenAiModels(second, other.signal) + expect(vscode.postMessage).toHaveBeenCalledTimes(2) + expect(requestId()).not.toBe(firstRequestId) + await correlatedReply(["other"]) + expect(await two).toEqual(["other"]) + await reply({ type: "openAiModels", requestId: firstRequestId, openAiModels: ["active"] }) + expect(await one).toEqual(["active"]) + }) + + it.each([false, true])( + "rejects an aborted request (already aborted: %s) and permits a fresh request", + async (alreadyAborted) => { + const controller = new AbortController() + const remove = vi.spyOn(window, "removeEventListener") + if (alreadyAborted) controller.abort() + const aborted = discoverOpenAiModels(first, controller.signal) + const assertion = expect(aborted).rejects.toMatchObject({ name: "AbortError" }) + controller.abort() + await assertion + expect(vscode.postMessage).toHaveBeenCalledTimes(alreadyAborted ? 0 : 1) + if (!alreadyAborted) expect(remove).toHaveBeenCalledWith("message", expect.any(Function)) + const fresh = discoverOpenAiModels(second, new AbortController().signal) + await correlatedReply(["fresh"]) + expect(await fresh).toEqual(["fresh"]) + }, + ) + + it.each([ + { type: "openAiModels" }, + { type: "openAiModels", error: "Discovery failed", openAiModels: [] }, + ] satisfies ExtensionMessage[])( + "reports a correlated invalid/error reply and permits retry: %j", + async (response) => { + const { result } = renderHook(() => useOpenAiModelCatalog(first, true)) + await flush() + await reply({ ...response, requestId: requestId() }) + expect(result.current.isError).toBe(true) + expect(result.current.isLoading).toBe(false) + expect(result.current.models).toBeNull() + act(() => result.current.refetch()) + await flush() + await correlatedReply(["valid"]) + expect(result.current.isError).toBe(false) + }, + ) + + it("times out with cleanup, ignores late responses, and retries without a reload", async () => { + vi.useFakeTimers() + try { + const remove = vi.spyOn(window, "removeEventListener") + const { result } = renderHook(() => useOpenAiModelCatalog(first, true)) + await flush() + const timedOutId = requestId() + await act(async () => { + await vi.advanceTimersByTimeAsync(10_000) + }) + expect(result.current.isError).toBe(true) + expect(remove).toHaveBeenCalledWith("message", expect.any(Function)) + expect(vi.getTimerCount()).toBe(0) + act(() => result.current.refetch()) + await flush() + await reply({ type: "openAiModels", openAiModels: ["ambiguous"] }) + await reply({ type: "openAiModels", requestId: timedOutId, openAiModels: ["late"] }) + expect(result.current.models).toBeNull() + await correlatedReply(["correlated"]) + expect(Object.keys(result.current.models ?? {})).toEqual(["correlated"]) + expect(vi.getTimerCount()).toBe(0) + } finally { + vi.useRealTimers() + } + }) + + it.each([ + {}, + { openAiApiKey: "key" }, + { openAiBaseUrl: first.openAiBaseUrl }, + { ...first, openAiApiKey: "" }, + { ...first, openAiBaseUrl: "" }, + ])("uses Settings rather than inference defaults for missing discovery configuration: %j", (config) => { + const { result } = renderHook(() => useOpenAiModelCatalog(config, true)) + expect(result.current).toMatchObject({ models: null, isLoading: false, isError: true }) + act(() => result.current.refetch()) + expect(vscode.postMessage).not.toHaveBeenCalled() + }) + + it("does not discover or report an error when disabled with missing configuration", () => { + const { result } = renderHook(() => useOpenAiModelCatalog({}, false)) + expect(result.current).toMatchObject({ models: null, isLoading: false, isError: false }) + expect(vscode.postMessage).not.toHaveBeenCalled() + }) + + it("clears a completed catalog when required configuration is removed, and discovers when restored", async () => { + const { result, rerender } = renderHook(({ config }) => useOpenAiModelCatalog(config, true), { + initialProps: { config: first }, + }) + await correlatedReply(["old"]) + rerender({ config: {} }) + expect(result.current).toMatchObject({ models: null, isLoading: false, isError: true }) + rerender({ config: first }) + expect(result.current).toMatchObject({ models: null, isLoading: true, isError: false }) + await correlatedReply(["new"]) + expect(Object.keys(result.current.models ?? {})).toEqual(["new"]) + }) + + it("cleans up a synchronous transport failure and permits retry", async () => { + const remove = vi.spyOn(window, "removeEventListener") + vi.mocked(vscode.postMessage).mockImplementationOnce(() => { + throw new Error("transport unavailable") + }) + await expect(discoverOpenAiModels(first, new AbortController().signal)).rejects.toThrow("transport unavailable") + expect(remove).toHaveBeenCalledWith("message", expect.any(Function)) + const retry = discoverOpenAiModels(first, new AbortController().signal) + await correlatedReply([]) + expect(await retry).toEqual([]) + }) + + it.each([{ openAiModels: null }, { openAiModels: "not-an-array" }, { openAiModels: ["model", 42] }])( + "rejects malformed model lists: %j", + async ({ openAiModels }) => { + const discovery = discoverOpenAiModels(first, new AbortController().signal) + const assertion = expect(discovery).rejects.toThrow("Invalid model discovery response") + window.dispatchEvent( + new MessageEvent("message", { + data: { type: "openAiModels", requestId: requestId(), openAiModels }, + }), + ) + await assertion + }, + ) + + it("listens before posting so a synchronous matching response is not lost", async () => { + vi.mocked(vscode.postMessage).mockImplementationOnce((message) => { + window.dispatchEvent( + new MessageEvent("message", { + data: { type: "openAiModels", requestId: message.requestId, openAiModels: ["immediate"] }, + }), + ) + }) + await expect(discoverOpenAiModels(first, new AbortController().signal)).resolves.toEqual(["immediate"]) + }) +}) diff --git a/webview-ui/src/components/chat/model-picker/__tests__/profileModelPatches.spec.ts b/webview-ui/src/components/chat/model-picker/__tests__/profileModelPatches.spec.ts new file mode 100644 index 0000000000..ce9782ec68 --- /dev/null +++ b/webview-ui/src/components/chat/model-picker/__tests__/profileModelPatches.spec.ts @@ -0,0 +1,77 @@ +import { providerIdentifiers, type ProviderSettings } from "@roo-code/types" + +import { createModelPatch } from "../profileModelPatches" + +const resets = { + reasoningEffort: null, + enableReasoningEffort: null, + modelMaxTokens: null, + modelMaxThinkingTokens: null, +} + +describe("createModelPatch", () => { + it.each([ + { provider: providerIdentifiers.anthropic, field: "apiModelId" }, + { provider: providerIdentifiers.openrouter, field: "openRouterModelId" }, + { provider: providerIdentifiers.requesty, field: "requestyModelId" }, + { provider: providerIdentifiers.nanogpt, field: "nanoGptModelId" }, + ] as const)("uses the shared model field for $provider", ({ provider, field }) => { + const config: ProviderSettings = { + apiProvider: provider, + apiKey: "secret", + modelMaxTokens: 120, + reasoningEffort: "high", + enableReasoningEffort: false, + } + const before = structuredClone(config) + expect(createModelPatch(config, "new-model")).toEqual({ [field]: "new-model", ...resets }) + expect(config).toEqual(before) + }) + + it("matches the picker provider default", () => { + expect(createModelPatch({}, "new-model")).toEqual({ openRouterModelId: "new-model", ...resets }) + }) + + it("clears only the nested OpenAI reasoning effort", () => { + expect(createModelPatch({ apiProvider: providerIdentifiers.openai }, "custom")).toEqual({ + openAiModelId: "custom", + ...resets, + openAiCustomModelInfo: { reasoningEffort: null }, + }) + }) + + it("converts all Bedrock side-effect clears to null", () => { + expect( + createModelPatch({ apiProvider: providerIdentifiers.bedrock, awsCustomArn: "arn:old" }, "new-model"), + ).toEqual({ + apiModelId: "new-model", + ...resets, + awsCustomArn: null, + awsCustomArnBaseModelId: null, + awsModelContextWindow: null, + }) + }) + + it("allows an existing Bedrock custom ARN without patching its metadata", () => { + expect( + createModelPatch({ apiProvider: providerIdentifiers.bedrock, awsCustomArn: "arn:existing" }, "custom-arn"), + ).toEqual({ apiModelId: "custom-arn", ...resets }) + }) + + it.each(["custom-arn", "arn:aws:bedrock:custom"])( + "rejects a Bedrock selection requiring new ARN settings: %s", + (id) => { + expect(() => createModelPatch({ apiProvider: providerIdentifiers.bedrock }, id)).toThrow("Settings") + }, + ) + + it.each(["", " "])("rejects an empty model ID", (id) => { + expect(() => createModelPatch({}, id)).toThrow("non-empty") + }) + + it("rejects compound providers without a scalar model field", () => { + expect(() => createModelPatch({ apiProvider: providerIdentifiers.vscodeLm }, "model")).toThrow( + "supported provider", + ) + }) +}) diff --git a/webview-ui/src/components/chat/model-picker/__tests__/reasoning.spec.ts b/webview-ui/src/components/chat/model-picker/__tests__/reasoning.spec.ts new file mode 100644 index 0000000000..48662cfac7 --- /dev/null +++ b/webview-ui/src/components/chat/model-picker/__tests__/reasoning.spec.ts @@ -0,0 +1,205 @@ +import { providerIdentifiers, type ModelInfo, type ProviderSettings } from "@roo-code/types" + +import { createReasoningPatch, getReasoningSelection, type ReasoningOption } from "../reasoning" + +const base: ModelInfo = { contextWindow: 128_000, supportsPromptCache: false } +const config: ProviderSettings = { apiProvider: providerIdentifiers.openaiNative } + +describe("getReasoningSelection", () => { + it.each([ + { + name: "optional boolean", + info: { supportsReasoningEffort: true }, + options: ["disable", "low", "medium", "high"], + current: "disable", + enabled: false, + }, + { + name: "required boolean", + info: { supportsReasoningEffort: true, requiredReasoningEffort: true }, + options: ["low", "medium", "high"], + current: "medium", + enabled: true, + }, + { + name: "explicit array", + info: { supportsReasoningEffort: ["none", "xhigh"], reasoningEffort: "xhigh" }, + options: ["none", "xhigh"], + current: "xhigh", + enabled: true, + }, + { + name: "invalid default", + info: { supportsReasoningEffort: ["low", "high"], reasoningEffort: "xhigh" }, + options: ["low", "high"], + current: "low", + enabled: true, + }, + { + name: "required array", + info: { supportsReasoningEffort: ["disable", "high"], requiredReasoningEffort: true }, + options: ["high"], + current: "high", + enabled: true, + }, + { name: "empty array", info: { supportsReasoningEffort: [] }, options: [], current: undefined, enabled: false }, + { name: "unsupported", info: {}, options: [], current: undefined, enabled: false }, + ] satisfies { + name: string + info: Partial + options: ReasoningOption[] + current: ReasoningOption | undefined + enabled: boolean + }[])("normalizes $name", ({ info, options, current, enabled }) => { + expect(getReasoningSelection(config, { ...base, ...info })).toEqual({ + supportedOptions: options, + currentEffort: current, + reasoningEnabled: enabled, + }) + }) + + it.each([ + { stored: "none", flag: true, current: "none", enabled: true }, + { stored: "disable", flag: true, current: "disable", enabled: false }, + { stored: "high", flag: false, current: "disable", enabled: false }, + { stored: undefined, flag: undefined, current: "high", enabled: true }, + { stored: "xhigh", flag: undefined, current: "high", enabled: true }, + ] satisfies { + stored: ProviderSettings["reasoningEffort"] + flag: boolean | undefined + current: ReasoningOption + enabled: boolean + }[])("resolves stored $stored / enabled $flag", ({ stored, flag, current, enabled }) => { + const info: ModelInfo = { + ...base, + supportsReasoningEffort: ["disable", "none", "low", "high"], + reasoningEffort: "high", + } + expect( + getReasoningSelection({ ...config, reasoningEffort: stored, enableReasoningEffort: flag }, info), + ).toMatchObject({ currentEffort: current, reasoningEnabled: enabled }) + }) + + it("does not invent disable for arrays, but honors a false flag", () => { + expect( + getReasoningSelection( + { ...config, enableReasoningEffort: false }, + { ...base, supportsReasoningEffort: ["none", "high"] }, + ), + ).toEqual({ supportedOptions: ["none", "high"], currentEffort: undefined, reasoningEnabled: false }) + }) + + it("required effort overrides stale disabled settings", () => { + expect( + getReasoningSelection( + { ...config, enableReasoningEffort: false, reasoningEffort: "disable" }, + { + ...base, + supportsReasoningEffort: ["low", "high"], + requiredReasoningEffort: true, + reasoningEffort: "high", + }, + ), + ).toMatchObject({ currentEffort: "high", reasoningEnabled: true }) + }) + + it.each([undefined, false, true])( + "exposes manual OpenAI settings with enabled=%s even without capabilities", + (flag) => { + const manual: ProviderSettings = { + apiProvider: providerIdentifiers.openai, + enableReasoningEffort: flag, + reasoningEffort: "low", + openAiCustomModelInfo: { ...base, reasoningEffort: "xhigh" }, + } + expect(getReasoningSelection(manual, base)).toEqual({ + supportedOptions: ["disable", "low", "medium", "high", "xhigh", "max"], + currentEffort: flag ? "xhigh" : "disable", + reasoningEnabled: flag === true, + }) + }, + ) + + it("manual OpenAI default matches the Settings control", () => { + expect( + getReasoningSelection({ apiProvider: providerIdentifiers.openai, enableReasoningEffort: true }, base), + ).toMatchObject({ currentEffort: "low", reasoningEnabled: true }) + }) + + it.each([ + { info: { supportsReasoningBinary: true }, enabled: false }, + { info: { supportsReasoningBinary: true }, enabled: true }, + { info: { supportsReasoningBudget: true }, enabled: true }, + { info: { supportsReasoningBudget: true, requiredReasoningBudget: true }, enabled: false }, + ] satisfies { info: Partial; enabled: boolean }[])( + "does not invent effort options for binary/budget reasoning", + ({ info, enabled }) => { + expect(getReasoningSelection({ ...config, enableReasoningEffort: enabled }, { ...base, ...info })).toEqual({ + supportedOptions: [], + currentEffort: undefined, + reasoningEnabled: info.requiredReasoningBudget === true || enabled, + }) + }, + ) +}) + +describe("createReasoningPatch", () => { + it.each(["none", "minimal", "low", "medium", "high", "xhigh", "max"] as const)( + "enables the wire effort %s", + (effort) => { + expect(createReasoningPatch(config, effort)).toEqual({ + reasoningEffort: effort, + enableReasoningEffort: true, + }) + }, + ) + + it.each(["disable", null] as const)("keeps disable and reset %s distinct", (effort) => { + expect(createReasoningPatch(config, effort)).toEqual({ + reasoningEffort: effort, + enableReasoningEffort: effort === null ? null : false, + }) + }) + + it.each(["low", "xhigh"] as const)("accepts a capability-advertised %s", (effort) => { + expect(createReasoningPatch(config, effort, { ...base, supportsReasoningEffort: ["low", "xhigh"] })).toEqual({ + reasoningEffort: effort, + enableReasoningEffort: true, + }) + }) + + it.each(["disable", "none", "minimal", "medium", "high", "max"] as const)("rejects unadvertised %s", (effort) => { + expect(() => + createReasoningPatch(config, effort, { + ...base, + supportsReasoningEffort: ["low", "xhigh"], + requiredReasoningEffort: true, + }), + ).toThrow("Unsupported") + }) + + it("rejects efforts for a non-reasoning model", () => { + expect(() => createReasoningPatch(config, "low", base)).toThrow("Unsupported") + }) + + it.each(["low", "medium", "high", "xhigh", "max", "disable", null] as const)( + "patches only custom OpenAI effort for %s", + (effort) => { + const manual: ProviderSettings = { + apiProvider: providerIdentifiers.openai, + openAiCustomModelInfo: { ...base, maxTokens: 123, reasoningEffort: "high" }, + } + const before = structuredClone(manual) + expect(createReasoningPatch(manual, effort)).toEqual({ + reasoningEffort: null, + enableReasoningEffort: effort === null ? null : effort !== "disable", + openAiCustomModelInfo: { reasoningEffort: effort === "disable" ? null : effort }, + }) + expect(manual).toEqual(before) + }, + ) + + it.each(["none", "minimal"] as const)("rejects %s not offered by manual OpenAI settings", (effort) => { + expect(() => createReasoningPatch({ apiProvider: providerIdentifiers.openai }, effort)).toThrow("Unsupported") + }) +}) diff --git a/webview-ui/src/components/chat/model-picker/__tests__/useProfileModelCatalog.spec.tsx b/webview-ui/src/components/chat/model-picker/__tests__/useProfileModelCatalog.spec.tsx new file mode 100644 index 0000000000..152c39e09d --- /dev/null +++ b/webview-ui/src/components/chat/model-picker/__tests__/useProfileModelCatalog.spec.tsx @@ -0,0 +1,149 @@ +import { act, renderHook } from "@testing-library/react" + +import { + providerIdentifiers, + friendliModels, + type ModelInfo, + type ProviderSettings, + type RouterModels, +} from "@roo-code/types" + +import { filterModels } from "@/components/settings/utils/organizationFilters" +import { vscode } from "@/utils/vscode" + +import { MODEL_CATALOG_SETTINGS_FALLBACK, useProfileModelCatalog } from "../useProfileModelCatalog" + +vi.mock("@/utils/vscode", () => ({ vscode: { postMessage: vi.fn() } })) +const router = vi.hoisted(() => ({ + data: undefined as Partial | undefined, + isLoading: false, + isError: false, + refetch: vi.fn(), +})) +const routerCalls = vi.hoisted(() => vi.fn()) +vi.mock("@/components/ui/hooks/useRouterModels", () => ({ + useRouterModels: (options: unknown) => { + routerCalls(options) + return router + }, +})) + +const info: ModelInfo = { contextWindow: 1000, supportsPromptCache: false } + +describe("useProfileModelCatalog", () => { + beforeEach(() => { + vi.clearAllMocks() + router.data = undefined + router.isLoading = false + router.isError = false + }) + + it("returns typed static models without discovery", () => { + const { result } = renderHook(() => useProfileModelCatalog({ apiProvider: providerIdentifiers.anthropic })) + expect(result.current).toMatchObject({ + provider: providerIdentifiers.anthropic, + field: "apiModelId", + isUnsupported: false, + isLoading: false, + isError: false, + }) + expect(Object.keys(result.current.models ?? {}).length).toBeGreaterThan(0) + expect(routerCalls).toHaveBeenLastCalledWith({ provider: providerIdentifiers.anthropic, enabled: false }) + expect(vscode.postMessage).not.toHaveBeenCalled() + }) + + it("defaults to OpenRouter and refetches the router catalog", () => { + router.data = { openrouter: { custom: info } } + const { result } = renderHook(() => useProfileModelCatalog({})) + expect(result.current.provider).toBe(providerIdentifiers.openrouter) + expect(result.current.models).toEqual({ custom: info }) + act(() => result.current.refetch()) + expect(router.refetch).toHaveBeenCalledTimes(1) + }) + + it("reports router loading, errors and missing provider catalogs", () => { + router.isLoading = true + const { result, rerender } = renderHook(() => + useProfileModelCatalog({ apiProvider: providerIdentifiers.requesty }), + ) + expect(result.current).toMatchObject({ models: null, isLoading: true, isError: false }) + router.isLoading = false + router.isError = true + rerender() + expect(result.current).toMatchObject({ + models: null, + isLoading: false, + isError: true, + fallbackMessage: MODEL_CATALOG_SETTINGS_FALLBACK, + }) + }) + + it("passes router models as the fourth static argument for Friendli override and fallback", () => { + const { result, rerender } = renderHook(() => + useProfileModelCatalog({ apiProvider: providerIdentifiers.friendli }), + ) + expect(result.current.models).toEqual(friendliModels) + expect(routerCalls).toHaveBeenLastCalledWith({ provider: providerIdentifiers.friendli, enabled: true }) + router.data = { friendli: { fetched: info } } + rerender() + expect(result.current.models).toEqual({ fetched: info }) + router.data = { friendli: {} } + rerender() + expect(result.current.models).toEqual(friendliModels) + }) + + it("uses the configured Z.ai API line", () => { + const { result } = renderHook(() => + useProfileModelCatalog({ apiProvider: providerIdentifiers.zai, zaiApiLine: "china_api" }), + ) + expect(result.current.models).not.toBeNull() + expect(result.current.field).toBe("apiModelId") + }) + + it.each([ + providerIdentifiers.ollama, + providerIdentifiers.lmstudio, + providerIdentifiers.vscodeLm, + providerIdentifiers.githubCopilot, + ])("explicitly falls back to Settings for %s", (apiProvider) => { + const { result } = renderHook(() => useProfileModelCatalog({ apiProvider: apiProvider })) + expect(result.current).toMatchObject({ + field: undefined, + models: null, + isLoading: false, + isError: false, + isUnsupported: true, + fallbackMessage: MODEL_CATALOG_SETTINGS_FALLBACK, + }) + act(() => result.current.refetch()) + expect(router.refetch).not.toHaveBeenCalled() + }) + + it("leaves organization filtering to the consumer", () => { + router.data = { openrouter: { allowed: info, denied: info } } + const { result } = renderHook(() => useProfileModelCatalog({})) + expect(Object.keys(result.current.models ?? {})).toEqual(["allowed", "denied"]) + expect( + filterModels(result.current.models, result.current.provider, { + allowAll: false, + providers: { openrouter: { allowAll: false, models: ["allowed"] } }, + }), + ).toEqual({ allowed: info }) + }) + + it("does not issue requests the legacy host silently ignores", () => { + const settings: ProviderSettings = { + apiProvider: providerIdentifiers.openai, + openAiBaseUrl: "https://example.test", + } + const { result } = renderHook(() => useProfileModelCatalog(settings)) + expect(result.current).toMatchObject({ + field: "openAiModelId", + isUnsupported: false, + isLoading: false, + isError: true, + fallbackMessage: MODEL_CATALOG_SETTINGS_FALLBACK, + }) + expect(vscode.postMessage).not.toHaveBeenCalled() + }) +}) diff --git a/webview-ui/src/components/chat/model-picker/index.ts b/webview-ui/src/components/chat/model-picker/index.ts new file mode 100644 index 0000000000..81f5b4ae94 --- /dev/null +++ b/webview-ui/src/components/chat/model-picker/index.ts @@ -0,0 +1,7 @@ +export { + useProfileModelCatalog, + MODEL_CATALOG_SETTINGS_FALLBACK, + type ProfileModelCatalog, +} from "./useProfileModelCatalog" +export { createModelPatch, type ProfileModelPatch } from "./profileModelPatches" +export { getReasoningSelection, createReasoningPatch, type ReasoningOption, type ReasoningSelection } from "./reasoning" diff --git a/webview-ui/src/components/chat/model-picker/openAiModelDiscovery.ts b/webview-ui/src/components/chat/model-picker/openAiModelDiscovery.ts new file mode 100644 index 0000000000..95d743863a --- /dev/null +++ b/webview-ui/src/components/chat/model-picker/openAiModelDiscovery.ts @@ -0,0 +1,63 @@ +import { OpenAiModelsMessageType, type ExtensionMessage, type ProviderSettings } from "@roo-code/types" + +import { vscode } from "@/utils/vscode" + +export type OpenAiDiscoverySettings = Pick + +const REQUEST_TIMEOUT_MS = 10_000 + +/** One independently abortable request; credentials never enter a shared query cache. */ +export function discoverOpenAiModels(settings: OpenAiDiscoverySettings, signal: AbortSignal): Promise { + return new Promise((resolve, reject) => { + if (signal.aborted) { + reject(new DOMException("Model discovery aborted", "AbortError")) + return + } + + const requestId = crypto.randomUUID() + const cleanup = () => { + clearTimeout(timeout) + window.removeEventListener("message", onMessage) + signal.removeEventListener("abort", onAbort) + } + const onAbort = () => { + cleanup() + reject(new DOMException("Model discovery aborted", "AbortError")) + } + const onMessage = (event: MessageEvent) => { + const message = event.data + if (message?.type !== OpenAiModelsMessageType.openAiModels || message.requestId !== requestId) return + cleanup() + if (message.error) { + reject(new Error(message.error)) + } else if ( + !Array.isArray(message.openAiModels) || + !message.openAiModels.every((id) => typeof id === "string") + ) { + reject(new Error("Invalid model discovery response")) + } else { + resolve(message.openAiModels) + } + } + const timeout = setTimeout(() => { + cleanup() + reject(new Error("Model discovery timed out; configure this model in Settings.")) + }, REQUEST_TIMEOUT_MS) + window.addEventListener("message", onMessage) + signal.addEventListener("abort", onAbort, { once: true }) + try { + vscode.postMessage({ + type: OpenAiModelsMessageType.requestOpenAiModels, + requestId, + values: { + baseUrl: settings.openAiBaseUrl, + apiKey: settings.openAiApiKey, + openAiHeaders: settings.openAiHeaders, + }, + }) + } catch (error) { + cleanup() + reject(error) + } + }) +} diff --git a/webview-ui/src/components/chat/model-picker/pickerNavigation.ts b/webview-ui/src/components/chat/model-picker/pickerNavigation.ts new file mode 100644 index 0000000000..24a5643c6b --- /dev/null +++ b/webview-ui/src/components/chat/model-picker/pickerNavigation.ts @@ -0,0 +1,30 @@ +import type { KeyboardEvent } from "react" + +/** Native buttons retain Tab/Enter/Space; arrows also move from search into the result set. */ +export function handlePickerNavigation(event: KeyboardEvent) { + if (event.defaultPrevented || !["ArrowDown", "ArrowUp", "Home", "End"].includes(event.key)) return + const target = event.target + if (!(target instanceof HTMLElement)) return + const fromSearch = target instanceof HTMLInputElement + if (fromSearch && (event.key === "Home" || event.key === "End")) return + if (!fromSearch && !target.matches("[data-picker-result]")) return + const buttons = Array.from( + event.currentTarget.querySelectorAll("button[data-picker-result]:not(:disabled)"), + ) + if (!buttons.length) return + event.preventDefault() + const index = buttons.findIndex((button) => button === target) + const next = + event.key === "Home" + ? 0 + : event.key === "End" + ? buttons.length - 1 + : event.key === "ArrowDown" + ? (index + 1) % buttons.length + : index < 0 + ? buttons.length - 1 + : (index - 1 + buttons.length) % buttons.length + buttons[next].focus() +} + +export const pickerResultsClassName = "h-[300px] shrink-0 overflow-y-auto" diff --git a/webview-ui/src/components/chat/model-picker/profileModelPatches.ts b/webview-ui/src/components/chat/model-picker/profileModelPatches.ts new file mode 100644 index 0000000000..c493c86f4a --- /dev/null +++ b/webview-ui/src/components/chat/model-picker/profileModelPatches.ts @@ -0,0 +1,33 @@ +import { + isRetiredProvider, + providerIdentifiers, + type ProviderSettings, + type ReasoningEffortExtended, +} from "@roo-code/types" + +import { getProviderModelConfig, handleModelChangeSideEffects } from "@/components/settings/utils/providerModelConfig" + +/** Wire patch for updateProfileModel.values.patch. Null deletes; nested metadata is effort-only. */ +export type ProfileModelPatch = { + [K in Exclude]?: ProviderSettings[K] | null +} & { openAiCustomModelInfo?: { reasoningEffort: ReasoningEffortExtended | null } } + +export function createModelPatch(config: ProviderSettings, id: string): ProfileModelPatch { + const provider = config.apiProvider ?? providerIdentifiers.openrouter + if (isRetiredProvider(provider)) throw new Error("A supported provider is required") + const field = getProviderModelConfig(provider, config)?.field + if (!field || !id.trim()) throw new Error("A supported provider and non-empty model ID are required") + if ( + provider === providerIdentifiers.bedrock && + (id.trim().startsWith("arn:") || (id === "custom-arn" && !config.awsCustomArn)) + ) { + throw new Error("Configure a custom Bedrock ARN in Settings") + } + + const patch: ProfileModelPatch = { [field]: id, enableReasoningEffort: null } + handleModelChangeSideEffects(provider, id, (key, value) => { + Object.assign(patch, { [key]: value === undefined || value === "" ? null : value }) + }) + if (provider === providerIdentifiers.openai) patch.openAiCustomModelInfo = { reasoningEffort: null } + return patch +} diff --git a/webview-ui/src/components/chat/model-picker/reasoning.ts b/webview-ui/src/components/chat/model-picker/reasoning.ts new file mode 100644 index 0000000000..effc48261a --- /dev/null +++ b/webview-ui/src/components/chat/model-picker/reasoning.ts @@ -0,0 +1,94 @@ +import { + providerIdentifiers, + reasoningEfforts, + reasoningEffortSettingValues, + type ModelInfo, + type ProviderSettings, + type ReasoningEffortExtended, +} from "@roo-code/types" + +import type { ProfileModelPatch } from "./profileModelPatches" + +export type ReasoningOption = ReasoningEffortExtended | "disable" + +export interface ReasoningSelection { + supportedOptions: readonly ReasoningOption[] + currentEffort: ReasoningOption | undefined + reasoningEnabled: boolean +} + +const MANUAL_OPTIONS: readonly ReasoningOption[] = ["disable", "low", "medium", "high", "xhigh", "max"] + +/** Pure effective selection; unlike Settings, this never persists normalized defaults on mount. */ +export function getReasoningSelection(config: ProviderSettings, modelInfo?: ModelInfo): ReasoningSelection { + const manual = config.apiProvider === providerIdentifiers.openai + const supports = modelInfo?.supportsReasoningEffort + const required = !manual && modelInfo?.requiredReasoningEffort === true + const supportedOptions: readonly ReasoningOption[] = manual + ? MANUAL_OPTIONS + : supports === true + ? required + ? reasoningEfforts + : ["disable", ...reasoningEfforts] + : Array.isArray(supports) + ? supports.filter((effort) => !required || effort !== "disable") + : [] + if (!supportedOptions.length) { + return { + supportedOptions, + currentEffort: undefined, + reasoningEnabled: + !!modelInfo && + (modelInfo.requiredReasoningBudget === true || + ((modelInfo.supportsReasoningBinary || modelInfo.supportsReasoningBudget) === true && + config.enableReasoningEffort === true)), + } + } + + const stored = manual ? config.openAiCustomModelInfo?.reasoningEffort : config.reasoningEffort + const declaredDefault = manual ? undefined : modelInfo?.reasoningEffort + const defaultEffort = declaredDefault ?? (manual ? "low" : required ? "medium" : "disable") + const fallback = supportedOptions.includes(defaultEffort) ? defaultEffort : supportedOptions[0] + // A false flag must not display an enabled effort; unset still follows model defaults. + const disabled = + !required && (manual ? config.enableReasoningEffort !== true : config.enableReasoningEffort === false) + const currentEffort = disabled + ? supportedOptions.includes("disable") + ? "disable" + : undefined + : stored && supportedOptions.includes(stored) + ? stored + : fallback + return { + supportedOptions, + currentEffort, + reasoningEnabled: currentEffort !== undefined && currentEffort !== "disable", + } +} + +/** Pass modelInfo to reject choices outside the advertised capability. Without it, validates + * the wire enum only (manual OpenAI choices are always validated). Null restores defaults. + */ +export function createReasoningPatch( + config: ProviderSettings, + effort: ReasoningOption | null, + modelInfo?: ModelInfo, +): ProfileModelPatch { + const manual = config.apiProvider === providerIdentifiers.openai + if ( + effort !== null && + (!reasoningEffortSettingValues.includes(effort) || + ((manual || modelInfo !== undefined) && + !getReasoningSelection(config, modelInfo).supportedOptions.includes(effort))) + ) { + throw new Error("Unsupported reasoning effort") + } + if (manual) { + return { + enableReasoningEffort: effort === null ? null : effort !== "disable", + reasoningEffort: null, + openAiCustomModelInfo: { reasoningEffort: effort === "disable" ? null : effort }, + } + } + return { reasoningEffort: effort, enableReasoningEffort: effort === null ? null : effort !== "disable" } +} diff --git a/webview-ui/src/components/chat/model-picker/useModelPickerSubmit.ts b/webview-ui/src/components/chat/model-picker/useModelPickerSubmit.ts new file mode 100644 index 0000000000..8a00e32aca --- /dev/null +++ b/webview-ui/src/components/chat/model-picker/useModelPickerSubmit.ts @@ -0,0 +1,23 @@ +import { useCallback } from "react" +import type { ProviderName } from "@roo-code/types" + +import { vscode } from "@/utils/vscode" +import type { ProfileModelPatch } from "./profileModelPatches" + +export function useModelPickerSubmit( + profileName: string | undefined, + provider: ProviderName | undefined, + disabled: boolean, +) { + return useCallback( + (patch: ProfileModelPatch) => { + if (disabled || !profileName || !provider) return + vscode.postMessage({ + type: "updateProfileModel", + text: profileName, + values: { expectedProvider: provider, patch }, + }) + }, + [profileName, provider, disabled], + ) +} diff --git a/webview-ui/src/components/chat/model-picker/useModelSearch.ts b/webview-ui/src/components/chat/model-picker/useModelSearch.ts new file mode 100644 index 0000000000..60ae68411b --- /dev/null +++ b/webview-ui/src/components/chat/model-picker/useModelSearch.ts @@ -0,0 +1,30 @@ +import { useMemo } from "react" +import { Fzf } from "fzf" +import { providerIdentifiers, type ModelRecord, type ProviderName } from "@roo-code/types" + +export function useModelSearch( + models: ModelRecord | null, + selectedId: string | undefined, + search: string, + provider: ProviderName | undefined, + allowCustomArn: boolean, +) { + const items = useMemo( + () => + Object.entries(models ?? {}) + .filter(([id, info]) => !info.deprecated || id === selectedId) + .filter( + ([id]) => + provider !== providerIdentifiers.bedrock || + (!id.startsWith("arn:") && (id !== "custom-arn" || allowCustomArn)), + ) + .map(([id, info]) => ({ id, info })) + .sort((a, b) => a.id.localeCompare(b.id)), + [models, selectedId, provider, allowCustomArn], + ) + const fzf = useMemo( + () => new Fzf(items, { selector: ({ id, info }) => `${id} ${info.displayName ?? ""}` }), + [items], + ) + return useMemo(() => (search ? fzf.find(search).map(({ item }) => item) : items), [fzf, items, search]) +} diff --git a/webview-ui/src/components/chat/model-picker/useOpenAiModelCatalog.ts b/webview-ui/src/components/chat/model-picker/useOpenAiModelCatalog.ts new file mode 100644 index 0000000000..cb2adf8309 --- /dev/null +++ b/webview-ui/src/components/chat/model-picker/useOpenAiModelCatalog.ts @@ -0,0 +1,55 @@ +import { useCallback, useEffect, useMemo, useState } from "react" + +import { openAiModelInfoSaneDefaults, type ModelRecord } from "@roo-code/types" + +import { discoverOpenAiModels, type OpenAiDiscoverySettings } from "./openAiModelDiscovery" + +type DiscoveryState = { + identity: OpenAiDiscoverySettings + attempt: number + models: ModelRecord | null + isError: boolean +} + +export function useOpenAiModelCatalog(settings: OpenAiDiscoverySettings, enabled: boolean) { + const { openAiBaseUrl, openAiApiKey, openAiHeaders } = settings + const identity = useMemo( + () => ({ openAiBaseUrl, openAiApiKey, openAiHeaders, enabled }), + [openAiBaseUrl, openAiApiKey, openAiHeaders, enabled], + ) + const [attempt, setAttempt] = useState(0) + const [state, setState] = useState() + const refetch = useCallback(() => setAttempt((value) => value + 1), []) + // Discovery, unlike inference, has no default base URL or API key. Missing values + // stay settings-only, matching the host's explicit base URL + API key requirement. + const canDiscover = enabled && !!openAiBaseUrl && !!openAiApiKey + + useEffect(() => { + if (!canDiscover) return + const controller = new AbortController() + void discoverOpenAiModels(identity, controller.signal).then( + (ids) => { + if (controller.signal.aborted) return + setState({ + identity, + attempt, + models: Object.fromEntries(ids.map((id) => [id, { ...openAiModelInfoSaneDefaults }])), + isError: false, + }) + }, + () => { + if (!controller.signal.aborted) setState({ identity, attempt, models: null, isError: true }) + }, + ) + return () => controller.abort() + }, [identity, attempt, canDiscover]) + + // Hide the previous profile's result synchronously, before effect cleanup runs. + const current = canDiscover && state?.identity === identity && state.attempt === attempt ? state : undefined + return { + models: current?.models ?? null, + isLoading: canDiscover && !current, + isError: (enabled && !canDiscover) || (current?.isError ?? false), + refetch, + } +} diff --git a/webview-ui/src/components/chat/model-picker/useProfileModelCatalog.ts b/webview-ui/src/components/chat/model-picker/useProfileModelCatalog.ts new file mode 100644 index 0000000000..a0647bec36 --- /dev/null +++ b/webview-ui/src/components/chat/model-picker/useProfileModelCatalog.ts @@ -0,0 +1,74 @@ +import { + isRetiredProvider, + providerIdentifiers, + type ModelRecord, + type ProviderName, + type ProviderSettings, +} from "@roo-code/types" + +import { useRouterModels } from "@/components/ui/hooks/useRouterModels" +import { + getProviderModelConfig, + getStaticModelsForProvider, + isStaticModelProvider, +} from "@/components/settings/utils/providerModelConfig" + +import { useOpenAiModelCatalog } from "./useOpenAiModelCatalog" + +export const MODEL_CATALOG_SETTINGS_FALLBACK = "Choose this provider's model in Settings." + +export interface ProfileModelCatalog { + provider: ProviderName | undefined + field: keyof ProviderSettings | undefined + models: ModelRecord | null + isLoading: boolean + isError: boolean + isUnsupported: boolean + /** Present for settings-only providers or discovery failures/missing configuration. */ + fallbackMessage: string | undefined + refetch: () => void +} + +/** Raw catalog only: consumers MUST apply filterModels(models, provider, organizationAllowList) + * before presenting choices. Also hide Bedrock's custom-arn pseudo-choice unless an ARN exists. + * Requires the app's QueryClientProvider; never writes or optimistically replaces a profile. + */ +export function useProfileModelCatalog(apiConfiguration: ProviderSettings): ProfileModelCatalog { + const rawProvider = apiConfiguration.apiProvider ?? providerIdentifiers.openrouter + const provider = isRetiredProvider(rawProvider) ? undefined : rawProvider + const field = provider ? getProviderModelConfig(provider, apiConfiguration)?.field : undefined + const isUnsupported = + !provider || + !field || + provider === providerIdentifiers.ollama || + provider === providerIdentifiers.lmstudio || + provider === providerIdentifiers.vscodeLm + const isOpenAi = provider === providerIdentifiers.openai && !isUnsupported + const isStatic = !!provider && isStaticModelProvider(provider) + const fetchRouter = !isUnsupported && !isOpenAi && (!isStatic || provider === providerIdentifiers.friendli) + const router = useRouterModels({ provider, enabled: fetchRouter }) + const openAi = useOpenAiModelCatalog(apiConfiguration, isOpenAi) + const isError = !isUnsupported && (isOpenAi ? openAi.isError : fetchRouter && router.isError) + const models = + isUnsupported || !provider + ? null + : isOpenAi + ? openAi.models + : isStatic + ? getStaticModelsForProvider(provider, undefined, apiConfiguration, router.data) + : ((router.data as Partial> | undefined)?.[provider] ?? null) + + return { + provider, + field: isUnsupported ? undefined : field, + models, + isLoading: !isUnsupported && (isOpenAi ? openAi.isLoading : !isStatic && router.isLoading), + isError, + isUnsupported, + fallbackMessage: isUnsupported || isError ? MODEL_CATALOG_SETTINGS_FALLBACK : undefined, + refetch: () => { + if (isOpenAi) openAi.refetch() + else if (fetchRouter) void router.refetch() + }, + } +} diff --git a/webview-ui/src/i18n/locales/ca/chat.json b/webview-ui/src/i18n/locales/ca/chat.json index 2d26f0a76f..4ed25fda9a 100644 --- a/webview-ui/src/i18n/locales/ca/chat.json +++ b/webview-ui/src/i18n/locales/ca/chat.json @@ -1,4 +1,25 @@ { + "modelPicker": { + "profile": "Perfil:", + "selectProfile": "Tria un perfil", + "loadingProfile": "S'està carregant el perfil…", + "searchModels": "Cerca models", + "providerModels": "Models del proveïdor actual", + "modelSettingsHint": "Tria un model a la configuració del perfil.", + "clearSearch": "Esborra la cerca", + "reasoningEffort": "Esforç de raonament", + "reasoningEffortValue": "Esforç de raonament: {{effort}}", + "off": "Desactivat", + "effort": { + "none": "Cap", + "minimal": "Mínim", + "low": "Baix", + "medium": "Mitjà", + "high": "Alt", + "xhigh": "Molt alt", + "max": "Màxim" + } + }, "task": { "title": "Tasca", "expand": "Expandir tasca", diff --git a/webview-ui/src/i18n/locales/de/chat.json b/webview-ui/src/i18n/locales/de/chat.json index dacd85c138..3c235c0efd 100644 --- a/webview-ui/src/i18n/locales/de/chat.json +++ b/webview-ui/src/i18n/locales/de/chat.json @@ -1,4 +1,25 @@ { + "modelPicker": { + "profile": "Profil:", + "selectProfile": "Profil auswählen", + "loadingProfile": "Profil wird geladen…", + "searchModels": "Modelle suchen", + "providerModels": "Modelle des aktuellen Anbieters", + "modelSettingsHint": "Wähle ein Modell in den Profileinstellungen aus.", + "clearSearch": "Suche leeren", + "reasoningEffort": "Denkaufwand", + "reasoningEffortValue": "Denkaufwand: {{effort}}", + "off": "Aus", + "effort": { + "none": "Keiner", + "minimal": "Minimal", + "low": "Niedrig", + "medium": "Mittel", + "high": "Hoch", + "xhigh": "Sehr hoch", + "max": "Maximal" + } + }, "task": { "title": "Aufgabe", "expand": "Aufgabe erweitern", diff --git a/webview-ui/src/i18n/locales/en/chat.json b/webview-ui/src/i18n/locales/en/chat.json index 154c54ac86..fec9bf3edf 100644 --- a/webview-ui/src/i18n/locales/en/chat.json +++ b/webview-ui/src/i18n/locales/en/chat.json @@ -1,4 +1,25 @@ { + "modelPicker": { + "profile": "Profile:", + "selectProfile": "Choose profile", + "loadingProfile": "Loading profile…", + "searchModels": "Search models", + "providerModels": "Models from the current provider", + "modelSettingsHint": "Choose a model in the profile settings.", + "clearSearch": "Clear search", + "reasoningEffort": "Reasoning effort", + "reasoningEffortValue": "Reasoning effort: {{effort}}", + "off": "Off", + "effort": { + "none": "None", + "minimal": "Minimal", + "low": "Low", + "medium": "Medium", + "high": "High", + "xhigh": "Extra high", + "max": "Max" + } + }, "task": { "title": "Task", "expand": "Expand task", diff --git a/webview-ui/src/i18n/locales/es/chat.json b/webview-ui/src/i18n/locales/es/chat.json index b06a430390..7b34a40dd2 100644 --- a/webview-ui/src/i18n/locales/es/chat.json +++ b/webview-ui/src/i18n/locales/es/chat.json @@ -1,4 +1,25 @@ { + "modelPicker": { + "profile": "Perfil:", + "selectProfile": "Elige un perfil", + "loadingProfile": "Cargando perfil…", + "searchModels": "Buscar modelos", + "providerModels": "Modelos del proveedor actual", + "modelSettingsHint": "Elige un modelo en la configuración del perfil.", + "clearSearch": "Borrar búsqueda", + "reasoningEffort": "Esfuerzo de razonamiento", + "reasoningEffortValue": "Esfuerzo de razonamiento: {{effort}}", + "off": "Desactivado", + "effort": { + "none": "Ninguno", + "minimal": "Mínimo", + "low": "Bajo", + "medium": "Medio", + "high": "Alto", + "xhigh": "Muy alto", + "max": "Máximo" + } + }, "task": { "title": "Tarea", "expand": "Expandir tarea", diff --git a/webview-ui/src/i18n/locales/fr/chat.json b/webview-ui/src/i18n/locales/fr/chat.json index da67cefa6b..9d652ed587 100644 --- a/webview-ui/src/i18n/locales/fr/chat.json +++ b/webview-ui/src/i18n/locales/fr/chat.json @@ -1,4 +1,25 @@ { + "modelPicker": { + "profile": "Profil :", + "selectProfile": "Choisir un profil", + "loadingProfile": "Chargement du profil…", + "searchModels": "Rechercher des modèles", + "providerModels": "Modèles du fournisseur actuel", + "modelSettingsHint": "Choisis un modèle dans les paramètres du profil.", + "clearSearch": "Effacer la recherche", + "reasoningEffort": "Effort de raisonnement", + "reasoningEffortValue": "Effort de raisonnement : {{effort}}", + "off": "Désactivé", + "effort": { + "none": "Aucun", + "minimal": "Minimal", + "low": "Faible", + "medium": "Moyen", + "high": "Élevé", + "xhigh": "Très élevé", + "max": "Maximal" + } + }, "task": { "title": "Tâche", "expand": "Développer la tâche", diff --git a/webview-ui/src/i18n/locales/hi/chat.json b/webview-ui/src/i18n/locales/hi/chat.json index 78868aea1a..90de2010da 100644 --- a/webview-ui/src/i18n/locales/hi/chat.json +++ b/webview-ui/src/i18n/locales/hi/chat.json @@ -1,4 +1,25 @@ { + "modelPicker": { + "profile": "प्रोफ़ाइल:", + "selectProfile": "प्रोफ़ाइल चुनो", + "loadingProfile": "प्रोफ़ाइल लोड हो रही है…", + "searchModels": "मॉडल खोजो", + "providerModels": "मौजूदा प्रदाता के मॉडल", + "modelSettingsHint": "प्रोफ़ाइल सेटिंग में मॉडल चुनो।", + "clearSearch": "खोज साफ़ करो", + "reasoningEffort": "तर्क की गहराई", + "reasoningEffortValue": "तर्क की गहराई: {{effort}}", + "off": "बंद", + "effort": { + "none": "कोई नहीं", + "minimal": "न्यूनतम", + "low": "कम", + "medium": "मध्यम", + "high": "अधिक", + "xhigh": "बहुत अधिक", + "max": "अधिकतम" + } + }, "task": { "title": "कार्य", "expand": "कार्य विस्तृत करें", diff --git a/webview-ui/src/i18n/locales/id/chat.json b/webview-ui/src/i18n/locales/id/chat.json index e52338371e..0403c7ab87 100644 --- a/webview-ui/src/i18n/locales/id/chat.json +++ b/webview-ui/src/i18n/locales/id/chat.json @@ -1,4 +1,25 @@ { + "modelPicker": { + "profile": "Profil:", + "selectProfile": "Pilih profil", + "loadingProfile": "Memuat profil…", + "searchModels": "Cari model", + "providerModels": "Model dari penyedia saat ini", + "modelSettingsHint": "Pilih model di pengaturan profil.", + "clearSearch": "Hapus pencarian", + "reasoningEffort": "Upaya penalaran", + "reasoningEffortValue": "Upaya penalaran: {{effort}}", + "off": "Nonaktif", + "effort": { + "none": "Tanpa penalaran", + "minimal": "Minimal", + "low": "Rendah", + "medium": "Sedang", + "high": "Tinggi", + "xhigh": "Sangat tinggi", + "max": "Maksimal" + } + }, "task": { "title": "Tugas", "expand": "Perluas tugas", diff --git a/webview-ui/src/i18n/locales/it/chat.json b/webview-ui/src/i18n/locales/it/chat.json index 2c598aa32a..890c9912c4 100644 --- a/webview-ui/src/i18n/locales/it/chat.json +++ b/webview-ui/src/i18n/locales/it/chat.json @@ -1,4 +1,25 @@ { + "modelPicker": { + "profile": "Profilo:", + "selectProfile": "Scegli un profilo", + "loadingProfile": "Caricamento del profilo…", + "searchModels": "Cerca modelli", + "providerModels": "Modelli del fornitore attuale", + "modelSettingsHint": "Scegli un modello nelle impostazioni del profilo.", + "clearSearch": "Cancella la ricerca", + "reasoningEffort": "Sforzo di ragionamento", + "reasoningEffortValue": "Sforzo di ragionamento: {{effort}}", + "off": "Disattivato", + "effort": { + "none": "Nessuno", + "minimal": "Minimo", + "low": "Basso", + "medium": "Medio", + "high": "Alto", + "xhigh": "Molto alto", + "max": "Massimo" + } + }, "task": { "title": "Attività", "expand": "Espandi attività", diff --git a/webview-ui/src/i18n/locales/ja/chat.json b/webview-ui/src/i18n/locales/ja/chat.json index 480fbe40a8..48460d9b47 100644 --- a/webview-ui/src/i18n/locales/ja/chat.json +++ b/webview-ui/src/i18n/locales/ja/chat.json @@ -1,4 +1,25 @@ { + "modelPicker": { + "profile": "プロファイル:", + "selectProfile": "プロファイルを選択", + "loadingProfile": "プロファイルを読み込み中…", + "searchModels": "モデルを検索", + "providerModels": "現在のプロバイダーのモデル", + "modelSettingsHint": "プロファイル設定でモデルを選択してね。", + "clearSearch": "検索をクリア", + "reasoningEffort": "推論の深さ", + "reasoningEffortValue": "推論の深さ: {{effort}}", + "off": "オフ", + "effort": { + "none": "なし", + "minimal": "最小", + "low": "低", + "medium": "中", + "high": "高", + "xhigh": "非常に高い", + "max": "最大" + } + }, "task": { "title": "タスク", "expand": "タスクを展開", diff --git a/webview-ui/src/i18n/locales/ko/chat.json b/webview-ui/src/i18n/locales/ko/chat.json index 6fcbaf5861..2242fc3b3b 100644 --- a/webview-ui/src/i18n/locales/ko/chat.json +++ b/webview-ui/src/i18n/locales/ko/chat.json @@ -1,4 +1,25 @@ { + "modelPicker": { + "profile": "프로필:", + "selectProfile": "프로필 선택", + "loadingProfile": "프로필 불러오는 중…", + "searchModels": "모델 검색", + "providerModels": "현재 제공업체의 모델", + "modelSettingsHint": "프로필 설정에서 모델을 선택해 줘.", + "clearSearch": "검색 지우기", + "reasoningEffort": "추론 강도", + "reasoningEffortValue": "추론 강도: {{effort}}", + "off": "끄기", + "effort": { + "none": "없음", + "minimal": "최소", + "low": "낮음", + "medium": "보통", + "high": "높음", + "xhigh": "매우 높음", + "max": "최대" + } + }, "task": { "title": "작업", "expand": "작업 펼치기", diff --git a/webview-ui/src/i18n/locales/nl/chat.json b/webview-ui/src/i18n/locales/nl/chat.json index 70bf979678..4051e50bbb 100644 --- a/webview-ui/src/i18n/locales/nl/chat.json +++ b/webview-ui/src/i18n/locales/nl/chat.json @@ -1,4 +1,25 @@ { + "modelPicker": { + "profile": "Profiel:", + "selectProfile": "Profiel kiezen", + "loadingProfile": "Profiel laden…", + "searchModels": "Modellen zoeken", + "providerModels": "Modellen van de huidige aanbieder", + "modelSettingsHint": "Kies een model in de profielinstellingen.", + "clearSearch": "Zoekopdracht wissen", + "reasoningEffort": "Redeneerinspanning", + "reasoningEffortValue": "Redeneerinspanning: {{effort}}", + "off": "Uit", + "effort": { + "none": "Geen", + "minimal": "Minimaal", + "low": "Laag", + "medium": "Gemiddeld", + "high": "Hoog", + "xhigh": "Zeer hoog", + "max": "Maximaal" + } + }, "task": { "title": "Taak", "expand": "Taak uitvouwen", diff --git a/webview-ui/src/i18n/locales/pl/chat.json b/webview-ui/src/i18n/locales/pl/chat.json index 0cfb5d95da..b464c52c3e 100644 --- a/webview-ui/src/i18n/locales/pl/chat.json +++ b/webview-ui/src/i18n/locales/pl/chat.json @@ -1,4 +1,25 @@ { + "modelPicker": { + "profile": "Profil:", + "selectProfile": "Wybierz profil", + "loadingProfile": "Ładowanie profilu…", + "searchModels": "Szukaj modeli", + "providerModels": "Modele bieżącego dostawcy", + "modelSettingsHint": "Wybierz model w ustawieniach profilu.", + "clearSearch": "Wyczyść wyszukiwanie", + "reasoningEffort": "Intensywność rozumowania", + "reasoningEffortValue": "Intensywność rozumowania: {{effort}}", + "off": "Wył.", + "effort": { + "none": "Brak", + "minimal": "Minimalna", + "low": "Niska", + "medium": "Średnia", + "high": "Wysoka", + "xhigh": "Bardzo wysoka", + "max": "Maksymalna" + } + }, "task": { "title": "Zadanie", "expand": "Rozwiń zadanie", diff --git a/webview-ui/src/i18n/locales/pt-BR/chat.json b/webview-ui/src/i18n/locales/pt-BR/chat.json index 36548aab7d..d93e204c4a 100644 --- a/webview-ui/src/i18n/locales/pt-BR/chat.json +++ b/webview-ui/src/i18n/locales/pt-BR/chat.json @@ -1,4 +1,25 @@ { + "modelPicker": { + "profile": "Perfil:", + "selectProfile": "Escolher perfil", + "loadingProfile": "Carregando perfil…", + "searchModels": "Buscar modelos", + "providerModels": "Modelos do provedor atual", + "modelSettingsHint": "Escolha um modelo nas configurações do perfil.", + "clearSearch": "Limpar busca", + "reasoningEffort": "Esforço de raciocínio", + "reasoningEffortValue": "Esforço de raciocínio: {{effort}}", + "off": "Desativado", + "effort": { + "none": "Nenhum", + "minimal": "Mínimo", + "low": "Baixo", + "medium": "Médio", + "high": "Alto", + "xhigh": "Muito alto", + "max": "Máximo" + } + }, "task": { "title": "Tarefa", "expand": "Expandir tarefa", diff --git a/webview-ui/src/i18n/locales/ru/chat.json b/webview-ui/src/i18n/locales/ru/chat.json index c350fe1c45..bba0ba53ca 100644 --- a/webview-ui/src/i18n/locales/ru/chat.json +++ b/webview-ui/src/i18n/locales/ru/chat.json @@ -1,4 +1,25 @@ { + "modelPicker": { + "profile": "Профиль:", + "selectProfile": "Выбрать профиль", + "loadingProfile": "Загрузка профиля…", + "searchModels": "Поиск моделей", + "providerModels": "Модели текущего провайдера", + "modelSettingsHint": "Выбери модель в настройках профиля.", + "clearSearch": "Очистить поиск", + "reasoningEffort": "Глубина рассуждений", + "reasoningEffortValue": "Глубина рассуждений: {{effort}}", + "off": "Выкл.", + "effort": { + "none": "Без рассуждений", + "minimal": "Минимальная", + "low": "Низкая", + "medium": "Средняя", + "high": "Высокая", + "xhigh": "Очень высокая", + "max": "Максимальная" + } + }, "task": { "title": "Задача", "expand": "Развернуть задачу", diff --git a/webview-ui/src/i18n/locales/tr/chat.json b/webview-ui/src/i18n/locales/tr/chat.json index ae70fbd967..635e42720a 100644 --- a/webview-ui/src/i18n/locales/tr/chat.json +++ b/webview-ui/src/i18n/locales/tr/chat.json @@ -1,4 +1,25 @@ { + "modelPicker": { + "profile": "Profil:", + "selectProfile": "Profil seç", + "loadingProfile": "Profil yükleniyor…", + "searchModels": "Model ara", + "providerModels": "Geçerli sağlayıcının modelleri", + "modelSettingsHint": "Profil ayarlarından bir model seç.", + "clearSearch": "Aramayı temizle", + "reasoningEffort": "Akıl yürütme çabası", + "reasoningEffortValue": "Akıl yürütme çabası: {{effort}}", + "off": "Kapalı", + "effort": { + "none": "Yok", + "minimal": "Asgari", + "low": "Düşük", + "medium": "Orta", + "high": "Yüksek", + "xhigh": "Çok yüksek", + "max": "Azami" + } + }, "task": { "title": "Görev", "expand": "Görevi genişlet", diff --git a/webview-ui/src/i18n/locales/vi/chat.json b/webview-ui/src/i18n/locales/vi/chat.json index f2b08ec110..3a1e29ad5c 100644 --- a/webview-ui/src/i18n/locales/vi/chat.json +++ b/webview-ui/src/i18n/locales/vi/chat.json @@ -1,4 +1,25 @@ { + "modelPicker": { + "profile": "Hồ sơ:", + "selectProfile": "Chọn hồ sơ", + "loadingProfile": "Đang tải hồ sơ…", + "searchModels": "Tìm mô hình", + "providerModels": "Mô hình của nhà cung cấp hiện tại", + "modelSettingsHint": "Chọn mô hình trong phần cài đặt hồ sơ.", + "clearSearch": "Xóa tìm kiếm", + "reasoningEffort": "Mức độ suy luận", + "reasoningEffortValue": "Mức độ suy luận: {{effort}}", + "off": "Tắt", + "effort": { + "none": "Không", + "minimal": "Tối thiểu", + "low": "Thấp", + "medium": "Trung bình", + "high": "Cao", + "xhigh": "Rất cao", + "max": "Tối đa" + } + }, "task": { "title": "Nhiệm vụ", "expand": "Mở rộng nhiệm vụ", diff --git a/webview-ui/src/i18n/locales/zh-CN/chat.json b/webview-ui/src/i18n/locales/zh-CN/chat.json index 4edfa1da27..2f5ab67e07 100644 --- a/webview-ui/src/i18n/locales/zh-CN/chat.json +++ b/webview-ui/src/i18n/locales/zh-CN/chat.json @@ -1,4 +1,25 @@ { + "modelPicker": { + "profile": "配置:", + "selectProfile": "选择配置", + "loadingProfile": "正在加载配置…", + "searchModels": "搜索模型", + "providerModels": "当前提供商的模型", + "modelSettingsHint": "在配置设置中选择模型。", + "clearSearch": "清除搜索", + "reasoningEffort": "推理强度", + "reasoningEffortValue": "推理强度:{{effort}}", + "off": "关闭", + "effort": { + "none": "无", + "minimal": "最低", + "low": "低", + "medium": "中", + "high": "高", + "xhigh": "超高", + "max": "最高" + } + }, "task": { "title": "任务", "expand": "展开任务", diff --git a/webview-ui/src/i18n/locales/zh-TW/chat.json b/webview-ui/src/i18n/locales/zh-TW/chat.json index 7612d282f4..8cec3ae8cd 100644 --- a/webview-ui/src/i18n/locales/zh-TW/chat.json +++ b/webview-ui/src/i18n/locales/zh-TW/chat.json @@ -1,4 +1,25 @@ { + "modelPicker": { + "profile": "設定檔:", + "selectProfile": "選擇設定檔", + "loadingProfile": "正在載入設定檔…", + "searchModels": "搜尋模型", + "providerModels": "目前供應商的模型", + "modelSettingsHint": "在設定檔設定中選擇模型。", + "clearSearch": "清除搜尋", + "reasoningEffort": "推理強度", + "reasoningEffortValue": "推理強度:{{effort}}", + "off": "關閉", + "effort": { + "none": "無", + "minimal": "最低", + "low": "低", + "medium": "中", + "high": "高", + "xhigh": "超高", + "max": "最高" + } + }, "task": { "title": "工作", "expand": "展開工作", From 3f12d7cbdcceaaf5309de51122c3a0bd31612d25 Mon Sep 17 00:00:00 2001 From: gubin-dev Date: Tue, 17 Nov 2026 16:54:37 +0300 Subject: [PATCH 2/4] fix(chat): harden model picker and reach full patch coverage --- .../electron-chat-dark-sidebar.png | Bin 28998 -> 30210 bytes packages/types/src/vscode-extension-host.ts | 2 + src/api/providers/openai.ts | 11 +- .../__tests__/providerInfoHandler.spec.ts | 138 ++++++++++++++++ .../__tests__/webviewMessageHandler.spec.ts | 140 ++++------------ src/core/webview/providerInfoHandler.ts | 3 + src/core/webview/webviewMessageHandler.ts | 54 ++---- .../gallery/UnifiedModelPicker.fixture.tsx | 40 +++-- .../src/components/chat/ApiConfigSelector.tsx | 117 +++++++------ .../src/components/chat/ModelSelector.tsx | 154 ++++++++++++++++++ .../components/chat/ProfileQuickSettings.tsx | 54 +++--- .../chat/__tests__/ApiConfigSelector.spec.tsx | 36 +++- .../ModelPicker.integration.spec.tsx | 18 +- .../__tests__/ProfileQuickSettings.spec.tsx | 57 ++++++- .../__tests__/UnifiedModelPicker.visual.tsx | 43 ++++- .../chat-composer-resting-dark.png | Bin 9801 -> 9837 bytes ...t-composer-resting-high-contrast-light.png | Bin 10292 -> 10330 bytes .../chat-composer-resting-high-contrast.png | Bin 10313 -> 10389 bytes .../chat-composer-resting-light.png | Bin 10017 -> 10066 bytes .../chat/__tests__/pickerTestFocus.spec.ts | 52 ++++++ .../chat/model-picker/ModelResults.tsx | 102 ------------ .../__tests__/openAiModelDiscovery.spec.tsx | 55 +++++-- .../__tests__/pickerNavigation.spec.tsx | 93 +++++++++++ .../__tests__/profileModelPatches.spec.ts | 27 ++- .../model-picker/__tests__/reasoning.spec.ts | 39 +++++ .../__tests__/useModelPickerSubmit.spec.tsx | 43 +++++ .../__tests__/useOpenAiModelCatalog.spec.tsx | 32 ++++ ...seProfileModelCatalog.integration.spec.tsx | 102 ++++++++++++ .../__tests__/useProfileModelCatalog.spec.tsx | 68 +++++++- .../chat/model-picker/openAiModelDiscovery.ts | 63 +------ .../components/chat/model-picker/reasoning.ts | 12 ++ .../chat/model-picker/useModelSearch.ts | 30 ---- .../model-picker/useOpenAiModelCatalog.ts | 26 +-- .../model-picker/useProfileModelCatalog.ts | 5 +- .../__tests__/providerInfoHooks.spec.tsx | 62 +++++++ .../hooks/__tests__/useRouterModels.spec.ts | 69 ++++++++ .../ui/hooks/requestProviderInfo.ts | 21 ++- .../components/ui/hooks/useRouterModels.ts | 37 +++-- 38 files changed, 1294 insertions(+), 511 deletions(-) create mode 100644 webview-ui/src/components/chat/ModelSelector.tsx create mode 100644 webview-ui/src/components/chat/__tests__/pickerTestFocus.spec.ts delete mode 100644 webview-ui/src/components/chat/model-picker/ModelResults.tsx create mode 100644 webview-ui/src/components/chat/model-picker/__tests__/pickerNavigation.spec.tsx create mode 100644 webview-ui/src/components/chat/model-picker/__tests__/useModelPickerSubmit.spec.tsx create mode 100644 webview-ui/src/components/chat/model-picker/__tests__/useOpenAiModelCatalog.spec.tsx create mode 100644 webview-ui/src/components/chat/model-picker/__tests__/useProfileModelCatalog.integration.spec.tsx delete mode 100644 webview-ui/src/components/chat/model-picker/useModelSearch.ts diff --git a/apps/vscode-e2e/src/visual/__screenshots__/electron-chat-dark-sidebar.png b/apps/vscode-e2e/src/visual/__screenshots__/electron-chat-dark-sidebar.png index dfc6fee680c83b46d93a326a4c9ed2b56c13532f..74cf92c586b585537d76ae13bd4fc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S^(T5UD?tH2@M(R z%F&c^8j-`mY%6+Y|DV*BpFiz4aXRYlsmy-&B|4NO!KiR^!^$4P`$2^-4jlA-0s8a$Z^@zk@@ivWerWpk#4QS z?`)oS_C2T>1@8M^err zepd}H8DiWF-+~ZAjF9>9F_L6U>EYo)D*+}2;L_96_L5B-*WeAonL>6(Q$axi&BD0` z4b%w+20h<>*QCBnB~+>>CM8`TdA0qF&%TeaJS|+bq>8`#_Z3$)W}-u zn!(pj7Tb->O9TEE3J(Yk5#&h!T=%1lQMyW!cM8Y&nPKL;=jPLaeExx(UA`C2{{(9S zg>yjN0wYH(YPzl97dqGyE*l^Yz&dQSs+-C#DOv2loKZ8&+lP1^*(MTHM0^69>=t}o zcJpTcvZ871LUSJa9VjERQxD2SEXLNOC`FCv_~~sT^|anv-BD^E6dI00?Cg(szau8YoX8e ziB+G#Mm4#q{!ou1Xgo$QF5-fU_F|I^b=h>|WE=^}?kkP=kd%_BG4+q??C6M0Pp@?v zt$*@FAeUZ@e!nufAJ_|0u_9=y&?k@nxJ6H(WE}oNyd>2uk|(n^+WVwpV+YqJNre9u zy`(*U0T67XIeb3aCUK}yTKM|-Ryqg~vtRB@#>hN4>r#8V53m`O@ufb0R{P9766&B0 zVKxF&OoptV@7uIojU;>w$ymX5&4$Pho9D}JX~&OGse75+G)w4|wu^@6yc zt(PYPc>;KZrTw-ae!Sc9LObuZ5s|pvjO*FX08!}D_7KGzL;!`C;S(4^vAB&n0)Qv1 zG)?1XKdEnoUp9jB@5q&jCYl@PSzDWulvE%|1KoJJA3QkH;)xBTOi~{2%iqcEx3;P2 zzxtK>(#eau8(~$|5y!JuFXu1cz9cuFxzaf5Bz>7;C}5yfT10u{2MWga_I6j&)=SG1 z!JG3Z%kmKW_@hEG}ZCh1YEfyLvgx z`1r&2nMyBhX9YBm*A|`q!m?dFOsi84UTR;-+k_L@5w;*-KKU% LOQ}e~^7j7#N_ } /** Result of each lookup. The host and the webview share it, so the kind fixes the result type. */ export interface ProviderInfoResultMap { + openAiModels: string[] openRouterKeyInfo: { label: string usage: number diff --git a/src/api/providers/openai.ts b/src/api/providers/openai.ts index 98ea18df8a..2e021b3373 100644 --- a/src/api/providers/openai.ts +++ b/src/api/providers/openai.ts @@ -609,7 +609,12 @@ export class OpenAiHandler extends BaseProvider implements SingleCompletionHandl } } -export async function getOpenAiModels(baseUrl?: string, apiKey?: string, openAiHeaders?: Record) { +export async function getOpenAiModels( + baseUrl?: string, + apiKey?: string, + openAiHeaders?: Record, + options: { throwOnError?: boolean } = {}, +) { try { if (!baseUrl) { return [] @@ -639,7 +644,9 @@ export async function getOpenAiModels(baseUrl?: string, apiKey?: string, openAiH const response = await axios.get(`${trimmedBaseUrl}/models`, config) const modelsArray = response.data?.data?.map((model: any) => model.id) || [] return [...new Set(modelsArray)] - } catch { + } catch (error) { + // The provider-info broker needs failures; legacy Settings callers expect an empty list. + if (options.throwOnError) throw error return [] } } diff --git a/src/core/webview/__tests__/providerInfoHandler.spec.ts b/src/core/webview/__tests__/providerInfoHandler.spec.ts index e8c4d66f50..511558e414 100644 --- a/src/core/webview/__tests__/providerInfoHandler.spec.ts +++ b/src/core/webview/__tests__/providerInfoHandler.spec.ts @@ -1,11 +1,36 @@ import type { WebviewMessage } from "@roo-code/types" +import axios, { AxiosError, AxiosHeaders } from "axios" import type { ClineProvider } from "../ClineProvider" import { getOpenRouterModelEndpoints } from "../../../api/providers/fetchers/openrouter" +import { getOpenAiModels } from "../../../api/providers/openai" import { handleRequestProviderInfo } from "../providerInfoHandler" vi.mock("../../../api/providers/fetchers/openrouter", () => ({ getOpenRouterModelEndpoints: vi.fn() })) +const OPENAI_FAILURES = [ + [ + "HTTP 401", + new AxiosError( + "Authorization: secret https://private.test returned 401", + "ERR_BAD_REQUEST", + undefined, + undefined, + { + status: 401, + statusText: "Unauthorized", + data: { error: "secret" }, + headers: {}, + config: { + url: "https://private.test/v1/models", + headers: new AxiosHeaders({ Authorization: "Bearer secret" }), + }, + }, + ), + ], + ["network rejection", new Error("Authorization: secret https://private.test refused")], +] as const + const KEY_INFO = { label: "sk-or-v1-...abc", usage: 12.5, @@ -35,7 +60,9 @@ describe("handleRequestProviderInfo", () => { beforeEach(() => { postMessageToWebview.mockReset() + vi.mocked(provider.log).mockReset() vi.mocked(getOpenRouterModelEndpoints).mockReset() + vi.spyOn(axios, "get").mockResolvedValue({ data: { data: [{ id: "model" }, { id: "model" }] } }) fetchSpy = vi.spyOn(globalThis, "fetch") vi.spyOn(console, "error").mockImplementation(() => {}) }) @@ -44,6 +71,117 @@ describe("handleRequestProviderInfo", () => { vi.restoreAllMocks() }) + it("rejects a request with no values without contacting a provider", async () => { + await send(undefined) + + expect(fetchSpy).not.toHaveBeenCalled() + expect(axios.get).not.toHaveBeenCalled() + expect(getOpenRouterModelEndpoints).not.toHaveBeenCalled() + expect(postMessageToWebview).toHaveBeenCalledExactlyOnceWith({ + type: "providerInfo", + requestId: "req-1", + error: "Invalid provider info request", + }) + }) + + it.each([undefined, {}, { Authorization: "custom-token", "X-Provider": "custom" }])( + "fetches OpenAI models with caller credentials and headers %j", + async (headers) => { + await send({ kind: "openAiModels", baseUrl: "https://compatible.test/v1", apiKey: "secret", headers }) + expect(axios.get).toHaveBeenCalledExactlyOnceWith("https://compatible.test/v1/models", { + headers: expect.objectContaining({ ...headers, Authorization: "Bearer secret" }), + }) + expect(postMessageToWebview).toHaveBeenCalledExactlyOnceWith({ + type: "providerInfo", + requestId: "req-1", + values: { data: ["model"] }, + }) + }, + ) + + it.each([null, "invalid", ["header"], { custom: 42 }])("rejects malformed OpenAI headers %j", async (headers) => { + await send({ kind: "openAiModels", headers }) + expect(axios.get).not.toHaveBeenCalled() + expect(postMessageToWebview).toHaveBeenCalledExactlyOnceWith({ + type: "providerInfo", + requestId: "req-1", + error: "Invalid provider info request", + }) + }) + + it.each(OPENAI_FAILURES)( + "sanitizes OpenAI %s from the real helper while retaining correlation", + async (_name, error) => { + vi.mocked(axios.get).mockRejectedValueOnce(error) + await send({ kind: "openAiModels", baseUrl: "https://private.test/v1", apiKey: "secret" }) + expect(axios.get).toHaveBeenCalledExactlyOnceWith("https://private.test/v1/models", { + headers: expect.objectContaining({ Authorization: "Bearer secret" }), + }) + expect(postMessageToWebview).toHaveBeenCalledExactlyOnceWith({ + type: "providerInfo", + requestId: "req-1", + error: "Provider info request failed", + }) + expect(provider.log).toHaveBeenCalledExactlyOnceWith("Failed to fetch provider info (openAiModels)") + expect(console.error).toHaveBeenCalledExactlyOnceWith( + "Error fetching provider info (openAiModels):", + error.name, + ) + const exposed = JSON.stringify([ + postMessageToWebview.mock.calls, + vi.mocked(provider.log).mock.calls, + vi.mocked(console.error).mock.calls, + ]) + expect(exposed).not.toContain("secret") + expect(exposed).not.toContain("private.test") + }, + ) + + it("sanitizes a non-Error provider rejection without leaking its credentials", async () => { + vi.mocked(axios.get).mockRejectedValueOnce("secret https://private.test refused") + + await send({ kind: "openAiModels", baseUrl: "https://private.test/v1", apiKey: "secret" }) + + expect(postMessageToWebview).toHaveBeenCalledExactlyOnceWith({ + type: "providerInfo", + requestId: "req-1", + error: "Provider info request failed", + }) + expect(provider.log).toHaveBeenCalledExactlyOnceWith("Failed to fetch provider info (openAiModels)") + expect(console.error).toHaveBeenCalledExactlyOnceWith("Error fetching provider info (openAiModels):", "unknown") + }) + + it("returns a successful empty OpenAI catalog rather than a broker error", async () => { + vi.mocked(axios.get).mockResolvedValueOnce({ data: { data: [] } }) + await send({ kind: "openAiModels", baseUrl: "https://compatible.test/v1" }) + expect(axios.get).toHaveBeenCalledExactlyOnceWith("https://compatible.test/v1/models", { + headers: expect.not.objectContaining({ Authorization: expect.anything() }), + }) + expect(postMessageToWebview).toHaveBeenCalledExactlyOnceWith({ + type: "providerInfo", + requestId: "req-1", + values: { data: [] }, + }) + expect(provider.log).not.toHaveBeenCalled() + expect(console.error).not.toHaveBeenCalled() + }) + + it.each(OPENAI_FAILURES)("preserves legacy empty-list behavior on %s", async (_name, error) => { + vi.mocked(axios.get).mockRejectedValue(error) + await expect(getOpenAiModels("https://compatible.test/v1", "secret")).resolves.toEqual([]) + await expect( + getOpenAiModels("https://compatible.test/v1", "secret", undefined, { throwOnError: false }), + ).resolves.toEqual([]) + expect(axios.get).toHaveBeenCalledTimes(2) + }) + + it.each(OPENAI_FAILURES)("propagates the original %s only when strict mode is enabled", async (_name, error) => { + vi.mocked(axios.get).mockRejectedValueOnce(error) + await expect( + getOpenAiModels("https://compatible.test/v1", "secret", undefined, { throwOnError: true }), + ).rejects.toBe(error) + }) + it("fetches OpenRouter key info from the default endpoint with a bearer token", async () => { fetchSpy.mockResolvedValue(jsonResponse({ data: KEY_INFO })) diff --git a/src/core/webview/__tests__/webviewMessageHandler.spec.ts b/src/core/webview/__tests__/webviewMessageHandler.spec.ts index 961bd25010..2e98f86f56 100644 --- a/src/core/webview/__tests__/webviewMessageHandler.spec.ts +++ b/src/core/webview/__tests__/webviewMessageHandler.spec.ts @@ -80,7 +80,6 @@ vi.mock("@roo-code/telemetry", () => ({ import type { ModelRecord } from "@roo-code/types" import * as vsCodeLmProvider from "../../../api/providers/vscode-lm" import * as copilotProvider from "../../../api/providers/github-copilot" -import * as openAiProvider from "../../../api/providers/openai" import { webviewMessageHandler } from "../webviewMessageHandler" import { registerCopilotModelBroadcast } from "../../../services/language-models/copilotModelBroadcast" @@ -139,115 +138,6 @@ const mockClineProvider = { cwd: "/mock/workspace", } as unknown as ClineProvider -describe("webviewMessageHandler - OpenAI model discovery", () => { - const values = { baseUrl: "https://compatible.test/v1", apiKey: "secret", openAiHeaders: { custom: "header" } } - - beforeEach(() => vi.clearAllMocks()) - afterEach(() => vi.restoreAllMocks()) - - it.each([undefined, "request-1", ""])("preserves the response contract for requestId %j", async (requestId) => { - const fetch = vi.spyOn(openAiProvider, "getOpenAiModels").mockResolvedValue(["model"]) - await webviewMessageHandler(mockClineProvider, { - type: "requestOpenAiModels", - ...(requestId !== undefined ? { requestId } : {}), - values, - }) - expect(fetch).toHaveBeenCalledExactlyOnceWith(values.baseUrl, values.apiKey, values.openAiHeaders) - expect(mockClineProvider.postMessageToWebview).toHaveBeenCalledExactlyOnceWith({ - type: "openAiModels", - openAiModels: ["model"], - ...(requestId !== undefined ? { requestId } : {}), - }) - }) - - it.each([undefined, "empty-request"])( - "returns empty catalogs with the same correlation contract: %j", - async (requestId) => { - vi.spyOn(openAiProvider, "getOpenAiModels").mockResolvedValue([]) - await webviewMessageHandler(mockClineProvider, { type: "requestOpenAiModels", requestId, values }) - expect(mockClineProvider.postMessageToWebview).toHaveBeenCalledExactlyOnceWith({ - type: "openAiModels", - openAiModels: [], - ...(requestId !== undefined ? { requestId } : {}), - }) - }, - ) - - it.each([ - undefined, - {}, - { baseUrl: values.baseUrl }, - { apiKey: values.apiKey }, - { ...values, apiKey: "" }, - { ...values, baseUrl: "" }, - ])("answers correlated missing configuration but preserves legacy silence: %j", async (incomplete) => { - const fetch = vi.spyOn(openAiProvider, "getOpenAiModels") - await webviewMessageHandler(mockClineProvider, { type: "requestOpenAiModels", values: incomplete }) - expect(mockClineProvider.postMessageToWebview).not.toHaveBeenCalled() - await webviewMessageHandler(mockClineProvider, { - type: "requestOpenAiModels", - requestId: "missing", - values: incomplete, - }) - expect(mockClineProvider.postMessageToWebview).toHaveBeenCalledExactlyOnceWith({ - type: "openAiModels", - requestId: "missing", - openAiModels: [], - error: "Configure an OpenAI-compatible base URL and API key in Settings.", - }) - expect(fetch).not.toHaveBeenCalled() - }) - - it("returns a correlated failure without exposing fetch error credentials", async () => { - vi.spyOn(openAiProvider, "getOpenAiModels").mockRejectedValue(new Error("Authorization: secret")) - await webviewMessageHandler(mockClineProvider, { type: "requestOpenAiModels", requestId: "failed", values }) - expect(mockClineProvider.postMessageToWebview).toHaveBeenCalledExactlyOnceWith({ - type: "openAiModels", - requestId: "failed", - openAiModels: [], - error: "Model discovery failed; configure this model in Settings.", - }) - }) - - it("preserves legacy propagation of unexpected fetch errors without a new response payload", async () => { - vi.spyOn(openAiProvider, "getOpenAiModels").mockRejectedValue(new Error("unexpected failure")) - await expect(webviewMessageHandler(mockClineProvider, { type: "requestOpenAiModels", values })).rejects.toThrow( - "unexpected failure", - ) - expect(mockClineProvider.postMessageToWebview).not.toHaveBeenCalled() - }) - - it("echoes each request's identifier when concurrent fetches complete out of order", async () => { - let completeFirst!: (models: string[]) => void - vi.spyOn(openAiProvider, "getOpenAiModels") - .mockImplementationOnce( - () => - new Promise((resolve) => { - completeFirst = resolve - }), - ) - .mockResolvedValueOnce(["new"]) - const first = webviewMessageHandler(mockClineProvider, { - type: "requestOpenAiModels", - requestId: "first", - values, - }) - await webviewMessageHandler(mockClineProvider, { type: "requestOpenAiModels", requestId: "second", values }) - completeFirst(["old"]) - await first - expect(mockClineProvider.postMessageToWebview).toHaveBeenNthCalledWith(1, { - type: "openAiModels", - requestId: "second", - openAiModels: ["new"], - }) - expect(mockClineProvider.postMessageToWebview).toHaveBeenNthCalledWith(2, { - type: "openAiModels", - requestId: "first", - openAiModels: ["old"], - }) - }) -}) - describe("webviewMessageHandler - Copilot authentication", () => { beforeEach(() => { vi.clearAllMocks() @@ -1239,6 +1129,36 @@ describe("webviewMessageHandler - requestRouterModels", () => { }) }) + it.each([ + { litellmBaseUrl: "https://profile-b.test/v1", litellmApiKey: "profile-b-secret" }, + { litellmBaseUrl: "https://profile-b.test/v1" }, + ])("uses only request-owned configuration and echoes correlation", async (apiConfiguration) => { + mockGetModels.mockResolvedValue({}) + await webviewMessageHandler(mockClineProvider, { + type: "requestRouterModels", + requestId: "profile-b-request", + apiConfiguration: { apiProvider: providerIdentifiers.litellm, ...apiConfiguration }, + values: { provider: providerIdentifiers.litellm }, + }) + expect(mockClineProvider.getState).not.toHaveBeenCalled() + if (apiConfiguration.litellmApiKey) { + expect(mockGetModels).toHaveBeenCalledWith( + { + provider: providerIdentifiers.litellm, + apiKey: apiConfiguration.litellmApiKey, + baseUrl: apiConfiguration.litellmBaseUrl, + }, + expect.anything(), + ) + } else expect(mockGetModels).not.toHaveBeenCalled() + expect(mockClineProvider.postMessageToWebview).toHaveBeenCalledWith({ + type: "routerModels", + requestId: "profile-b-request", + values: { provider: providerIdentifiers.litellm }, + routerModels: apiConfiguration.litellmApiKey ? { litellm: {} } : {}, + }) + }) + it("successfully fetches models from all providers", async () => { const mockModels: ModelRecord = { "model-1": { diff --git a/src/core/webview/providerInfoHandler.ts b/src/core/webview/providerInfoHandler.ts index aac43cd2cc..5b155ea528 100644 --- a/src/core/webview/providerInfoHandler.ts +++ b/src/core/webview/providerInfoHandler.ts @@ -4,6 +4,7 @@ import type { ProviderInfoKind, ProviderInfoParams, ProviderInfoResultMap, Webvi import type { ClineProvider } from "./ClineProvider" import { getOpenRouterModelEndpoints } from "../../api/providers/fetchers/openrouter" +import { getOpenAiModels } from "../../api/providers/openai" import { toRequestyServiceUrl } from "../../shared/utils/requesty" const FETCH_TIMEOUT_MS = 10_000 @@ -119,6 +120,7 @@ async function getRequestyKeyInfo({ apiKey, baseUrl }: ProviderInfoParams) { } const fetchers: { [K in ProviderInfoKind]: (params: ProviderInfoParams) => Promise } = { + openAiModels: ({ baseUrl, apiKey, headers }) => getOpenAiModels(baseUrl, apiKey, headers, { throwOnError: true }), openRouterKeyInfo: getOpenRouterKeyInfo, openRouterModelProviders: getOpenRouterModelProviders, requestyKeyInfo: getRequestyKeyInfo, @@ -132,6 +134,7 @@ const providerInfoParamsSchema = z.object({ apiKey: z.string().optional(), baseUrl: z.string().optional(), modelId: z.string().optional(), + headers: z.record(z.string(), z.string()).optional(), }) /** diff --git a/src/core/webview/webviewMessageHandler.ts b/src/core/webview/webviewMessageHandler.ts index 227c8f9277..06276fee3f 100644 --- a/src/core/webview/webviewMessageHandler.ts +++ b/src/core/webview/webviewMessageHandler.ts @@ -28,6 +28,7 @@ import { OllamaModelsMessageType, OpenAiModelsMessageType, RouterModelsMessageType, + providerSettingsSchema, VsCodeLmModelsMessageType, isTelemetryOptedIn, } from "@roo-code/types" @@ -1178,7 +1179,11 @@ export const webviewMessageHandler = async ( break } case RouterModelsMessageType.requestRouterModels: { - const { apiConfiguration } = await provider.getState() + // A scoped picker request owns its configuration, even if the active profile changes + // while discovery is in flight. Do not merge absent credentials from global state. + const apiConfiguration = message.apiConfiguration + ? providerSettingsSchema.parse(message.apiConfiguration) + : (await provider.getState()).apiConfiguration // Optional single provider filter from webview const requestedProvider = message?.values?.provider @@ -1482,6 +1487,7 @@ export const webviewMessageHandler = async ( await provider.postMessageToWebview({ type: RouterModelsMessageType.routerModels, + requestId: message.requestId, routerModels, values: providerFilter ? { provider: requestedProvider } : undefined, }) @@ -1577,46 +1583,18 @@ export const webviewMessageHandler = async ( }) break } - case OpenAiModelsMessageType.requestOpenAiModels: { - const correlation = message.requestId !== undefined ? { requestId: message.requestId } : {} - if (!message.values?.baseUrl || !message.values?.apiKey) { - // Legacy clients expect no response until both values are configured. - if (message.requestId !== undefined) { - await provider.postMessageToWebview({ - type: OpenAiModelsMessageType.openAiModels, - ...correlation, - openAiModels: [], - error: "Configure an OpenAI-compatible base URL and API key in Settings.", - }) - } - break - } - - let openAiModels: string[] - try { - openAiModels = await getOpenAiModels( - message.values.baseUrl, - message.values.apiKey, - message.values.openAiHeaders, + case OpenAiModelsMessageType.requestOpenAiModels: + if (message?.values?.baseUrl && message?.values?.apiKey) { + const openAiModels = await getOpenAiModels( + message?.values?.baseUrl, + message?.values?.apiKey, + message?.values?.openAiHeaders, ) - } catch (error) { - if (message.requestId === undefined) throw error - // Do not echo fetch errors: they may contain credentials or headers. - await provider.postMessageToWebview({ - type: OpenAiModelsMessageType.openAiModels, - ...correlation, - openAiModels: [], - error: "Model discovery failed; configure this model in Settings.", - }) - break + + await provider.postMessageToWebview({ type: OpenAiModelsMessageType.openAiModels, openAiModels }) } - await provider.postMessageToWebview({ - type: OpenAiModelsMessageType.openAiModels, - ...correlation, - openAiModels, - }) + break - } case VsCodeLmModelsMessageType.githubCopilotSignIn: case VsCodeLmModelsMessageType.githubCopilotReconnect: { // Plain sign-in and Reconnect run as separate attempts, so an older one can finish after a newer one. diff --git a/webview-ui/playwright/gallery/UnifiedModelPicker.fixture.tsx b/webview-ui/playwright/gallery/UnifiedModelPicker.fixture.tsx index 96b2e72bab..b15da24511 100644 --- a/webview-ui/playwright/gallery/UnifiedModelPicker.fixture.tsx +++ b/webview-ui/playwright/gallery/UnifiedModelPicker.fixture.tsx @@ -5,6 +5,7 @@ import { ApiConfigSelector } from "@/components/chat/ApiConfigSelector" import { ProfileQuickSettings } from "@/components/chat/ProfileQuickSettings" import { AppProviders } from "../AppProviders" +import { ExtensionStateContextProvider, useExtensionState } from "../ExtensionStateContext" const profiles = [ { id: "work", name: "Work", modelId: "gpt-5" }, @@ -14,6 +15,27 @@ const profiles = [ /** Real picker, static production catalog, and fresh browser-owned state on every mount. */ export function UnifiedModelPickerStory() { + return ( + + + + ) +} + +function MountedModelPicker() { + const state = useExtensionState() const [profileId, setProfileId] = useState("work") const [pinned, setPinned] = useState>({ work: true }) const [locked, setLocked] = useState(false) @@ -26,14 +48,8 @@ export function UnifiedModelPickerStory() { } return ( - +

} title="Choose profile and model" triggerClassName="max-w-full self-start" - onChange={setProfileId} + onChange={(id) => { + const next = profiles.find((candidate) => candidate.id === id) ?? profiles[0] + // The gallery provider accepts live values; keep the picker mounted while switching context. + setProfileId(next.id) + }} listApiConfigMeta={profiles} pinnedApiConfigs={pinned} togglePinnedApiConfig={(id) => setPinned((previous) => ({ ...previous, [id]: !previous[id] }))} @@ -51,6 +71,6 @@ export function UnifiedModelPickerStory() { onToggleLockApiConfig={() => setLocked((previous) => !previous)} />
- + ) } diff --git a/webview-ui/src/components/chat/ApiConfigSelector.tsx b/webview-ui/src/components/chat/ApiConfigSelector.tsx index 06a1cc898a..69b5837f52 100644 --- a/webview-ui/src/components/chat/ApiConfigSelector.tsx +++ b/webview-ui/src/components/chat/ApiConfigSelector.tsx @@ -173,6 +173,7 @@ export const ApiConfigSelector = ({ open={open} onOpenChange={(nextOpen) => { setOpen(nextOpen) + if (nextOpen) setPendingProfileId(null) if (!nextOpen) { setShowProfiles(false) setSearchValue("") @@ -234,71 +235,67 @@ export const ApiConfigSelector = ({ /> )} -
- {!isProfileView && - (pendingProfileId && pendingProfileId !== value ? ( + {!isProfileView && + (pendingProfileId && pendingProfileId !== value ? ( +
+ {t("chat:modelPicker.loadingProfile")} +
+ ) : ( + quickSettings + ))} + {isProfileView && (quickSettings || listApiConfigMeta.length > 6) && ( + + )} + {isProfileView && !quickSettings && listApiConfigMeta.length <= 6 && ( +
+

+ {t("prompts:apiConfiguration.select")} +

+
+ )} + {/* Config list - single scroll container */} + {filteredConfigs.length === 0 && searchValue ? ( + + ) : ( + + )} + {/* Bottom bar with buttons on left and title on right */}
diff --git a/webview-ui/src/components/chat/ModelSelector.tsx b/webview-ui/src/components/chat/ModelSelector.tsx new file mode 100644 index 0000000000..ac4c16c347 --- /dev/null +++ b/webview-ui/src/components/chat/ModelSelector.tsx @@ -0,0 +1,154 @@ +import React from "react" +import { Fzf } from "fzf" +import { Check } from "lucide-react" +import { type ProviderSettings, providerIdentifiers } from "@roo-code/types" + +import { cn } from "@/lib/utils" +import { useAppTranslation } from "@/i18n/TranslationContext" +import { vscode } from "@/utils/vscode" +import { useExtensionState } from "@/context/ExtensionStateContext" +import { filterModels } from "@/components/settings/utils/organizationFilters" +import { useSelectedModel } from "@/components/ui/hooks/useSelectedModel" +import { PickerSearchField } from "./PickerSearchField" +import type { ProfileModelCatalog } from "./model-picker/useProfileModelCatalog" +import { pickerResultsClassName, handlePickerNavigation } from "./model-picker/pickerNavigation" + +const BEDROCK_CUSTOM_ARN_MODEL_ID = "custom-arn" + +interface ModelSelectorProps { + apiConfiguration: ProviderSettings + disabled?: boolean + onSelect: (id: string) => void + catalog: ProfileModelCatalog +} + +/** Embedded catalog panel; the parent owns the popover and profile saves. */ +export const ModelSelector = ({ + apiConfiguration, + disabled = false, + onSelect: handleSelect, + catalog, +}: ModelSelectorProps) => { + const [searchValue, setSearchValue] = React.useState("") + const { t } = useAppTranslation() + const { organizationAllowList } = useExtensionState() + const { id: selectedModelId } = useSelectedModel(apiConfiguration) + const { provider, models, isLoading, isError, isUnsupported, refetch } = catalog + const filteredModelRecord = React.useMemo( + () => filterModels(models, provider, organizationAllowList), + [models, provider, organizationAllowList], + ) + + const modelIds = React.useMemo(() => { + if (!filteredModelRecord) return [] + return Object.entries(filteredModelRecord) + .filter(([id, info]) => { + if ( + provider === providerIdentifiers.bedrock && + (id.startsWith("arn:") || (id === BEDROCK_CUSTOM_ARN_MODEL_ID && !apiConfiguration.awsCustomArn)) + ) + return false + if (id === selectedModelId) return true + return !info.deprecated + }) + .map(([id]) => id) + .sort((a, b) => a.localeCompare(b)) + }, [filteredModelRecord, selectedModelId, provider, apiConfiguration.awsCustomArn]) + + const searchableItems = React.useMemo( + () => + modelIds.map((id) => ({ + id, + searchStr: [id, filteredModelRecord?.[id]?.displayName].filter(Boolean).join(" "), + })), + [modelIds, filteredModelRecord], + ) + + const fzfInstance = React.useMemo( + () => new Fzf(searchableItems, { selector: (item) => item.searchStr }), + [searchableItems], + ) + + const filteredModelIds = React.useMemo(() => { + if (!searchValue) return modelIds + return fzfInstance.find(searchValue).map((result) => result.item.id) + }, [modelIds, searchValue, fzfInstance]) + + return ( +
+ +
+ {isLoading ? ( +
+ {t("chat:modelSelector.loading")} +
+ ) : isError ? ( +
+ {t("chat:error")} + +
+ ) : isUnsupported ? ( +
+ {t("chat:modelPicker.modelSettingsHint")} +
+ ) : filteredModelIds.length === 0 ? ( +
+ {t("common:ui.no_results")} +
+ ) : ( +
+ {filteredModelIds.map((modelId) => { + const isSelected = modelId === selectedModelId + const modelInfo = filteredModelRecord?.[modelId] + return ( + + ) + })} +
+ )} + {!isLoading && (isUnsupported || isError || filteredModelIds.length === 0) && ( + + )} +
+
+ ) +} diff --git a/webview-ui/src/components/chat/ProfileQuickSettings.tsx b/webview-ui/src/components/chat/ProfileQuickSettings.tsx index 4ce8fb3a48..50e38d6a08 100644 --- a/webview-ui/src/components/chat/ProfileQuickSettings.tsx +++ b/webview-ui/src/components/chat/ProfileQuickSettings.tsx @@ -2,55 +2,43 @@ import { useState } from "react" import { useExtensionState } from "@/context/ExtensionStateContext" import { useSelectedModel } from "@/components/ui/hooks/useSelectedModel" -import { filterModels } from "@/components/settings/utils/organizationFilters" -import { PickerSearchField } from "./PickerSearchField" -import { useAppTranslation } from "@/i18n/TranslationContext" -import { vscode } from "@/utils/vscode" import { createModelPatch, createReasoningPatch, getReasoningSelection, useProfileModelCatalog } from "./model-picker" -import { ModelResults } from "./model-picker/ModelResults" +import { ModelSelector } from "./ModelSelector" import { ReasoningControls } from "./model-picker/ReasoningControls" import { useModelPickerSubmit } from "./model-picker/useModelPickerSubmit" -import { handlePickerNavigation } from "./model-picker/pickerNavigation" /** Immediate, partial saves only; the host owns merging and publishing the resulting profile. */ export function ProfileQuickSettings({ disabled = false }: { disabled?: boolean }) { - const { t } = useAppTranslation() - const { apiConfiguration, currentApiConfigName, organizationAllowList } = useExtensionState() - const { id: modelId, info } = useSelectedModel(apiConfiguration) + const { apiConfiguration, currentApiConfigName } = useExtensionState() + const { id: modelId, info, isLoading: isSelectionLoading } = useSelectedModel(apiConfiguration) const catalog = useProfileModelCatalog(apiConfiguration) const reasoning = getReasoningSelection(apiConfiguration, info) - const [search, setSearch] = useState("") - const submit = useModelPickerSubmit(currentApiConfigName, catalog.provider, disabled) - const models = filterModels(catalog.models, catalog.provider, organizationAllowList) + const [pendingModelId, setPendingModelId] = useState(null) + const pending = pendingModelId !== null && pendingModelId !== modelId + if (pendingModelId === modelId) setPendingModelId(null) + const submit = useModelPickerSubmit( + currentApiConfigName, + catalog.provider, + disabled || pending || !!isSelectionLoading, + ) const canSelect = !disabled && !!currentApiConfigName && !!catalog.field && !catalog.isLoading && !catalog.isError return ( -
- - vscode.postMessage({ type: "switchTab", tab: "settings" })} +
+ { - if (canSelect && id !== modelId) submit(createModelPatch(apiConfiguration, id)) + if (canSelect && !pending && id !== modelId) { + submit(createModelPatch(apiConfiguration, id)) + setPendingModelId(id) + } }} /> submit(createReasoningPatch(apiConfiguration, effort, info))} />
diff --git a/webview-ui/src/components/chat/__tests__/ApiConfigSelector.spec.tsx b/webview-ui/src/components/chat/__tests__/ApiConfigSelector.spec.tsx index fd15b86af0..178287b887 100644 --- a/webview-ui/src/components/chat/__tests__/ApiConfigSelector.spec.tsx +++ b/webview-ui/src/components/chat/__tests__/ApiConfigSelector.spec.tsx @@ -103,7 +103,7 @@ describe("ApiConfigSelector", () => { ) fireEvent.click(screen.getByTestId("toggle-popover")) expect(screen.getByText("Model settings panel")).toBeInTheDocument() - expect(screen.queryByText("Config 2")).not.toBeInTheDocument() + expect(screen.getByText("Config 2")).not.toBeVisible() fireEvent.click(screen.getByRole("button", { name: "chat:modelPicker.selectProfile" })) expect(screen.queryByText("Model settings panel")).not.toBeInTheDocument() fireEvent.mouseEnter(screen.getByText("Config 2")) @@ -124,6 +124,19 @@ describe("ApiConfigSelector", () => { expect(screen.queryByText("chat:modelPicker.loadingProfile")).not.toBeInTheDocument() }) + test("recovers a rejected profile switch by closing and reopening without exposing stale settings", () => { + render(Old model settings} />) + fireEvent.click(screen.getByTestId("toggle-popover")) + fireEvent.click(screen.getByRole("button", { name: "chat:modelPicker.selectProfile" })) + fireEvent.click(screen.getByText("Config 2")) + expect(screen.getByText("chat:modelPicker.loadingProfile")).toBeInTheDocument() + expect(screen.queryByRole("button", { name: "Old model settings" })).not.toBeInTheDocument() + fireEvent.click(screen.getByTestId("toggle-popover")) + fireEvent.click(screen.getByTestId("toggle-popover")) + expect(screen.queryByText("chat:modelPicker.loadingProfile")).not.toBeInTheDocument() + expect(screen.getByRole("button", { name: "Old model settings" })).toBeEnabled() + }) + test("can return from profile selection without changing the active profile", () => { render(Model settings panel
} />) const header = screen.getByRole("button", { name: "chat:modelPicker.selectProfile" }) @@ -133,6 +146,27 @@ describe("ApiConfigSelector", () => { expect(mockOnChange).not.toHaveBeenCalled() }) + test("reselects the active profile without waiting for a host update", () => { + render(Model settings} />) + fireEvent.click(screen.getByTestId("toggle-popover")) + fireEvent.click(screen.getByRole("button", { name: "chat:modelPicker.selectProfile" })) + fireEvent.click(screen.getByRole("button", { name: "Config 1 claude-3-opus-20240229" })) + expect(mockOnChange).toHaveBeenCalledTimes(1) + expect(mockOnChange).toHaveBeenCalledWith("config1") + expect(screen.getByRole("button", { name: "Model settings" })).toBeEnabled() + expect(screen.queryByText("chat:modelPicker.loadingProfile")).not.toBeInTheDocument() + expect(screen.getByTestId("popover-root")).toHaveAttribute("data-open", "true") + }) + + test("renders and invokes the locked profile control", () => { + render() + const unlock = screen.getByRole("button", { name: "chat:unlockApiConfigAcrossModes" }) + expect(unlock).toHaveClass("text-vscode-focusBorder") + expect(unlock.querySelector(".codicon-lock")).toBeInTheDocument() + fireEvent.click(unlock) + expect(defaultProps.onToggleLockApiConfig).toHaveBeenCalledTimes(1) + }) + test("keeps the picker open after interacting with model settings", () => { render(Choose model} />) fireEvent.click(screen.getByTestId("toggle-popover")) diff --git a/webview-ui/src/components/chat/__tests__/ModelPicker.integration.spec.tsx b/webview-ui/src/components/chat/__tests__/ModelPicker.integration.spec.tsx index df98438b06..1b747892e7 100644 --- a/webview-ui/src/components/chat/__tests__/ModelPicker.integration.spec.tsx +++ b/webview-ui/src/components/chat/__tests__/ModelPicker.integration.spec.tsx @@ -21,7 +21,7 @@ vi.mock("@/context/ExtensionStateContext", () => ({ })) vi.mock("@/components/ui/hooks/useSelectedModel", () => ({ useSelectedModel: () => ({ - id: "model-a", + id: mocks.configuration.apiModelId, info: { contextWindow: 1000, supportsPromptCache: false, @@ -66,7 +66,7 @@ describe("production model picker popover", () => { it("keeps open for model and effort selection, then dismisses on outside click", async () => { const user = userEvent.setup() - render( + const { rerender } = render( <> } /> @@ -80,6 +80,14 @@ describe("production model picker popover", () => { expect(mocks.postMessage).toHaveBeenLastCalledWith( expect.objectContaining({ type: "updateProfileModel", text: "Work" }), ) + expect(within(dialog).getByRole("button", { name: "chat:modelPicker.effort.low" })).toBeDisabled() + mocks.configuration = { ...mocks.configuration, apiModelId: "model-b" } + rerender( + <> + + } /> + , + ) await user.click(within(dialog).getByRole("button", { name: "chat:modelPicker.effort.low" })) expect(screen.getByRole("dialog")).toBeInTheDocument() expect(mocks.postMessage).toHaveBeenLastCalledWith({ @@ -102,9 +110,9 @@ describe("production model picker popover", () => { const profiles = screen.getByRole("button", { name: "Personal" }).closest(".h-\\[300px\\]") expect(profiles).toHaveClass("h-[300px]", "shrink-0", "overflow-y-auto") await user.type(screen.getByRole("textbox"), "zzzzz") - expect(screen.getByText("common:ui.no_results").parentElement).toHaveClass("h-[300px]") + expect(screen.getByText("common:ui.no_results")).toHaveClass("h-[300px]") await user.click(screen.getByRole("button", { name: "chat:modelPicker.clearSearch" })) - await user.keyboard("{ArrowDown}{End}{Enter}") + await user.keyboard("{Tab}{End}{Enter}") expect(props.onChange).toHaveBeenCalledWith("personal") expect(screen.getByRole("dialog")).toBeInTheDocument() expect(screen.getByRole("status")).toHaveClass("h-[300px]", "shrink-0", "overflow-y-auto") @@ -114,7 +122,7 @@ describe("production model picker popover", () => { expect(screen.queryByRole("button", { name: "model-b" })).not.toBeInTheDocument() await user.keyboard("{Escape}") await user.click(screen.getByTestId("dropdown-trigger")) - expect(screen.queryByRole("button", { name: "model-b" })).not.toBeInTheDocument() + expect(screen.getByRole("button", { name: "model-b" })).toBeEnabled() mocks.profileName = "Personal" rerender( ({ catalog: {} as ProfileModelCatalog, allowList: undefined as OrganizationAllowList | undefined, profileName: "Work", + selectionLoading: false, postMessage: vi.fn(), setApiConfiguration: vi.fn(), refetch: vi.fn(), @@ -32,6 +33,7 @@ vi.mock("@/components/ui/hooks/useSelectedModel", () => ({ useSelectedModel: () => ({ id: mocks.configuration.apiModelId ?? mocks.configuration.openAiModelId, info: mocks.info, + isLoading: mocks.selectionLoading, }), })) vi.mock("../model-picker/useProfileModelCatalog", () => ({ useProfileModelCatalog: () => mocks.catalog })) @@ -40,6 +42,7 @@ describe("ProfileQuickSettings", () => { beforeEach(() => { vi.clearAllMocks() mocks.profileName = "Work" + mocks.selectionLoading = false mocks.allowList = undefined mocks.configuration = { apiProvider: providerIdentifiers.openaiNative, @@ -83,9 +86,9 @@ describe("ProfileQuickSettings", () => { expect(screen.getByRole("button", { name: "model-a" })).toBeInTheDocument() }) - it("sends independent model and effort patches, never snapshots or optimistic state", async () => { + it("blocks stale effort until host confirms the new model, without optimistic state", async () => { const user = userEvent.setup() - render() + const { rerender } = render() await user.click(screen.getByRole("button", { name: "Friendly Beta" })) expect(mocks.postMessage).toHaveBeenLastCalledWith({ type: "updateProfileModel", @@ -101,6 +104,29 @@ describe("ProfileQuickSettings", () => { }, }, }) + const effort = screen.getByRole("button", { name: "chat:modelPicker.effort.low" }) + expect(effort).toBeDisabled() + // Reverse selection cannot race the pending request: all model results are disabled too. + const previousModel = screen.getByRole("button", { name: "model-a" }) + const pendingModel = screen.getByRole("button", { name: "Friendly Beta" }) + expect(previousModel).toBeDisabled() + expect(pendingModel).toBeDisabled() + await user.click(previousModel) + await user.click(pendingModel) + await user.click(effort) + expect(mocks.postMessage).toHaveBeenCalledTimes(1) + // An unrelated state post must not make the old model's controls actionable. + mocks.configuration = { ...mocks.configuration, apiKey: "rotated" } + rerender() + expect(effort).toBeDisabled() + expect(previousModel).toBeDisabled() + mocks.configuration = { ...mocks.configuration, apiModelId: "model-b" } + rerender() + expect(effort).toBeEnabled() + expect(previousModel).toBeEnabled() + expect(pendingModel).toBeEnabled() + await user.click(pendingModel) + expect(mocks.postMessage).toHaveBeenCalledTimes(1) await user.click(screen.getByRole("button", { name: "chat:modelPicker.effort.low" })) expect(mocks.postMessage).toHaveBeenLastCalledWith({ type: "updateProfileModel", @@ -114,14 +140,41 @@ describe("ProfileQuickSettings", () => { expect(screen.queryByRole("button", { name: "chat:modelPicker.off" })).not.toBeInTheDocument() }) + it("keeps stale model controls disabled until the picker remounts after rejection", async () => { + const user = userEvent.setup() + const { unmount } = render() + await user.click(screen.getByRole("button", { name: "Friendly Beta" })) + expect(screen.getByRole("button", { name: "model-a" })).toBeDisabled() + expect(screen.getByRole("button", { name: "chat:modelPicker.effort.low" })).toBeDisabled() + unmount() + render() + expect(screen.getByRole("button", { name: "model-a" })).toBeEnabled() + expect(screen.getByRole("button", { name: "chat:modelPicker.effort.low" })).toBeEnabled() + }) + it("does not reset reasoning when the already selected model is clicked", async () => { const user = userEvent.setup() render() await user.click(screen.getByRole("button", { name: "model-a" })) expect(mocks.postMessage).not.toHaveBeenCalled() + expect(screen.getByRole("button", { name: "Friendly Beta" })).toBeEnabled() + expect(screen.getByRole("button", { name: "chat:modelPicker.effort.low" })).toBeEnabled() expect(screen.getByRole("textbox")).toBeInTheDocument() }) + it("blocks model and effort writes until the selected model metadata resolves", async () => { + mocks.selectionLoading = true + const user = userEvent.setup() + const { rerender } = render() + await user.click(screen.getByRole("button", { name: "Friendly Beta" })) + await user.click(screen.getByRole("button", { name: "chat:modelPicker.effort.low" })) + expect(mocks.postMessage).not.toHaveBeenCalled() + mocks.selectionLoading = false + rerender() + await user.click(screen.getByRole("button", { name: "Friendly Beta" })) + expect(mocks.postMessage).toHaveBeenCalledWith(expect.objectContaining({ type: "updateProfileModel" })) + }) + it("selects via keyboard from search and keeps the controls mounted", async () => { const user = userEvent.setup() render() diff --git a/webview-ui/src/components/chat/__tests__/UnifiedModelPicker.visual.tsx b/webview-ui/src/components/chat/__tests__/UnifiedModelPicker.visual.tsx index a4bd44fe59..135c2aa808 100644 --- a/webview-ui/src/components/chat/__tests__/UnifiedModelPicker.visual.tsx +++ b/webview-ui/src/components/chat/__tests__/UnifiedModelPicker.visual.tsx @@ -1,4 +1,5 @@ import type { Locator } from "@playwright/test" +import { providerIdentifiers } from "@roo-code/types" import { expect, test } from "../../../../playwright/coverage-fixture" import { @@ -22,7 +23,7 @@ async function geometry(dialog: Locator, search: Locator) { const picker = await dialog.boundingBox() const input = await search.boundingBox() // Both production views use the same fixed-height results viewport. - const results = await dialog.locator(".h-\\[300px\\]").boundingBox() + const results = await dialog.locator(".h-\\[300px\\]:visible").boundingBox() expect(picker).not.toBeNull() expect(input).not.toBeNull() expect(results).not.toBeNull() @@ -67,7 +68,7 @@ for (const view of ["models", "profiles"] as const) { await dialog.getByRole("button", { name: "Choose profile", exact: true }).click() } const search = dialog.getByRole("textbox") - const results = dialog.locator("[data-picker-result]") + const results = dialog.locator("[data-picker-result]:visible") await expect(results.first()).toBeVisible() await expect.poll(async () => (await geometry(dialog, search)).resultsHeight).toBe(300) const initial = await geometry(dialog, search) @@ -116,16 +117,48 @@ test("model and effort clicks retain the open picker layout", async ({ mount, pa await search.fill("gpt-5.1-codex-max") await expect.poll(async () => (await geometry(dialog, search)).resultsHeight).toBe(300) const initial = await geometry(dialog, search) - await dialog.getByRole("button", { name: "gpt-5.1-codex-max", exact: true }).click() - await expect(dialog).toBeVisible() - await expect.poll(() => geometry(dialog, search)).toEqual(initial) await dialog .getByRole("group", { name: "Reasoning effort" }) .getByRole("button", { name: "Low", exact: true }) .click() await expect(dialog).toBeVisible() await expect.poll(() => geometry(dialog, search)).toEqual(initial) + await dialog.getByRole("button", { name: "gpt-5.1-codex-max", exact: true }).click() + await expect(dialog).toBeVisible() + await expect.poll(() => geometry(dialog, search)).toEqual(initial) + await expect( + dialog.getByRole("group", { name: "Reasoning effort" }).getByRole("button", { name: "Low", exact: true }), + ).toBeDisabled() + // Use the shared bridge capture, not console output, to ensure the real controls ran. const messages = await getCapturedVscodeMessages(page) expect(messages.filter(({ type }) => type === "updateProfileModel")).toHaveLength(2) }) + +test("switching profiles updates the mounted context before model submission", async ({ mount, page }) => { + await mount("unified-model-picker") + await page.getByTestId("dropdown-trigger").click() + const dialog = page.getByRole("dialog") + await dialog.getByRole("button", { name: "Choose profile", exact: true }).click() + await dialog.getByRole("button", { name: "Personal gpt-5-mini", exact: true }).click() + await expect(dialog).toBeVisible() + await expect(page.getByTestId("dropdown-trigger")).toContainText("Personal / gpt-5-mini") + const models = dialog.getByRole("group", { name: "Models from the current provider" }) + await expect(models.getByRole("button", { name: "gpt-5-mini", exact: true })).toHaveAttribute( + "aria-pressed", + "true", + ) + await expect(models.getByRole("button", { name: "gpt-5", exact: true })).toHaveAttribute("aria-pressed", "false") + await dialog.getByRole("textbox", { name: "Search models" }).fill("gpt-5.1-codex-max") + await models.getByRole("button", { name: "gpt-5.1-codex-max", exact: true }).click() + const messages = (await getCapturedVscodeMessages(page)).filter(({ type }) => type === "updateProfileModel") + expect(messages).toEqual([ + expect.objectContaining({ + text: "Personal", + values: expect.objectContaining({ + expectedProvider: providerIdentifiers.openaiNative, + patch: expect.objectContaining({ apiModelId: "gpt-5.1-codex-max" }), + }), + }), + ]) +}) diff --git a/webview-ui/src/components/chat/__tests__/__screenshots__/chat-composer-resting-dark.png b/webview-ui/src/components/chat/__tests__/__screenshots__/chat-composer-resting-dark.png index b829f280789e74525907c49023a86903986e7b0a..c0a7042f804ce9094e32e7562cb9962a432b7a69 100644 GIT binary patch literal 9837 zcmbW7bx>SEwB~^jB)AhagF|o+ZkaH_NrGE&f=h4-4uQelEx5b81t+)%cLp6G*xuy5 zx3#sew(8aXGc|SR_T0XGzCL}vUw5do;ybJtWG@g95U?P!GO7p&hMLIaUSev^j!yZAJ>1nQZYnW?L(si~_we&HnL z{re+M=6G=M&eQVp^7rrG7ZB6~p9$X_q>OBw#X@iXq1trVz}8tsooDYR&OjkV(eS4&D&G>|INmiv<* zom_&iL?;?3!2JBxTnOBIJzAyi}SrkD9$ExjT9!D2TJo;+-J<3GcINGH=+A{2?{Os=-@ z`Sf!Q13A#Qmj+5a&a6W``4|1kme_Zp;<{Ju9hReR#Uay5P4_fvRfe~Pf z@eZS6I^<=Y$j*cyoROUT^0Qxhr?cQP=?_K&X>mRfKUyqhuf2xx_xGmWU|g?C?mBCq zDgAAkaq_z0_@#4br~uF`Wp<@zI4m4js@ApoeZy?+iQ$IAJqe>Fk2dfUw!ldD#eS$R z=dVc*6+m|_>CMa+cnZMn7K9}y)!v};%s)&ppNTdkOry3?LAQ zy}k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A{6o&LU>FiE#c3(dq8~1kcjq5CJgA4{HIa1Fd%+ZLires2^^8x`WBdO76uOl39Nb z-cz3}*P_2xIXpO%3BxhB=;0s_dXGOuq_6r4?EydN6E=iQUl3*@FX?!kCazr91<;EZAQ0RISB87K|*lN(5v6E5+Ung(P zy;Rix7sEK?jihVD{PqSx(cX`R5oG?K&nt<&9l`nE=*oYOGLdy$6uJQ41}Z@|3H)3D z&O;HkuK<{qB#`PsdoAxyugwS`vZQnqU4(IoiOyGh$^eZ54p80S-vdXay4Q;UDCX)~ z|MqT?6kuEE?=MZvNr7{9X%GnX?OVo+1MJ)FP{O&TxRuBDP2W7<_MH_JP!!y2g?~K7 zrU3*<|BJ4!!k2UtDU5}?g`HEUm#>X}HW)PdFbah#Z>P7^LVV6q?TZIvQyyOhf%9#z luO^Hza=-_ex0MVM0{J4x8IhW>6Zj8=w77y;xro01{{XW?f0F { + let setup: () => void + let teardown: () => void + let original: PropertyDescriptor | undefined + + beforeEach(() => { + original = Object.getOwnPropertyDescriptor(HTMLElement.prototype, "focus") + vi.stubGlobal("beforeAll", (callback: () => void) => { + setup = callback + }) + vi.stubGlobal("afterAll", (callback: () => void) => { + teardown = callback + }) + setupNativePickerFocus() + }) + + afterEach(() => { + vi.restoreAllMocks() + vi.unstubAllGlobals() + if (original) Object.defineProperty(HTMLElement.prototype, "focus", original) + document.querySelectorAll("iframe").forEach((frame) => frame.remove()) + }) + + it("installs native focus and restores the exact original descriptor", () => { + setup() + const frame = document.querySelector("iframe") + expect(frame).toBeInTheDocument() + expect(HTMLElement.prototype.focus).toBe(frame?.contentDocument?.createElement("button").focus) + expect(HTMLElement.prototype.focus).not.toBe(original?.value) + teardown() + expect(Object.getOwnPropertyDescriptor(HTMLElement.prototype, "focus")).toEqual(original) + expect(frame).not.toBeInTheDocument() + }) + + it("reports an unavailable iframe document", () => { + vi.spyOn(HTMLIFrameElement.prototype, "contentDocument", "get").mockReturnValue(null) + expect(setup).toThrow("Native DOM focus is unavailable") + expect(Object.getOwnPropertyDescriptor(HTMLElement.prototype, "focus")).toEqual(original) + }) + + it("reports an unavailable original focus descriptor", () => { + const getDescriptor = Object.getOwnPropertyDescriptor + vi.spyOn(Object, "getOwnPropertyDescriptor").mockImplementation((object: object, property: PropertyKey) => + object === HTMLElement.prototype && property === "focus" ? undefined : getDescriptor(object, property), + ) + expect(setup).toThrow("Native DOM focus is unavailable") + vi.restoreAllMocks() + expect(Object.getOwnPropertyDescriptor(HTMLElement.prototype, "focus")).toEqual(original) + }) +}) diff --git a/webview-ui/src/components/chat/model-picker/ModelResults.tsx b/webview-ui/src/components/chat/model-picker/ModelResults.tsx deleted file mode 100644 index 5b418af255..0000000000 --- a/webview-ui/src/components/chat/model-picker/ModelResults.tsx +++ /dev/null @@ -1,102 +0,0 @@ -import { Check } from "lucide-react" -import type { ModelRecord, ProviderName } from "@roo-code/types" - -import { useAppTranslation } from "@/i18n/TranslationContext" -import { cn } from "@/lib/utils" -import { useModelSearch } from "./useModelSearch" -import { pickerResultsClassName } from "./pickerNavigation" - -interface ModelResultsProps { - models: ModelRecord | null - selectedId: string | undefined - search: string - provider: ProviderName | undefined - allowCustomArn: boolean - isLoading: boolean - isError: boolean - settingsOnly: boolean - disabled: boolean - onSelect: (id: string) => void - onRetry: () => void - onSettings: () => void -} - -export function ModelResults(props: ModelResultsProps) { - const { t } = useAppTranslation() - const { - models, - selectedId, - search, - provider, - allowCustomArn, - isLoading, - isError, - settingsOnly, - disabled, - onSelect, - onRetry, - onSettings, - } = props - const results = useModelSearch(models, selectedId, search, provider, allowCustomArn) - return ( -
- {isLoading ? ( -
- {t("chat:modelSelector.loading")} -
- ) : isError ? ( -
- {t("chat:error")} - -
- ) : settingsOnly ? ( -
- {t("chat:modelPicker.modelSettingsHint")} -
- ) : results.length === 0 ? ( -
- {t("common:ui.no_results")} -
- ) : ( - results.map(({ id, info }) => ( - - )) - )} - {!isLoading && (settingsOnly || isError || results.length === 0) && ( - - )} -
- ) -} diff --git a/webview-ui/src/components/chat/model-picker/__tests__/openAiModelDiscovery.spec.tsx b/webview-ui/src/components/chat/model-picker/__tests__/openAiModelDiscovery.spec.tsx index c18addbc4d..b336c0f7ea 100644 --- a/webview-ui/src/components/chat/model-picker/__tests__/openAiModelDiscovery.spec.tsx +++ b/webview-ui/src/components/chat/model-picker/__tests__/openAiModelDiscovery.spec.tsx @@ -29,7 +29,7 @@ const reply = async (data: ExtensionMessage) => { } const requestId = () => vi.mocked(vscode.postMessage).mock.calls.at(-1)?.[0].requestId const correlatedReply = (openAiModels: string[]) => - reply({ type: "openAiModels", requestId: requestId(), openAiModels }) + reply({ type: "providerInfo", requestId: requestId(), values: { data: openAiModels } }) describe("OpenAI model discovery", () => { beforeEach(() => { @@ -41,15 +41,20 @@ describe("OpenAI model discovery", () => { const { result } = renderHook(() => useOpenAiModelCatalog(first, true)) await flush() expect(vscode.postMessage).toHaveBeenCalledWith({ - type: "requestOpenAiModels", + type: "requestProviderInfo", requestId: expect.any(String), - values: { baseUrl: first.openAiBaseUrl, apiKey: first.openAiApiKey, openAiHeaders: first.openAiHeaders }, + values: { + kind: "openAiModels", + baseUrl: first.openAiBaseUrl, + apiKey: first.openAiApiKey, + headers: first.openAiHeaders, + }, }) - await reply({ type: "openAiModels", requestId: "not-ours", openAiModels: ["wrong"] }) - await reply({ type: "openAiModels", openAiModels: ["legacy-settings"] }) + await reply({ type: "providerInfo", requestId: "not-ours", values: { data: ["wrong"] } }) + await reply({ type: "providerInfo", values: { data: ["legacy-settings"] } }) await reply({ type: "state", requestId: requestId() }) expect(result.current.isLoading).toBe(true) - await reply({ type: "openAiModels", requestId: requestId(), openAiModels: ["model", "__proto__"] }) + await reply({ type: "providerInfo", requestId: requestId(), values: { data: ["model", "__proto__"] } }) expect(result.current.models).toHaveProperty("model.contextWindow") expect(Object.hasOwn(result.current.models ?? {}, "__proto__")).toBe(true) expect(result.current.isError).toBe(false) @@ -65,12 +70,28 @@ describe("OpenAI model discovery", () => { await flush() expect(vscode.postMessage).toHaveBeenCalledTimes(2) expect(result.current.models).toBeNull() - await reply({ type: "openAiModels", requestId: oldRequestId, openAiModels: ["first-only"] }) + await reply({ type: "providerInfo", requestId: oldRequestId, values: { data: ["first-only"] } }) expect(result.current.models).toBeNull() await correlatedReply(["second-only"]) expect(Object.keys(result.current.models ?? {})).toEqual(["second-only"]) }) + it("retains completed discovery for cloned equal headers regardless of insertion order", async () => { + const config = { ...first, openAiHeaders: { Authorization: "secret", "X-Account": "one" } } + const { result, rerender } = renderHook(({ settings }) => useOpenAiModelCatalog(settings, true), { + initialProps: { settings: config }, + }) + await correlatedReply(["retained"]) + const models = result.current.models + rerender({ settings: { ...config, openAiHeaders: { "X-Account": "one", Authorization: "secret" } } }) + expect(result.current.models).toBe(models) + expect(result.current.isLoading).toBe(false) + expect(vscode.postMessage).toHaveBeenCalledTimes(1) + rerender({ settings: { ...config, openAiHeaders: { "X-Account": "two", Authorization: "secret" } } }) + expect(result.current.models).toBeNull() + expect(vscode.postMessage).toHaveBeenCalledTimes(2) + }) + it("clears completed results immediately on credential/header changes and retries", async () => { const { result, rerender } = renderHook(({ config }) => useOpenAiModelCatalog(config, true), { initialProps: { config: first }, @@ -87,7 +108,7 @@ describe("OpenAI model discovery", () => { act(() => result.current.refetch()) expect(result.current.isLoading).toBe(true) await flush() - await reply({ type: "openAiModels", requestId: previousRequestId, openAiModels: ["stale"] }) + await reply({ type: "providerInfo", requestId: previousRequestId, values: { data: ["stale"] } }) expect(result.current.isLoading).toBe(true) await correlatedReply(["retried"]) expect(Object.keys(result.current.models ?? {})).toEqual(["retried"]) @@ -127,7 +148,7 @@ describe("OpenAI model discovery", () => { expect(requestId()).not.toBe(firstRequestId) await correlatedReply(["other"]) expect(await two).toEqual(["other"]) - await reply({ type: "openAiModels", requestId: firstRequestId, openAiModels: ["active"] }) + await reply({ type: "providerInfo", requestId: firstRequestId, values: { data: ["active"] } }) expect(await one).toEqual(["active"]) }) @@ -150,8 +171,8 @@ describe("OpenAI model discovery", () => { ) it.each([ - { type: "openAiModels" }, - { type: "openAiModels", error: "Discovery failed", openAiModels: [] }, + { type: "providerInfo" }, + { type: "providerInfo", error: "Discovery failed", values: { data: [] } }, ] satisfies ExtensionMessage[])( "reports a correlated invalid/error reply and permits retry: %j", async (response) => { @@ -176,15 +197,15 @@ describe("OpenAI model discovery", () => { await flush() const timedOutId = requestId() await act(async () => { - await vi.advanceTimersByTimeAsync(10_000) + await vi.advanceTimersByTimeAsync(20_000) }) expect(result.current.isError).toBe(true) expect(remove).toHaveBeenCalledWith("message", expect.any(Function)) expect(vi.getTimerCount()).toBe(0) act(() => result.current.refetch()) await flush() - await reply({ type: "openAiModels", openAiModels: ["ambiguous"] }) - await reply({ type: "openAiModels", requestId: timedOutId, openAiModels: ["late"] }) + await reply({ type: "providerInfo", values: { data: ["ambiguous"] } }) + await reply({ type: "providerInfo", requestId: timedOutId, values: { data: ["late"] } }) expect(result.current.models).toBeNull() await correlatedReply(["correlated"]) expect(Object.keys(result.current.models ?? {})).toEqual(["correlated"]) @@ -242,10 +263,10 @@ describe("OpenAI model discovery", () => { "rejects malformed model lists: %j", async ({ openAiModels }) => { const discovery = discoverOpenAiModels(first, new AbortController().signal) - const assertion = expect(discovery).rejects.toThrow("Invalid model discovery response") + const assertion = expect(discovery).rejects.toMatchObject({ name: "ZodError" }) window.dispatchEvent( new MessageEvent("message", { - data: { type: "openAiModels", requestId: requestId(), openAiModels }, + data: { type: "providerInfo", requestId: requestId(), values: { data: openAiModels } }, }), ) await assertion @@ -256,7 +277,7 @@ describe("OpenAI model discovery", () => { vi.mocked(vscode.postMessage).mockImplementationOnce((message) => { window.dispatchEvent( new MessageEvent("message", { - data: { type: "openAiModels", requestId: message.requestId, openAiModels: ["immediate"] }, + data: { type: "providerInfo", requestId: message.requestId, values: { data: ["immediate"] } }, }), ) }) diff --git a/webview-ui/src/components/chat/model-picker/__tests__/pickerNavigation.spec.tsx b/webview-ui/src/components/chat/model-picker/__tests__/pickerNavigation.spec.tsx new file mode 100644 index 0000000000..162c76b54c --- /dev/null +++ b/webview-ui/src/components/chat/model-picker/__tests__/pickerNavigation.spec.tsx @@ -0,0 +1,93 @@ +import { fireEvent, render, screen } from "@testing-library/react" + +import { handlePickerNavigation } from "../pickerNavigation" +import { setupNativePickerFocus } from "../../__tests__/pickerTestFocus" + +setupNativePickerFocus() + +function setup({ disabled = false, prevented = false } = {}) { + render( +
+ event.preventDefault() : undefined} /> + + + + + + +
, + ) + return { + search: screen.getByRole("textbox"), + first: screen.getByRole("button", { name: "First" }), + last: screen.getByRole("button", { name: "Last" }), + } +} + +describe("handlePickerNavigation", () => { + it.each([ + ["ArrowDown", "first"], + ["ArrowUp", "last"], + ] as const)("moves from search with %s, skipping disabled results", (key, next) => { + const elements = setup() + elements.search.focus() + expect(fireEvent.keyDown(elements.search, { key })).toBe(false) + expect(elements[next]).toHaveFocus() + }) + + it.each([ + ["first", "ArrowUp", "last"], + ["last", "ArrowDown", "first"], + ["first", "ArrowDown", "last"], + ["last", "ArrowUp", "first"], + ["first", "End", "last"], + ["last", "Home", "first"], + ] as const)("navigates %s with %s to %s", (start, key, next) => { + const elements = setup() + elements[start].focus() + expect(fireEvent.keyDown(elements[start], { key })).toBe(false) + expect(elements[next]).toHaveFocus() + }) + + it.each(["Home", "End", "Enter", "Tab", "ArrowLeft"])("leaves search %s native", (key) => { + const { search } = setup() + search.focus() + expect(fireEvent.keyDown(search, { key })).toBe(true) + expect(search).toHaveFocus() + }) + + it("respects a prevented navigation event", () => { + const { search } = setup({ prevented: true }) + search.focus() + expect(fireEvent.keyDown(search, { key: "ArrowDown" })).toBe(false) + expect(search).toHaveFocus() + }) + + it.each(["svg", "non-button"])("ignores a non-HTMLElement or a result outside the button set: %s", (target) => { + const { search } = setup({ disabled: true }) + search.focus() + expect(fireEvent.keyDown(screen.getByTestId(target), { key: "ArrowDown" })).toBe(true) + expect(search).toHaveFocus() + }) + + it("ignores keys from non-result controls", () => { + setup() + const unrelated = screen.getByRole("button", { name: "Unrelated" }) + unrelated.focus() + expect(fireEvent.keyDown(unrelated, { key: "ArrowDown" })).toBe(true) + expect(unrelated).toHaveFocus() + }) + + it("leaves search focused when no enabled results exist", () => { + const { search } = setup({ disabled: true }) + search.focus() + expect(fireEvent.keyDown(search, { key: "ArrowUp" })).toBe(true) + expect(search).toHaveFocus() + }) +}) diff --git a/webview-ui/src/components/chat/model-picker/__tests__/profileModelPatches.spec.ts b/webview-ui/src/components/chat/model-picker/__tests__/profileModelPatches.spec.ts index ce9782ec68..68e568520a 100644 --- a/webview-ui/src/components/chat/model-picker/__tests__/profileModelPatches.spec.ts +++ b/webview-ui/src/components/chat/model-picker/__tests__/profileModelPatches.spec.ts @@ -1,4 +1,6 @@ -import { providerIdentifiers, type ProviderSettings } from "@roo-code/types" +import { providerIdentifiers, retiredProviderIdentifiers, type ProviderSettings } from "@roo-code/types" + +import * as providerModelConfig from "@/components/settings/utils/providerModelConfig" import { createModelPatch } from "../profileModelPatches" @@ -10,6 +12,27 @@ const resets = { } describe("createModelPatch", () => { + afterEach(() => vi.restoreAllMocks()) + + it.each(Object.values(retiredProviderIdentifiers))("rejects retired provider %s", (apiProvider) => { + expect(() => createModelPatch({ apiProvider }, "model")).toThrow("A supported provider is required") + }) + + it("rejects a provider with no model configuration", () => { + vi.spyOn(providerModelConfig, "getProviderModelConfig").mockReturnValue(undefined) + expect(() => createModelPatch({}, "model")).toThrow("supported provider") + }) + + it("preserves non-empty side effect values in partial patches", () => { + vi.spyOn(providerModelConfig, "handleModelChangeSideEffects").mockImplementation((_provider, _id, set) => { + set("reasoningEffort", "high") + }) + expect(createModelPatch({}, "model")).toEqual({ + openRouterModelId: "model", + enableReasoningEffort: null, + reasoningEffort: "high", + }) + }) it.each([ { provider: providerIdentifiers.anthropic, field: "apiModelId" }, { provider: providerIdentifiers.openrouter, field: "openRouterModelId" }, @@ -58,7 +81,7 @@ describe("createModelPatch", () => { ).toEqual({ apiModelId: "custom-arn", ...resets }) }) - it.each(["custom-arn", "arn:aws:bedrock:custom"])( + it.each(["custom-arn", "arn:aws:bedrock:custom", " arn:aws:bedrock:custom "])( "rejects a Bedrock selection requiring new ARN settings: %s", (id) => { expect(() => createModelPatch({ apiProvider: providerIdentifiers.bedrock }, id)).toThrow("Settings") diff --git a/webview-ui/src/components/chat/model-picker/__tests__/reasoning.spec.ts b/webview-ui/src/components/chat/model-picker/__tests__/reasoning.spec.ts index 48662cfac7..c808230a12 100644 --- a/webview-ui/src/components/chat/model-picker/__tests__/reasoning.spec.ts +++ b/webview-ui/src/components/chat/model-picker/__tests__/reasoning.spec.ts @@ -6,6 +6,45 @@ const base: ModelInfo = { contextWindow: 128_000, supportsPromptCache: false } const config: ProviderSettings = { apiProvider: providerIdentifiers.openaiNative } describe("getReasoningSelection", () => { + it("accepts Gemini boolean effort capabilities without treating them as an array restriction", () => { + expect( + getReasoningSelection( + { apiProvider: providerIdentifiers.gemini, reasoningEffort: "minimal", enableReasoningEffort: false }, + { + ...base, + supportsReasoningEffort: true, + }, + ), + ).toMatchObject({ currentEffort: "minimal", reasoningEnabled: true }) + }) + it.each([ + { stored: "high", defaultEffort: "low", current: "high" }, + { stored: undefined, defaultEffort: "high", current: "high" }, + { stored: "medium", defaultEffort: "high", current: "high" }, + { stored: "disable", defaultEffort: "high", current: undefined }, + { stored: "none", defaultEffort: "high", current: undefined }, + { stored: "xhigh", defaultEffort: "high", current: undefined }, + { stored: undefined, defaultEffort: undefined, current: undefined }, + { stored: "medium", defaultEffort: undefined, current: undefined }, + ] satisfies { + stored: ReasoningOption | undefined + defaultEffort: ModelInfo["reasoningEffort"] + current: ReasoningOption | undefined + }[])( + "matches Gemini thinkingLevel runtime for $stored / $defaultEffort despite a false flag", + ({ stored, defaultEffort, current }) => { + const selection = getReasoningSelection( + { apiProvider: providerIdentifiers.gemini, reasoningEffort: stored, enableReasoningEffort: false }, + { + ...base, + supportsReasoningEffort: ["low", "high"], + reasoningEffort: defaultEffort, + }, + ) + expect(selection.currentEffort).toBe(current) + expect(selection.reasoningEnabled).toBe(current !== undefined) + }, + ) it.each([ { name: "optional boolean", diff --git a/webview-ui/src/components/chat/model-picker/__tests__/useModelPickerSubmit.spec.tsx b/webview-ui/src/components/chat/model-picker/__tests__/useModelPickerSubmit.spec.tsx new file mode 100644 index 0000000000..508fb1631b --- /dev/null +++ b/webview-ui/src/components/chat/model-picker/__tests__/useModelPickerSubmit.spec.tsx @@ -0,0 +1,43 @@ +import { act, renderHook } from "@testing-library/react" +import { providerIdentifiers, type ProviderName } from "@roo-code/types" + +import { vscode } from "@/utils/vscode" +import { useModelPickerSubmit } from "../useModelPickerSubmit" + +vi.mock("@/utils/vscode", () => ({ vscode: { postMessage: vi.fn() } })) + +describe("useModelPickerSubmit", () => { + beforeEach(() => vi.clearAllMocks()) + + it.each([ + { name: "disabled", profile: "Work", provider: providerIdentifiers.openaiNative, disabled: true }, + { name: "missing name", profile: undefined, provider: providerIdentifiers.openaiNative, disabled: false }, + { name: "empty name", profile: "", provider: providerIdentifiers.openaiNative, disabled: false }, + { name: "missing provider", profile: "Work", provider: undefined, disabled: false }, + ])("does not send for $name", ({ profile, provider, disabled }) => { + const { result } = renderHook(() => useModelPickerSubmit(profile, provider, disabled)) + act(() => result.current({ apiModelId: "new-model" })) + expect(vscode.postMessage).not.toHaveBeenCalled() + }) + + it("sends the exact partial patch to the current profile and provider after rerender", () => { + const initialProps: { name: string; provider: ProviderName; disabled: boolean } = { + name: "Work", + provider: providerIdentifiers.openaiNative, + disabled: true, + } + const { result, rerender } = renderHook( + ({ name, provider, disabled }) => useModelPickerSubmit(name, provider, disabled), + { initialProps }, + ) + rerender({ name: "Personal", provider: providerIdentifiers.openai, disabled: false }) + const patch = { openAiModelId: "personal-model", enableReasoningEffort: null } + act(() => result.current(patch)) + expect(vscode.postMessage).toHaveBeenCalledTimes(1) + expect(vscode.postMessage).toHaveBeenCalledWith({ + type: "updateProfileModel", + text: "Personal", + values: { expectedProvider: providerIdentifiers.openai, patch }, + }) + }) +}) diff --git a/webview-ui/src/components/chat/model-picker/__tests__/useOpenAiModelCatalog.spec.tsx b/webview-ui/src/components/chat/model-picker/__tests__/useOpenAiModelCatalog.spec.tsx new file mode 100644 index 0000000000..bb91b311b1 --- /dev/null +++ b/webview-ui/src/components/chat/model-picker/__tests__/useOpenAiModelCatalog.spec.tsx @@ -0,0 +1,32 @@ +import { act, renderHook } from "@testing-library/react" + +import { discoverOpenAiModels } from "../openAiModelDiscovery" +import { useOpenAiModelCatalog } from "../useOpenAiModelCatalog" + +vi.mock("../openAiModelDiscovery", () => ({ discoverOpenAiModels: vi.fn() })) + +describe("useOpenAiModelCatalog cancellation", () => { + it.each(["resolve", "reject"] as const)("ignores %s after the request is aborted", async (settlement) => { + let resolve!: (ids: string[]) => void + let reject!: (error: Error) => void + vi.mocked(discoverOpenAiModels).mockImplementationOnce( + () => + new Promise((yes, no) => { + resolve = yes + reject = no + }), + ) + const { result, rerender } = renderHook( + ({ enabled }) => useOpenAiModelCatalog({ openAiBaseUrl: "https://test", openAiApiKey: "secret" }, enabled), + { + initialProps: { enabled: true }, + }, + ) + rerender({ enabled: false }) + await act(async () => { + if (settlement === "resolve") resolve(["stale"]) + else reject(new Error("stale")) + }) + expect(result.current).toMatchObject({ models: null, isLoading: false, isError: false }) + }) +}) diff --git a/webview-ui/src/components/chat/model-picker/__tests__/useProfileModelCatalog.integration.spec.tsx b/webview-ui/src/components/chat/model-picker/__tests__/useProfileModelCatalog.integration.spec.tsx new file mode 100644 index 0000000000..02d3ee766b --- /dev/null +++ b/webview-ui/src/components/chat/model-picker/__tests__/useProfileModelCatalog.integration.spec.tsx @@ -0,0 +1,102 @@ +import { act, waitFor } from "@testing-library/react" + +import { providerIdentifiers, type ProviderSettings, type WebviewMessage } from "@roo-code/types" + +import { createTestQueryClient, renderWithExtensionState } from "@/utils/test-utils" +import { vscode } from "@/utils/vscode" + +import { useProfileModelCatalog } from "../useProfileModelCatalog" + +vi.mock("@/utils/vscode", () => ({ vscode: { postMessage: vi.fn() } })) + +const first: ProviderSettings = { + apiProvider: providerIdentifiers.litellm, + litellmBaseUrl: "https://first.test/v1", + litellmApiKey: "first-secret", +} +const second: ProviderSettings = { ...first, litellmBaseUrl: "https://second.test/v1", litellmApiKey: "second-secret" } +const requests = () => + vi + .mocked(vscode.postMessage) + .mock.calls.map(([request]) => request) + .filter(({ type }) => type === "requestRouterModels") +const reply = async (request: WebviewMessage, id: string) => { + await act(async () => { + window.dispatchEvent( + new MessageEvent("message", { + data: { + type: "routerModels", + requestId: request.requestId, + values: { provider: request.values?.provider }, + routerModels: { litellm: { [id]: { contextWindow: 1000, supportsPromptCache: false } } }, + }, + }), + ) + }) +} + +describe("profile-owned router catalogs", () => { + beforeEach(() => vi.clearAllMocks()) + afterEach(() => vi.restoreAllMocks()) + + it.each([second, { ...first, litellmApiKey: "second-secret" }])( + "isolates endpoint/account changes from cached catalogs and late responses", + async (next) => { + const client = createTestQueryClient() + client.setQueryData(["routerModels", "litellm"], { litellm: { genericStale: {} } }) + let catalog!: ReturnType + const Catalog = ({ config }: { config: ProviderSettings }) => { + catalog = useProfileModelCatalog(config) + return null + } + const result = { + get current() { + return catalog + }, + } + const view = renderWithExtensionState(, { queryClient: client }) + const rerender = ({ config }: { config: ProviderSettings }) => view.rerender() + expect(result.current.models).toBeNull() + await waitFor(() => expect(requests()).toHaveLength(1)) + const a = requests()[0] + expect(a.apiConfiguration).toEqual(first) + await reply(a, "a-only") + await waitFor(() => expect(result.current.models).toHaveProperty("a-only")) + rerender({ config: { ...first } }) + expect(requests()).toHaveLength(1) + expect(result.current.models).toHaveProperty("a-only") + act(() => result.current.refetch()) + await waitFor(() => expect(requests()).toHaveLength(2)) + const oldInFlight = requests()[1] + rerender({ config: next }) + expect(result.current.models).toBeNull() + expect(result.current.isLoading).toBe(true) + await waitFor(() => expect(requests()).toHaveLength(3)) + const b = requests()[2] + expect(b.apiConfiguration).toEqual(next) + expect(b.requestId).not.toBe(oldInFlight.requestId) + await reply(oldInFlight, "late-a-only") + await reply({ ...b, requestId: undefined }, "uncorrelated") + expect(result.current.models).toBeNull() + await reply(b, "b-only") + await waitFor(() => expect(Object.keys(result.current.models ?? {})).toEqual(["b-only"])) + const keys = JSON.stringify( + client + .getQueryCache() + .getAll() + .map(({ queryKey }) => queryKey), + ) + for (const secret of ["first-secret", "second-secret", "first.test", "second.test"]) + expect(keys).not.toContain(secret) + rerender({ config: first }) + expect(result.current.models).toBeNull() + await waitFor(() => expect(requests()).toHaveLength(4)) + await reply(b, "late-b-only") + expect(result.current.models).toBeNull() + await reply(requests()[3], "fresh-a-only") + await waitFor(() => expect(Object.keys(result.current.models ?? {})).toEqual(["fresh-a-only"])) + view.unmount() + client.clear() + }, + ) +}) diff --git a/webview-ui/src/components/chat/model-picker/__tests__/useProfileModelCatalog.spec.tsx b/webview-ui/src/components/chat/model-picker/__tests__/useProfileModelCatalog.spec.tsx index 152c39e09d..5c1eef8dd8 100644 --- a/webview-ui/src/components/chat/model-picker/__tests__/useProfileModelCatalog.spec.tsx +++ b/webview-ui/src/components/chat/model-picker/__tests__/useProfileModelCatalog.spec.tsx @@ -2,7 +2,10 @@ import { act, renderHook } from "@testing-library/react" import { providerIdentifiers, + retiredProviderIdentifiers, friendliModels, + mainlandZAiModels, + internationalZAiModels, type ModelInfo, type ProviderSettings, type RouterModels, @@ -48,7 +51,11 @@ describe("useProfileModelCatalog", () => { isError: false, }) expect(Object.keys(result.current.models ?? {}).length).toBeGreaterThan(0) - expect(routerCalls).toHaveBeenLastCalledWith({ provider: providerIdentifiers.anthropic, enabled: false }) + expect(routerCalls).toHaveBeenLastCalledWith( + expect.objectContaining({ provider: providerIdentifiers.anthropic, enabled: false }), + ) + act(() => result.current.refetch()) + expect(router.refetch).not.toHaveBeenCalled() expect(vscode.postMessage).not.toHaveBeenCalled() }) @@ -83,7 +90,9 @@ describe("useProfileModelCatalog", () => { useProfileModelCatalog({ apiProvider: providerIdentifiers.friendli }), ) expect(result.current.models).toEqual(friendliModels) - expect(routerCalls).toHaveBeenLastCalledWith({ provider: providerIdentifiers.friendli, enabled: true }) + expect(routerCalls).toHaveBeenLastCalledWith( + expect.objectContaining({ provider: providerIdentifiers.friendli, enabled: true }), + ) router.data = { friendli: { fetched: info } } rerender() expect(result.current.models).toEqual({ fetched: info }) @@ -92,15 +101,64 @@ describe("useProfileModelCatalog", () => { expect(result.current.models).toEqual(friendliModels) }) + it("keeps valid Friendli fallback selectable when router discovery fails", () => { + router.isError = true + const { result } = renderHook(() => useProfileModelCatalog({ apiProvider: providerIdentifiers.friendli })) + expect(result.current.models).toEqual(friendliModels) + expect(result.current.isError).toBe(false) + expect(result.current.fallbackMessage).toBeUndefined() + }) + it("uses the configured Z.ai API line", () => { - const { result } = renderHook(() => - useProfileModelCatalog({ apiProvider: providerIdentifiers.zai, zaiApiLine: "china_api" }), + const { result, rerender } = renderHook( + ({ zaiApiLine }: Pick) => + useProfileModelCatalog({ apiProvider: providerIdentifiers.zai, zaiApiLine }), + { initialProps: { zaiApiLine: "china_api" } }, ) - expect(result.current.models).not.toBeNull() + expect(result.current.models).toEqual(mainlandZAiModels) + expect(result.current.models?.["glm-4.5"].inputPrice).toBe(0.29) expect(result.current.field).toBe("apiModelId") + rerender({ zaiApiLine: "international_api" }) + expect(result.current.models).toEqual(internationalZAiModels) + expect(result.current.models?.["glm-4.5"].inputPrice).toBe(0.6) + }) + + it("keeps an available router catalog selectable despite a background error", () => { + router.isError = true + router.data = { requesty: { available: info } } + const { result } = renderHook(() => useProfileModelCatalog({ apiProvider: providerIdentifiers.requesty })) + expect(result.current.isError).toBe(false) + expect(result.current.models).toEqual({ available: info }) + }) + + it("refetches OpenAI discovery and returns its catalog", async () => { + const { result } = renderHook(() => + useProfileModelCatalog({ + apiProvider: providerIdentifiers.openai, + openAiBaseUrl: "https://openai.test/v1", + openAiApiKey: "secret", + }), + ) + expect(result.current.isLoading).toBe(true) + await act(async () => { + window.dispatchEvent( + new MessageEvent("message", { + data: { + type: "providerInfo", + requestId: vi.mocked(vscode.postMessage).mock.calls.at(-1)?.[0].requestId, + values: { data: ["discovered"] }, + }, + }), + ) + }) + expect(result.current.models).toHaveProperty("discovered") + act(() => result.current.refetch()) + expect(result.current.models).toBeNull() + expect(vscode.postMessage).toHaveBeenCalledTimes(2) }) it.each([ + retiredProviderIdentifiers.roo, providerIdentifiers.ollama, providerIdentifiers.lmstudio, providerIdentifiers.vscodeLm, diff --git a/webview-ui/src/components/chat/model-picker/openAiModelDiscovery.ts b/webview-ui/src/components/chat/model-picker/openAiModelDiscovery.ts index 95d743863a..fa202c2b6d 100644 --- a/webview-ui/src/components/chat/model-picker/openAiModelDiscovery.ts +++ b/webview-ui/src/components/chat/model-picker/openAiModelDiscovery.ts @@ -1,63 +1,12 @@ -import { OpenAiModelsMessageType, type ExtensionMessage, type ProviderSettings } from "@roo-code/types" +import type { ProviderSettings } from "@roo-code/types" +import { z } from "zod" -import { vscode } from "@/utils/vscode" +import { requestProviderInfo } from "@/components/ui/hooks/requestProviderInfo" export type OpenAiDiscoverySettings = Pick -const REQUEST_TIMEOUT_MS = 10_000 - -/** One independently abortable request; credentials never enter a shared query cache. */ +/** Credentials stay local to an independently abortable request, never a shared query cache. */ export function discoverOpenAiModels(settings: OpenAiDiscoverySettings, signal: AbortSignal): Promise { - return new Promise((resolve, reject) => { - if (signal.aborted) { - reject(new DOMException("Model discovery aborted", "AbortError")) - return - } - - const requestId = crypto.randomUUID() - const cleanup = () => { - clearTimeout(timeout) - window.removeEventListener("message", onMessage) - signal.removeEventListener("abort", onAbort) - } - const onAbort = () => { - cleanup() - reject(new DOMException("Model discovery aborted", "AbortError")) - } - const onMessage = (event: MessageEvent) => { - const message = event.data - if (message?.type !== OpenAiModelsMessageType.openAiModels || message.requestId !== requestId) return - cleanup() - if (message.error) { - reject(new Error(message.error)) - } else if ( - !Array.isArray(message.openAiModels) || - !message.openAiModels.every((id) => typeof id === "string") - ) { - reject(new Error("Invalid model discovery response")) - } else { - resolve(message.openAiModels) - } - } - const timeout = setTimeout(() => { - cleanup() - reject(new Error("Model discovery timed out; configure this model in Settings.")) - }, REQUEST_TIMEOUT_MS) - window.addEventListener("message", onMessage) - signal.addEventListener("abort", onAbort, { once: true }) - try { - vscode.postMessage({ - type: OpenAiModelsMessageType.requestOpenAiModels, - requestId, - values: { - baseUrl: settings.openAiBaseUrl, - apiKey: settings.openAiApiKey, - openAiHeaders: settings.openAiHeaders, - }, - }) - } catch (error) { - cleanup() - reject(error) - } - }) + const { openAiBaseUrl: baseUrl, openAiApiKey: apiKey, openAiHeaders: headers } = settings + return requestProviderInfo("openAiModels", { baseUrl, apiKey, headers }, signal).then(z.array(z.string()).parse) } diff --git a/webview-ui/src/components/chat/model-picker/reasoning.ts b/webview-ui/src/components/chat/model-picker/reasoning.ts index effc48261a..ad59a214c7 100644 --- a/webview-ui/src/components/chat/model-picker/reasoning.ts +++ b/webview-ui/src/components/chat/model-picker/reasoning.ts @@ -47,6 +47,18 @@ export function getReasoningSelection(config: ProviderSettings, modelInfo?: Mode const stored = manual ? config.openAiCustomModelInfo?.reasoningEffort : config.reasoningEffort const declaredDefault = manual ? undefined : modelInfo?.reasoningEffort + // Match getGeminiReasoning: thinking levels ignore the legacy enable flag, + // reject non-level efforts, and use the model default for unsupported levels. + if (config.apiProvider === providerIdentifiers.gemini) { + const levels: readonly ReasoningOption[] = ["minimal", "low", "medium", "high"] + const selected = stored ?? declaredDefault + const effective = + selected && levels.includes(selected) && Array.isArray(supports) && !supports.includes(selected) + ? declaredDefault + : selected + const currentEffort = effective && levels.includes(effective) ? effective : undefined + return { supportedOptions, currentEffort, reasoningEnabled: currentEffort !== undefined } + } const defaultEffort = declaredDefault ?? (manual ? "low" : required ? "medium" : "disable") const fallback = supportedOptions.includes(defaultEffort) ? defaultEffort : supportedOptions[0] // A false flag must not display an enabled effort; unset still follows model defaults. diff --git a/webview-ui/src/components/chat/model-picker/useModelSearch.ts b/webview-ui/src/components/chat/model-picker/useModelSearch.ts deleted file mode 100644 index 60ae68411b..0000000000 --- a/webview-ui/src/components/chat/model-picker/useModelSearch.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { useMemo } from "react" -import { Fzf } from "fzf" -import { providerIdentifiers, type ModelRecord, type ProviderName } from "@roo-code/types" - -export function useModelSearch( - models: ModelRecord | null, - selectedId: string | undefined, - search: string, - provider: ProviderName | undefined, - allowCustomArn: boolean, -) { - const items = useMemo( - () => - Object.entries(models ?? {}) - .filter(([id, info]) => !info.deprecated || id === selectedId) - .filter( - ([id]) => - provider !== providerIdentifiers.bedrock || - (!id.startsWith("arn:") && (id !== "custom-arn" || allowCustomArn)), - ) - .map(([id, info]) => ({ id, info })) - .sort((a, b) => a.id.localeCompare(b.id)), - [models, selectedId, provider, allowCustomArn], - ) - const fzf = useMemo( - () => new Fzf(items, { selector: ({ id, info }) => `${id} ${info.displayName ?? ""}` }), - [items], - ) - return useMemo(() => (search ? fzf.find(search).map(({ item }) => item) : items), [fzf, items, search]) -} diff --git a/webview-ui/src/components/chat/model-picker/useOpenAiModelCatalog.ts b/webview-ui/src/components/chat/model-picker/useOpenAiModelCatalog.ts index cb2adf8309..368987a552 100644 --- a/webview-ui/src/components/chat/model-picker/useOpenAiModelCatalog.ts +++ b/webview-ui/src/components/chat/model-picker/useOpenAiModelCatalog.ts @@ -6,18 +6,24 @@ import { discoverOpenAiModels, type OpenAiDiscoverySettings } from "./openAiMode type DiscoveryState = { identity: OpenAiDiscoverySettings - attempt: number models: ModelRecord | null - isError: boolean } export function useOpenAiModelCatalog(settings: OpenAiDiscoverySettings, enabled: boolean) { const { openAiBaseUrl, openAiApiKey, openAiHeaders } = settings + // Content identity stays local; credentials must never become query keys. + const headers = JSON.stringify(Object.entries(openAiHeaders ?? {}).sort(([a], [b]) => a.localeCompare(b))) + const [attempt, setAttempt] = useState(0) const identity = useMemo( - () => ({ openAiBaseUrl, openAiApiKey, openAiHeaders, enabled }), - [openAiBaseUrl, openAiApiKey, openAiHeaders, enabled], + () => ({ + openAiBaseUrl, + openAiApiKey, + openAiHeaders: Object.fromEntries(JSON.parse(headers) as [string, string][]), + enabled, + attempt, + }), + [openAiBaseUrl, openAiApiKey, headers, enabled, attempt], ) - const [attempt, setAttempt] = useState(0) const [state, setState] = useState() const refetch = useCallback(() => setAttempt((value) => value + 1), []) // Discovery, unlike inference, has no default base URL or API key. Missing values @@ -32,24 +38,22 @@ export function useOpenAiModelCatalog(settings: OpenAiDiscoverySettings, enabled if (controller.signal.aborted) return setState({ identity, - attempt, models: Object.fromEntries(ids.map((id) => [id, { ...openAiModelInfoSaneDefaults }])), - isError: false, }) }, () => { - if (!controller.signal.aborted) setState({ identity, attempt, models: null, isError: true }) + if (!controller.signal.aborted) setState({ identity, models: null }) }, ) return () => controller.abort() - }, [identity, attempt, canDiscover]) + }, [identity, canDiscover]) // Hide the previous profile's result synchronously, before effect cleanup runs. - const current = canDiscover && state?.identity === identity && state.attempt === attempt ? state : undefined + const current = canDiscover && state?.identity === identity ? state : undefined return { models: current?.models ?? null, isLoading: canDiscover && !current, - isError: (enabled && !canDiscover) || (current?.isError ?? false), + isError: (enabled && !canDiscover) || current?.models === null, refetch, } } diff --git a/webview-ui/src/components/chat/model-picker/useProfileModelCatalog.ts b/webview-ui/src/components/chat/model-picker/useProfileModelCatalog.ts index a0647bec36..02b33923af 100644 --- a/webview-ui/src/components/chat/model-picker/useProfileModelCatalog.ts +++ b/webview-ui/src/components/chat/model-picker/useProfileModelCatalog.ts @@ -46,9 +46,8 @@ export function useProfileModelCatalog(apiConfiguration: ProviderSettings): Prof const isOpenAi = provider === providerIdentifiers.openai && !isUnsupported const isStatic = !!provider && isStaticModelProvider(provider) const fetchRouter = !isUnsupported && !isOpenAi && (!isStatic || provider === providerIdentifiers.friendli) - const router = useRouterModels({ provider, enabled: fetchRouter }) + const router = useRouterModels({ provider, enabled: fetchRouter, apiConfiguration }) const openAi = useOpenAiModelCatalog(apiConfiguration, isOpenAi) - const isError = !isUnsupported && (isOpenAi ? openAi.isError : fetchRouter && router.isError) const models = isUnsupported || !provider ? null @@ -58,6 +57,8 @@ export function useProfileModelCatalog(apiConfiguration: ProviderSettings): Prof ? getStaticModelsForProvider(provider, undefined, apiConfiguration, router.data) : ((router.data as Partial> | undefined)?.[provider] ?? null) + const isError = !isUnsupported && (isOpenAi ? openAi.isError : fetchRouter && router.isError && !models) + return { provider, field: isUnsupported ? undefined : field, diff --git a/webview-ui/src/components/ui/hooks/__tests__/providerInfoHooks.spec.tsx b/webview-ui/src/components/ui/hooks/__tests__/providerInfoHooks.spec.tsx index d50f08179e..88c3be9bee 100644 --- a/webview-ui/src/components/ui/hooks/__tests__/providerInfoHooks.spec.tsx +++ b/webview-ui/src/components/ui/hooks/__tests__/providerInfoHooks.spec.tsx @@ -119,6 +119,68 @@ describe("requestProviderInfo", () => { expectCleanedUp(add, remove) }) + it("does not send or allocate resources for a pre-aborted request", async () => { + const [add, remove] = spyOnListeners() + const controller = new AbortController() + controller.abort() + await expect(requestProviderInfo("openAiModels", {}, controller.signal)).rejects.toMatchObject({ + name: "AbortError", + }) + expect(vscode.postMessage).not.toHaveBeenCalled() + expect(add).not.toHaveBeenCalled() + expect(remove).not.toHaveBeenCalled() + expect(vi.getTimerCount()).toBe(0) + }) + + it("aborts only its own request, cleans up, and ignores late replies", async () => { + const [add, remove] = spyOnListeners() + const controller = new AbortController() + const removeAbort = vi.spyOn(controller.signal, "removeEventListener") + const { sent } = stubHost(() => null) + const aborted = requestProviderInfo("openAiModels", {}, controller.signal) + const assertion = expect(aborted).rejects.toMatchObject({ name: "AbortError" }) + controller.abort() + await assertion + expectCleanedUp(add, remove) + expect(removeAbort).toHaveBeenCalledWith("abort", expect.any(Function)) + const fresh = requestProviderInfo("openAiModels", {}) + const settled = vi.fn() + void fresh.then(settled) + window.dispatchEvent( + new MessageEvent("message", { + data: { type: "providerInfo", requestId: sent[0]?.requestId, values: { data: ["late"] } }, + }), + ) + await Promise.resolve() + expect(settled).not.toHaveBeenCalled() + window.dispatchEvent( + new MessageEvent("message", { + data: { type: "providerInfo", requestId: sent[1]?.requestId, values: { data: ["fresh"] } }, + }), + ) + await expect(fresh).resolves.toEqual(["fresh"]) + expect(vi.getTimerCount()).toBe(0) + }) + + it.each(["success", "error", "timeout", "transport"])("removes the abort listener after %s", async (outcome) => { + spyOnListeners() + const controller = new AbortController() + const addAbort = vi.spyOn(controller.signal, "addEventListener") + const removeAbort = vi.spyOn(controller.signal, "removeEventListener") + stubHost(() => (outcome === "success" ? { data: [] } : outcome === "error" ? { error: "failed" } : null)) + if (outcome === "transport") + vi.mocked(vscode.postMessage).mockImplementationOnce(() => { + throw new Error("transport") + }) + const promise = requestProviderInfo("openAiModels", {}, controller.signal) + const assertion = + outcome === "success" ? expect(promise).resolves.toEqual([]) : expect(promise).rejects.toThrow() + if (outcome === "timeout") await vi.advanceTimersByTimeAsync(20_000) + await assertion + expect(removeAbort).toHaveBeenCalledWith("abort", addAbort.mock.calls[0]?.[1]) + expect(vi.getTimerCount()).toBe(0) + }) + it("ignores replies for other request ids and rejects on timeout", async () => { const [add, remove] = spyOnListeners() stubHost(() => null) diff --git a/webview-ui/src/components/ui/hooks/__tests__/useRouterModels.spec.ts b/webview-ui/src/components/ui/hooks/__tests__/useRouterModels.spec.ts index d8de70b7e0..2c056c7080 100644 --- a/webview-ui/src/components/ui/hooks/__tests__/useRouterModels.spec.ts +++ b/webview-ui/src/components/ui/hooks/__tests__/useRouterModels.spec.ts @@ -16,6 +16,59 @@ vi.mock("@src/utils/vscode", () => ({ })) describe("fetchRouterModels", () => { + test("correlates simultaneous scoped requests for the same provider independently", async () => { + const first = fetchRouterModels(providerIdentifiers.litellm, undefined, { litellmApiKey: "a-secret" }) + const firstId = vi.mocked(vscode.postMessage).mock.calls.at(-1)?.[0].requestId + const second = fetchRouterModels(providerIdentifiers.litellm, undefined, { litellmApiKey: "b-secret" }) + const secondId = vi.mocked(vscode.postMessage).mock.calls.at(-1)?.[0].requestId + const settled = vi.fn() + void second.then(settled) + const send = (requestId: string | undefined, model: string) => + window.dispatchEvent( + new MessageEvent("message", { + data: { + type: "routerModels", + requestId, + values: { provider: providerIdentifiers.litellm }, + routerModels: { litellm: { [model]: {} } }, + }, + }), + ) + send(firstId, "a-only") + await expect(first).resolves.toEqual({ litellm: { "a-only": {} } }) + expect(settled).not.toHaveBeenCalled() + send(secondId, "b-only") + await expect(second).resolves.toEqual({ litellm: { "b-only": {} } }) + }) + + test("ignores correlated scoped replies for a generic aggregate request", async () => { + const promise = fetchRouterModels() + expect(vscode.postMessage).toHaveBeenLastCalledWith({ type: "requestRouterModels" }) + window.dispatchEvent(new MessageEvent("message", { data: { type: "state" } })) + window.dispatchEvent( + new MessageEvent("message", { data: { type: "routerModels", requestId: "scoped", routerModels: {} } }), + ) + window.dispatchEvent( + new MessageEvent("message", { data: { type: "routerModels", routerModels: { openrouter: {} } } }), + ) + await expect(promise).resolves.toEqual({ openrouter: {} }) + }) + + test("rejects a matching reply without a catalog", async () => { + const promise = fetchRouterModels(providerIdentifiers.litellm) + window.dispatchEvent( + new MessageEvent("message", { + data: { type: "routerModels", values: { provider: providerIdentifiers.poe } }, + }), + ) + window.dispatchEvent( + new MessageEvent("message", { + data: { type: "routerModels", values: { provider: providerIdentifiers.litellm } }, + }), + ) + await expect(promise).rejects.toThrow("No router models") + }) + afterEach(() => { vi.restoreAllMocks() vi.useRealTimers() @@ -93,6 +146,22 @@ describe("fetchRouterModels", () => { }) describe("useRouterModels", () => { + test("preserves the generic aggregate query key and disabled option", () => { + const client = createTestQueryClient() + const wrapper = ({ children }: React.PropsWithChildren) => + React.createElement(QueryClientProvider, { client }, children) + const { result, unmount } = renderHook(() => useRouterModels({ enabled: false }), { wrapper }) + expect(result.current.fetchStatus).toBe("idle") + expect( + client + .getQueryCache() + .getAll() + .map(({ queryKey }) => queryKey), + ).toEqual([["routerModels", "all"]]) + unmount() + client.clear() + }) + afterEach(() => { vi.restoreAllMocks() }) diff --git a/webview-ui/src/components/ui/hooks/requestProviderInfo.ts b/webview-ui/src/components/ui/hooks/requestProviderInfo.ts index 7702def0a9..6785f13321 100644 --- a/webview-ui/src/components/ui/hooks/requestProviderInfo.ts +++ b/webview-ui/src/components/ui/hooks/requestProviderInfo.ts @@ -9,24 +9,26 @@ const TIMEOUT_MS = 20_000 export const requestProviderInfo = ( kind: K, params: ProviderInfoParams, + signal?: AbortSignal, ): Promise => new Promise((resolve, reject) => { + if (signal?.aborted) return reject(new DOMException("Provider info request aborted", "AbortError")) const requestId = crypto.randomUUID() - const cleanup = () => { + const cleanup = (error?: unknown) => { clearTimeout(timeout) window.removeEventListener("message", handler) + signal?.removeEventListener("abort", onAbort) + if (error !== undefined) reject(error) } + const onAbort = () => cleanup(new DOMException("Provider info request aborted", "AbortError")) - const timeout = setTimeout(() => { - cleanup() - reject(new Error("Provider info request timed out")) - }, TIMEOUT_MS) + const timeout = setTimeout(() => cleanup(new Error("Provider info request timed out")), TIMEOUT_MS) const handler = (event: MessageEvent) => { const message: ExtensionMessage = event.data - if (message.type !== "providerInfo" || message.requestId !== requestId) return + if (message?.type !== "providerInfo" || message.requestId !== requestId) return cleanup() @@ -38,5 +40,10 @@ export const requestProviderInfo = ( } window.addEventListener("message", handler) - vscode.postMessage({ type: "requestProviderInfo", requestId, values: { kind, ...params } }) + signal?.addEventListener("abort", onAbort, { once: true }) + try { + vscode.postMessage({ type: "requestProviderInfo", requestId, values: { kind, ...params } }) + } catch (error) { + cleanup(error) + } }) diff --git a/webview-ui/src/components/ui/hooks/useRouterModels.ts b/webview-ui/src/components/ui/hooks/useRouterModels.ts index bcac658b04..256c24f6d5 100644 --- a/webview-ui/src/components/ui/hooks/useRouterModels.ts +++ b/webview-ui/src/components/ui/hooks/useRouterModels.ts @@ -1,10 +1,13 @@ import { replaceEqualDeep, useQuery } from "@tanstack/react-query" +import equal from "fast-deep-equal" +import { useRef } from "react" import { allRouterModelsProvider, RouterModelsMessageType, type RouterModels, type ExtensionMessage, + type ProviderSettings, } from "@roo-code/types" import { vscode } from "@src/utils/vscode" @@ -12,15 +15,16 @@ import { vscode } from "@src/utils/vscode" type UseRouterModelsOptions = { provider?: string // single provider filter (e.g. "openrouter") enabled?: boolean // gate fetching entirely + /** Isolated, request-owned discovery. Omitted by legacy aggregate consumers. */ + apiConfiguration?: ProviderSettings } -export const fetchRouterModels = async (provider?: string, signal?: AbortSignal) => +export const fetchRouterModels = async (provider?: string, signal?: AbortSignal, apiConfiguration?: ProviderSettings) => new Promise((resolve, reject) => { + const requestId = apiConfiguration ? crypto.randomUUID() : undefined const cleanup = () => { signal?.removeEventListener("abort", onAbort) - if (typeof window !== "undefined") { - window.removeEventListener("message", handler) - } + window.removeEventListener("message", handler) } const onAbort = () => { @@ -41,7 +45,7 @@ export const fetchRouterModels = async (provider?: string, signal?: AbortSignal) const msgProvider = message?.values?.provider as string | undefined // Verify response matches request - if (provider !== msgProvider) { + if (provider !== msgProvider || message.requestId !== requestId) { // Not our response; ignore and wait for the matching one return } @@ -64,18 +68,27 @@ export const fetchRouterModels = async (provider?: string, signal?: AbortSignal) signal?.addEventListener("abort", onAbort, { once: true }) window.addEventListener("message", handler) - if (provider) { - vscode.postMessage({ type: RouterModelsMessageType.requestRouterModels, values: { provider } }) - } else { - vscode.postMessage({ type: RouterModelsMessageType.requestRouterModels }) - } + vscode.postMessage({ + type: RouterModelsMessageType.requestRouterModels, + ...(provider && { values: { provider } }), + ...(apiConfiguration && { requestId, apiConfiguration }), + }) }) export const useRouterModels = (opts: UseRouterModelsOptions = {}) => { const provider = opts.provider || undefined + const scope = useRef<{ config: ProviderSettings; cacheScope: string }>() + if (opts.apiConfiguration && !equal(scope.current?.config, opts.apiConfiguration)) { + scope.current = { config: opts.apiConfiguration, cacheScope: crypto.randomUUID() } + } + const owned = opts.apiConfiguration ? scope.current : undefined return useQuery({ - queryKey: [RouterModelsMessageType.routerModels, provider || allRouterModelsProvider], - queryFn: ({ signal }) => fetchRouterModels(provider, signal), + queryKey: [ + RouterModelsMessageType.routerModels, + provider || allRouterModelsProvider, + ...(owned ? [owned.cacheScope] : []), + ], + queryFn: ({ signal }) => fetchRouterModels(provider, signal, owned?.config), enabled: opts.enabled !== false, // Structural sharing copies into `{}`, where an own "__proto__" model ID would swap the // copy's prototype instead of becoming a key, so skip sharing for such catalogs. From 63cfd366d666c621496cf8b544c160bfdbd057d2 Mon Sep 17 00:00:00 2001 From: gubin-dev Date: Tue, 17 Nov 2026 16:57:26 +0300 Subject: [PATCH 3/4] docs(chat): document correlated catalog ownership --- webview-ui/src/components/chat/model-picker/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/webview-ui/src/components/chat/model-picker/README.md b/webview-ui/src/components/chat/model-picker/README.md index 773123cb4e..6a58d9fc05 100644 --- a/webview-ui/src/components/chat/model-picker/README.md +++ b/webview-ui/src/components/chat/model-picker/README.md @@ -4,15 +4,15 @@ Public exports are in [index.ts](index.ts). These helpers do not save settings o - [`useProfileModelCatalog(apiConfiguration)`](useProfileModelCatalog.ts:33) returns the resolved provider, typed model-ID field, raw catalog (or null), loading/error/unsupported flags, a settings fallback message, and a void retry callback. Requires the application's React Query provider. Friendli discovery overrides its static fallback. Local/compound providers stay settings-only. - Consumers **must** apply [`filterModels(models, provider, organizationAllowList)`](../../settings/utils/organizationFilters.ts:27) before presenting choices. Also omit deprecated models except the current selection, and omit Bedrock's custom-ARN pseudo-choice unless an ARN is already configured. An empty discovery result is a successful empty catalog; allow opening Settings for manual model IDs. -- [`getReasoningSelection(config, modelInfo)`](reasoning.ts:23) returns supported options, the effective current effort (possibly undefined), and whether reasoning is enabled. Explicit capability arrays are authoritative; required effort cannot be disabled. Unset flags follow defaults, while false disables optional effort. OpenAI-compatible manual controls match Settings and use nested custom-model effort, not a stale top-level effort. Binary/budget models expose no effort choices. +- [`getReasoningSelection(config, modelInfo)`](reasoning.ts:23) returns supported options, the effective current effort (possibly undefined), and whether reasoning is enabled. Explicit capability arrays are authoritative; required effort cannot be disabled. Unset flags follow defaults. Optional reasoning honors the enable flag except Gemini thinking levels, which match inference by ignoring that legacy flag. OpenAI-compatible manual controls use nested custom-model effort, not a stale top-level effort. Binary/budget models expose no effort choices. - [`createReasoningPatch(config, effort, modelInfo?)`](reasoning.ts:76) returns a wire patch. Pass model metadata to reject unsupported choices; without it, standard providers validate the effort enum only. Manual OpenAI choices are always checked. Null restores defaults; disable turns reasoning off; none is an enabled wire level where advertised. OpenAI nested patches contain only effort. - [`createModelPatch(config, id)`](profileModelPatches.ts:16) uses the shared provider field and side effects, adds null clears for the enable flag and OpenAI nested effort, and rejects empty IDs or Bedrock choices requiring new ARN configuration. It does not validate catalog membership: select from the filtered catalog, with the host enforcing the allowlist again. - Submit either patch through the existing profile-model message with the target profile name, expected provider, and values patch. Do not merge the patch into a whole settings snapshot or optimistically overwrite the profile. The host merges it into current storage. -## OpenAI discovery constraints +## Catalog ownership and discovery -[`discoverOpenAiModels()`](openAiModelDiscovery.ts:10) sends one typed host request with a fresh request identifier and accepts only the matching response. Uncorrelated Settings responses and stale responses from another profile or retry are ignored. Abort, completion, transport failure, and the ten-second timeout remove the listener and timer immediately. Requests are independent: no serialization, drain listeners, or session-wide failure flags; retry works without reloading. +[`discoverOpenAiModels()`](openAiModelDiscovery.ts) delegates to the shared, typed provider-info broker. A fresh request identifier isolates each response; abort, completion, transport failure, and the broker's twenty-second timeout remove listeners and timers. Retry works without reloading. -The host echoes the identifier only when the request includes one, preserving the existing response shape for legacy Settings clients. Correlated missing-config and unexpected fetch failures return an error promptly. The existing fetcher converts network failures and invalid URLs into an empty model list; an empty list remains a successful empty catalog, not an invented default model. +The broker's OpenAI fetcher enables strict error propagation, so HTTP/network failures produce errors while a successful empty response remains an empty catalog. Legacy Settings discovery retains its empty-list fallback. Router discovery owns an opaque, configuration-scoped cache key and a correlated request payload, preventing another profile's endpoint/account catalog from appearing during a switch. Credentials never become cache-key strings. [`useOpenAiModelCatalog()`](useOpenAiModelCatalog.ts:14) requires an explicit base URL and API key, matching the host discovery gate. Inference's default OpenAI URL and placeholder key are **not** discovery defaults; missing/empty configuration is immediately settings-only without sending a request. Empty catalogs, errors, and timeouts must also retain the Settings fallback for manual model IDs. Headers and credentials remain in effect closures and the host payload, never React Query keys or shared catalog caches. Disabled discovery sends no requests and reports neither loading nor error. From dd9b3c883499ecf3ed58e04004098509a095d387 Mon Sep 17 00:00:00 2001 From: gubin-dev Date: Tue, 17 Nov 2026 17:25:50 +0300 Subject: [PATCH 4/4] fix(chat): support custom model IDs in unified picker --- .../src/components/chat/ChatTextArea.tsx | 8 +- .../src/components/chat/ModelSelector.tsx | 54 ++++-- .../components/chat/ProfileQuickSettings.tsx | 15 +- .../ChatTextArea.modelPicker.spec.tsx | 21 ++- .../ModelPicker.integration.spec.tsx | 17 ++ .../__tests__/ProfileQuickSettings.spec.tsx | 160 +++++++++++++++++- .../__tests__/UnifiedModelPicker.visual.tsx | 30 +++- .../__tests__/customModel.spec.ts | 42 +++++ .../chat/model-picker/customModel.ts | 49 ++++++ 9 files changed, 368 insertions(+), 28 deletions(-) create mode 100644 webview-ui/src/components/chat/model-picker/__tests__/customModel.spec.ts create mode 100644 webview-ui/src/components/chat/model-picker/customModel.ts diff --git a/webview-ui/src/components/chat/ChatTextArea.tsx b/webview-ui/src/components/chat/ChatTextArea.tsx index ae6cfeb3a1..fc10c8367a 100644 --- a/webview-ui/src/components/chat/ChatTextArea.tsx +++ b/webview-ui/src/components/chat/ChatTextArea.tsx @@ -30,6 +30,7 @@ import { ModeSelector } from "./ModeSelector" import { ApiConfigSelector } from "./ApiConfigSelector" import { ProfileQuickSettings } from "./ProfileQuickSettings" import { getReasoningSelection } from "./model-picker" +import { getPickerSelection } from "./model-picker/customModel" import { AutoApproveDropdown } from "./AutoApproveDropdown" import { MAX_IMAGES_PER_MESSAGE } from "./constants" import ContextMenu from "./ContextMenu" @@ -128,8 +129,13 @@ export const ChatTextArea = forwardRef( commands, enterBehavior, lockApiConfigAcrossModes, + organizationAllowList, } = useExtensionState() - const { id: selectedModelId, info: selectedModelInfo } = useSelectedModel(apiConfiguration) + const { id: selectedModelId, info: selectedModelInfo } = getPickerSelection( + apiConfiguration, + useSelectedModel(apiConfiguration), + organizationAllowList, + ) const { currentEffort: reasoningEffort } = getReasoningSelection(apiConfiguration, selectedModelInfo) // Find the ID and display text for the currently selected API configuration. diff --git a/webview-ui/src/components/chat/ModelSelector.tsx b/webview-ui/src/components/chat/ModelSelector.tsx index ac4c16c347..8173d83803 100644 --- a/webview-ui/src/components/chat/ModelSelector.tsx +++ b/webview-ui/src/components/chat/ModelSelector.tsx @@ -1,7 +1,7 @@ import React from "react" import { Fzf } from "fzf" import { Check } from "lucide-react" -import { type ProviderSettings, providerIdentifiers } from "@roo-code/types" +import { type ProviderSettings } from "@roo-code/types" import { cn } from "@/lib/utils" import { useAppTranslation } from "@/i18n/TranslationContext" @@ -12,8 +12,7 @@ import { useSelectedModel } from "@/components/ui/hooks/useSelectedModel" import { PickerSearchField } from "./PickerSearchField" import type { ProfileModelCatalog } from "./model-picker/useProfileModelCatalog" import { pickerResultsClassName, handlePickerNavigation } from "./model-picker/pickerNavigation" - -const BEDROCK_CUSTOM_ARN_MODEL_ID = "custom-arn" +import { getCustomModelId, getPickerSelection, isPickerModelAllowed } from "./model-picker/customModel" interface ModelSelectorProps { apiConfiguration: ProviderSettings @@ -32,7 +31,11 @@ export const ModelSelector = ({ const [searchValue, setSearchValue] = React.useState("") const { t } = useAppTranslation() const { organizationAllowList } = useExtensionState() - const { id: selectedModelId } = useSelectedModel(apiConfiguration) + const { id: selectedModelId } = getPickerSelection( + apiConfiguration, + useSelectedModel(apiConfiguration), + organizationAllowList, + ) const { provider, models, isLoading, isError, isUnsupported, refetch } = catalog const filteredModelRecord = React.useMemo( () => filterModels(models, provider, organizationAllowList), @@ -40,20 +43,26 @@ export const ModelSelector = ({ ) const modelIds = React.useMemo(() => { - if (!filteredModelRecord) return [] - return Object.entries(filteredModelRecord) + const ids = Object.entries(filteredModelRecord ?? {}) .filter(([id, info]) => { - if ( - provider === providerIdentifiers.bedrock && - (id.startsWith("arn:") || (id === BEDROCK_CUSTOM_ARN_MODEL_ID && !apiConfiguration.awsCustomArn)) - ) - return false + if (!isPickerModelAllowed(apiConfiguration, id, organizationAllowList)) return false if (id === selectedModelId) return true return !info.deprecated }) .map(([id]) => id) - .sort((a, b) => a.localeCompare(b)) - }, [filteredModelRecord, selectedModelId, provider, apiConfiguration.awsCustomArn]) + if (selectedModelId && !Object.prototype.hasOwnProperty.call(models ?? {}, selectedModelId)) { + ids.push(selectedModelId) + } + return ids.sort((a, b) => a.localeCompare(b)) + }, [filteredModelRecord, selectedModelId, models, apiConfiguration, organizationAllowList]) + const customModelId = + !disabled && !isLoading && !isError && !isUnsupported && catalog.field + ? getCustomModelId(searchValue, apiConfiguration, models, organizationAllowList) + : undefined + const selectModel = (id: string) => { + handleSelect(id) + setSearchValue("") + } const searchableItems = React.useMemo( () => @@ -70,8 +79,8 @@ export const ModelSelector = ({ ) const filteredModelIds = React.useMemo(() => { - if (!searchValue) return modelIds - return fzfInstance.find(searchValue).map((result) => result.item.id) + if (!searchValue.trim()) return modelIds + return fzfInstance.find(searchValue.trim()).map((result) => result.item.id) }, [modelIds, searchValue, fzfInstance]) return ( @@ -106,7 +115,7 @@ export const ModelSelector = ({
{t("chat:modelPicker.modelSettingsHint")}
- ) : filteredModelIds.length === 0 ? ( + ) : filteredModelIds.length === 0 && !customModelId ? (
{t("common:ui.no_results")}
@@ -120,7 +129,7 @@ export const ModelSelector = ({ type="button" disabled={disabled} key={modelId} - onClick={() => handleSelect(modelId)} + onClick={() => selectModel(modelId)} aria-current={isSelected ? "true" : undefined} className={cn( "flex w-full cursor-pointer items-center gap-2 border-none px-3 py-1.5 text-left text-sm text-vscode-foreground hover:bg-vscode-list-hoverBackground focus-visible:outline focus-visible:outline-1 focus-visible:outline-vscode-focusBorder disabled:opacity-50", @@ -138,9 +147,18 @@ export const ModelSelector = ({ ) })} + {customModelId && ( + + )}
)} - {!isLoading && (isUnsupported || isError || filteredModelIds.length === 0) && ( + {!isLoading && (isUnsupported || isError) && (