fix: Step 5 — camel-ai reads OPENAI_API_BASE_URL not OPENAI_BASE_URL

Root cause found in container: camel-ai v0.2.78 openai_model.py L117 reads
os.environ.get('OPENAI_API_BASE_URL') — NOT OPENAI_BASE_URL.

Fix: Set BOTH env vars (OPENAI_BASE_URL for OpenAI SDK + OPENAI_API_BASE_URL for camel-ai).
Keep model_config_dict={} empty so nothing spreads to create().

Also fix Step 2 Thai truncation: \w regex doesn't match Thai tone marks (Mn category).
Use explicit Unicode range \u0E00-\u0E7F instead.
This commit is contained in:
Kunthawat Greethong
2026-06-22 11:42:56 +07:00
parent afc7afa2f5
commit 0e263f0490
4 changed files with 5 additions and 2 deletions

View File

@@ -458,6 +458,7 @@ class RedditSimulationRunner:
if llm_base_url:
os.environ["OPENAI_BASE_URL"] = llm_base_url
os.environ["OPENAI_API_BASE_URL"] = llm_base_url
print(f"LLM配置: model={llm_model}, base_url={llm_base_url[:40] if llm_base_url else '默认'}...")