Skip to content

Commit 981b403

Browse files
test(zoo-gateway): drop stale profile-scan test for requestRouterModels
Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 67cefa5 commit 981b403

1 file changed

Lines changed: 0 additions & 52 deletions

File tree

src/core/webview/__tests__/webviewMessageHandler.spec.ts

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -381,58 +381,6 @@ describe("webviewMessageHandler - requestRouterModels", () => {
381381
})
382382
})
383383

384-
it("recovers zoo-gateway credentials from a separate profile when not the active provider", async () => {
385-
// Regression: when zoo-gateway is NOT the active provider, the active apiConfiguration
386-
// will not contain zooSessionToken / zooGatewayBaseUrl. The aggregate model fetcher must
387-
// fall back to scanning providerSettingsManager profiles for a zoo-gateway entry so the
388-
// model picker still populates.
389-
mockClineProvider.getState = vi.fn().mockResolvedValue({
390-
apiConfiguration: {
391-
// Active provider is anthropic (or anything other than zoo-gateway).
392-
apiProvider: "anthropic",
393-
openRouterApiKey: "openrouter-key",
394-
requestyApiKey: "requesty-key",
395-
// No zooSessionToken / zooGatewayBaseUrl on the active config.
396-
},
397-
})
398-
;(mockClineProvider as any).providerSettingsManager = {
399-
listConfig: vi.fn().mockResolvedValue([
400-
{ name: "Anthropic", apiProvider: "anthropic" },
401-
{ name: "My Zoo Gateway Profile", apiProvider: "zoo-gateway" },
402-
]),
403-
getProfile: vi.fn().mockResolvedValue({
404-
apiProvider: "zoo-gateway",
405-
zooSessionToken: "recovered-zoo-token",
406-
zooGatewayBaseUrl: "https://zoo.example.com/api/gateway/v1",
407-
}),
408-
}
409-
410-
const mockModels: ModelRecord = {
411-
"model-1": {
412-
maxTokens: 4096,
413-
contextWindow: 8192,
414-
supportsPromptCache: false,
415-
description: "Test model 1",
416-
},
417-
}
418-
mockGetModels.mockResolvedValue(mockModels)
419-
420-
await webviewMessageHandler(mockClineProvider, { type: "requestRouterModels" })
421-
422-
expect((mockClineProvider as any).providerSettingsManager.listConfig).toHaveBeenCalled()
423-
expect((mockClineProvider as any).providerSettingsManager.getProfile).toHaveBeenCalledWith({
424-
name: "My Zoo Gateway Profile",
425-
})
426-
expect(mockGetModels).toHaveBeenCalledWith({
427-
provider: "zoo-gateway",
428-
apiKey: "recovered-zoo-token",
429-
baseUrl: "https://zoo.example.com/api/gateway/v1",
430-
})
431-
432-
// Reset to avoid bleeding into other tests
433-
delete (mockClineProvider as any).providerSettingsManager
434-
})
435-
436384
it("handles LiteLLM models with values from message when config is missing", async () => {
437385
mockClineProvider.getState = vi.fn().mockResolvedValue({
438386
apiConfiguration: {

0 commit comments

Comments
 (0)