diff --git a/packages/cli/src/ui/components/ModelDialog.test.tsx b/packages/cli/src/ui/components/ModelDialog.test.tsx
index d9b563302..cb8585451 100644
--- a/packages/cli/src/ui/components/ModelDialog.test.tsx
+++ b/packages/cli/src/ui/components/ModelDialog.test.tsx
@@ -70,6 +70,10 @@ const renderComponent = (
authType: AuthType.QWEN_OAUTH,
})),
),
+ getModelsConfig: vi.fn(() => ({
+ getGenerationConfig: vi.fn(() => ({ baseUrl: undefined })),
+ })),
+ getActiveRuntimeModelSnapshot: vi.fn(() => undefined),
// --- Functions used by ClearcutLogger ---
getUsageStatisticsEnabled: vi.fn(() => true),
@@ -268,11 +272,9 @@ describe('', () => {
// Select a non-OAuth model (USE_OPENAI)
await childOnSelect(`${AuthType.USE_OPENAI}::gpt-4`);
- expect(switchModel).toHaveBeenCalledWith(
- AuthType.USE_OPENAI,
- 'gpt-4',
- undefined,
- );
+ expect(switchModel).toHaveBeenCalledWith(AuthType.USE_OPENAI, 'gpt-4', {
+ baseUrl: undefined,
+ });
expect(mockSettings.setValue).toHaveBeenCalledWith(
SettingScope.User,
'model.name',
@@ -370,6 +372,10 @@ describe('', () => {
it('updates initialIndex when config context changes', () => {
const mockGetModel = vi.fn(() => DEFAULT_QWEN_MODEL);
const mockGetAuthType = vi.fn(() => 'qwen-oauth');
+ const mockGetModelsConfig = vi.fn(() => ({
+ getGenerationConfig: vi.fn(() => ({ baseUrl: undefined })),
+ }));
+ const mockGetActiveRuntimeModelSnapshot = vi.fn(() => undefined);
const mockSettings = {
isTrusted: true,
user: { settings: {} },
@@ -393,6 +399,8 @@ describe('', () => {
authType: AuthType.QWEN_OAUTH,
})),
),
+ getModelsConfig: mockGetModelsConfig,
+ getActiveRuntimeModelSnapshot: mockGetActiveRuntimeModelSnapshot,
} as unknown as Config
}
>
@@ -417,6 +425,8 @@ describe('', () => {
authType: AuthType.QWEN_OAUTH,
})),
),
+ getModelsConfig: mockGetModelsConfig,
+ getActiveRuntimeModelSnapshot: mockGetActiveRuntimeModelSnapshot,
} as unknown as Config;
rerender(