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
This commit is contained in:
阳虎 2026-03-16 17:41:59 +08:00
parent f362a160c3
commit 8638d342b3
1 changed files with 1 additions and 1 deletions

View File

@ -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"),