From 34774c587fb2a0184ac825f0314aa5f3fd423105 Mon Sep 17 00:00:00 2001 From: MarkLo Date: Mon, 24 Nov 2025 12:18:01 +0800 Subject: [PATCH] --- README.md | 2 +- cli/utils.py | 2 +- frontend/components/analysis/AnalysisForm.tsx | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index c1ef90a4..33ef5f09 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ TradingAgents 支援業界領先的多家 LLM 提供商,並為每個模型配 |--------|---------|----------|----------------| | **OpenAI** | GPT-5.1, GPT-5 Mini/Nano, GPT-4.1 Mini/Nano, o4-mini | `https://api.openai.com/v1` | ✅ 是 | | **Anthropic** | Claude Haiku 4.5, Claude Sonnet 4.5/4.0, Claude 3.5 Haiku, Claude 3 Haiku | `https://api.anthropic.com/` | ✅ 是 | -| **Gemini** | Gemini 2.5 Pro, Gemini 2.5 Flash, Gemini 2.5 Flash Lite, Gemini 2.0 Flash, Gemini 2.0 Flash Lite | `https://generativelanguage.googleapis.com/v1beta` | ✅ 是 | +| **Gemini** | Gemini 2.5 Pro, Gemini 2.5 Flash, Gemini 2.5 Flash Lite, Gemini 2.0 Flash, Gemini 2.0 Flash Lite | `https://generativelanguage.googleapis.com/v1beta/openai/` | ✅ 是 | | **Grok (xAI)** | Grok-4.1 Fast, Grok-4 Fast, Grok-4, Grok-3, Grok-3 Mini | `https://api.x.ai/v1` | ✅ 是 | | **DeepSeek** | DeepSeek Reasoner, DeepSeek Chat | `https://api.deepseek.com` | ✅ 是 | | **Qwen (Alibaba)** | Qwen3-Max, Qwen-Plus, Qwen Flash | `https://dashscope-intl.aliyuncs.com/compatible-mode/v1` | ✅ 是 | diff --git a/cli/utils.py b/cli/utils.py index 01ea4756..e865dda4 100644 --- a/cli/utils.py +++ b/cli/utils.py @@ -429,7 +429,7 @@ def select_llm_provider() -> tuple[str, str]: BASE_URLS = [ ("OpenAI", "https://api.openai.com/v1"), ("Anthropic", "https://api.anthropic.com/"), - ("Google", "https://generativelanguage.googleapis.com/v1beta"), + ("Google", "https://generativelanguage.googleapis.com/v1beta/openai/"), ("Grok", "https://api.x.ai/v1"), ("DeepSeek", "https://api.deepseek.com"), ("Qwen", "https://dashscope-intl.aliyuncs.com/compatible-mode/v1"), diff --git a/frontend/components/analysis/AnalysisForm.tsx b/frontend/components/analysis/AnalysisForm.tsx index 99900e49..e65274b5 100644 --- a/frontend/components/analysis/AnalysisForm.tsx +++ b/frontend/components/analysis/AnalysisForm.tsx @@ -533,7 +533,7 @@ export function AnalysisForm({ onSubmit, loading = false }: AnalysisFormProps) { Anthropic - + Google (Gemini) @@ -552,7 +552,7 @@ export function AnalysisForm({ onSubmit, loading = false }: AnalysisFormProps) { {(![ "https://api.openai.com/v1", "https://api.anthropic.com/", - "https://generativelanguage.googleapis.com/v1", + "https://generativelanguage.googleapis.com/v1beta/openai/", "https://api.x.ai/v1", "https://api.deepseek.com", "https://dashscope-intl.aliyuncs.com/compatible-mode/v1", @@ -632,7 +632,7 @@ export function AnalysisForm({ onSubmit, loading = false }: AnalysisFormProps) { Anthropic - + Google (Gemini) @@ -651,7 +651,7 @@ export function AnalysisForm({ onSubmit, loading = false }: AnalysisFormProps) { {(![ "https://api.openai.com/v1", "https://api.anthropic.com/", - "https://generativelanguage.googleapis.com/v1", + "https://generativelanguage.googleapis.com/v1beta/openai/", "https://api.x.ai/v1", "https://api.deepseek.com", "https://dashscope-intl.aliyuncs.com/compatible-mode/v1",