From 8638d342b371ec1dda25d4854a2a82bbaee1530d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=98=B3=E8=99=8E?= Date: Mon, 16 Mar 2026 17:41:59 +0800 Subject: [PATCH] fix: use v1beta endpoint for Google Generative AI The v1beta endpoint is required for Gemini embeddings and other beta features. The v1 endpoint returns 404 errors for embedding operations. Fixes #296 Closes #95 --- cli/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/utils.py b/cli/utils.py index 5a8ec16c..b7369c30 100644 --- a/cli/utils.py +++ b/cli/utils.py @@ -260,7 +260,7 @@ def select_llm_provider() -> tuple[str, str]: # Define OpenAI api options with their corresponding endpoints BASE_URLS = [ ("OpenAI", "https://api.openai.com/v1"), - ("Google", "https://generativelanguage.googleapis.com/v1"), + ("Google", "https://generativelanguage.googleapis.com/v1beta"), ("Anthropic", "https://api.anthropic.com/"), ("xAI", "https://api.x.ai/v1"), ("Openrouter", "https://openrouter.ai/api/v1"),