From f517cc06eed75dbcd4137202f3ee3d8723144d3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=86=E5=BC=A0=E5=BC=9B?= Date: Sat, 14 Mar 2026 11:03:47 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20=E6=9B=B4=E6=96=B0README=E4=BB=A5?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0Codex=20OAuth=E8=AE=A4=E8=AF=81=E8=AF=B4?= =?UTF-8?q?=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 添加ChatGPT Plus/Pro账户的Codex OAuth认证方式说明 更新支持的LLM提供商列表和默认配置参数 --- README.md | 35 +++++++++++++++++++++++++++++------ 1 file changed, 29 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 34310010..55264e26 100644 --- a/README.md +++ b/README.md @@ -116,9 +116,32 @@ Install dependencies: pip install -r requirements.txt ``` -### Required APIs +### Authentication / APIs -TradingAgents supports multiple LLM providers. Set the API key for your chosen provider: +TradingAgents supports multiple LLM providers. + +#### Option A (Default): ChatGPT OAuth for Codex models (no `OPENAI_API_KEY`) + +If you have a ChatGPT Plus/Pro account, login once: + +```bash +tradingagents auth login +# If local callback port 1455 is busy: +tradingagents auth login --manual +``` + +Check status / logout: + +```bash +tradingagents auth status +tradingagents auth logout +``` + +`codex_oauth` currently uses a Codex model whitelist: +- `gpt-5.2-codex` +- `gpt-5.2` + +#### Option B: API keys for other providers ```bash export OPENAI_API_KEY=... # OpenAI (GPT) @@ -162,7 +185,7 @@ An interface will appear showing results as they load, letting you track the age ### Implementation Details -We built TradingAgents with LangGraph to ensure flexibility and modularity. The framework supports multiple LLM providers: OpenAI, Google, Anthropic, xAI, OpenRouter, and Ollama. +We built TradingAgents with LangGraph to ensure flexibility and modularity. The framework supports multiple LLM providers: Codex OAuth (ChatGPT Plus/Pro), OpenAI, Google, Anthropic, xAI, OpenRouter, and Ollama. ### Python Usage @@ -186,9 +209,9 @@ from tradingagents.graph.trading_graph import TradingAgentsGraph from tradingagents.default_config import DEFAULT_CONFIG config = DEFAULT_CONFIG.copy() -config["llm_provider"] = "openai" # openai, google, anthropic, xai, openrouter, ollama -config["deep_think_llm"] = "gpt-5.2" # Model for complex reasoning -config["quick_think_llm"] = "gpt-5-mini" # Model for quick tasks +config["llm_provider"] = "codex_oauth" # codex_oauth, openai, google, anthropic, xai, openrouter, ollama +config["deep_think_llm"] = "gpt-5.4" +config["quick_think_llm"] = "gpt-5.2" config["max_debate_rounds"] = 2 ta = TradingAgentsGraph(debug=True, config=config)