From f46a3ebe79d33ee623d0397294fe23f13db1fd82 Mon Sep 17 00:00:00 2001 From: Roo Code Date: Fri, 20 Feb 2026 16:37:22 +0000 Subject: [PATCH] fix: remove unsafe as any casts in modelCache.ts by extending GetModelsOptions type Add Ollama-specific optional fields (ollamaModelDiscoveryTimeout, ollamaMaxRetries, ollamaRetryDelay, ollamaEnableLogging) to the ollama entry in dynamicProviderExtras, so the discriminated union type properly includes these fields and no as any casts are needed. --- src/api/providers/fetchers/modelCache.ts | 8 ++++---- src/shared/api.ts | 7 ++++++- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/api/providers/fetchers/modelCache.ts b/src/api/providers/fetchers/modelCache.ts index f675dd058f..860ca5155c 100644 --- a/src/api/providers/fetchers/modelCache.ts +++ b/src/api/providers/fetchers/modelCache.ts @@ -74,10 +74,10 @@ async function fetchModelsFromProvider(options: GetModelsOptions): Promise