diff --git a/src/api/__tests__/index.spec.ts b/src/api/__tests__/index.spec.ts index 2fe940f53a..10bfc2a133 100644 --- a/src/api/__tests__/index.spec.ts +++ b/src/api/__tests__/index.spec.ts @@ -77,7 +77,7 @@ const expectedHandlers = { [providerIdentifiers.ollama]: NativeOllamaHandler, [providerIdentifiers.lmstudio]: LmStudioHandler, [providerIdentifiers.gemini]: GeminiHandler, - // Gemini CLI currently relies on the factory's default Anthropic handler. + // Gemini CLI has no dedicated handler yet; the factory routes it explicitly to the Anthropic handler. [providerIdentifiers.geminiCli]: AnthropicHandler, [providerIdentifiers.openaiCodex]: OpenAiCodexHandler, [providerIdentifiers.openaiNative]: OpenAiNativeHandler, diff --git a/src/api/index.ts b/src/api/index.ts index 8e7f20d66f..6962842456 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -235,6 +235,11 @@ export function buildApiHandler(configuration: ProviderSettings): ApiHandler { return new BasetenHandler(options) case providerIdentifiers.poe: return new PoeHandler(options) + // Gemini CLI has no dedicated handler yet. Route it explicitly to the + // Anthropic handler (the current runtime behavior) so the fallback is + // documented instead of falling through the default implicitly (#1029). + case providerIdentifiers.geminiCli: + return new AnthropicHandler(options) default: return new AnthropicHandler(options) }