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:
Kunthawat Greethong
2026-06-17 21:46:45 +07:00
parent 2bb1afab68
commit 7f04bc44fb
3 changed files with 3 additions and 3 deletions

View File

@@ -1027,7 +1027,7 @@ def create_model(config: Dict[str, Any], use_boost: bool = False):
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"{config_label} model={llm_model}, base_url={llm_base_url[:40] if llm_base_url else '默认'}...")