fix: use correct env var OPENAI_BASE_URL for camel-ai LLM routing
camel-ai's OpenAI model reads OPENAI_BASE_URL, not OPENAI_API_BASE_URL. This caused all simulation LLM calls to go to api.openai.com instead of the configured provider (DeepSeek, Xiaomi Mimo, etc), resulting in 401.
This commit is contained in:
@@ -457,7 +457,7 @@ class RedditSimulationRunner:
|
||||
raise ValueError("缺少 API Key 配置,请在项目根目录 .env 文件中设置 LLM_API_KEY")
|
||||
|
||||
if llm_base_url:
|
||||
os.environ["OPENAI_API_BASE_URL"] = llm_base_url
|
||||
os.environ["OPENAI_BASE_URL"] = llm_base_url
|
||||
|
||||
print(f"LLM配置: model={llm_model}, base_url={llm_base_url[:40] if llm_base_url else '默认'}...")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user