mirror of
https://github.com/tiennm99/goclaw.git
synced 2026-08-01 06:21:37 +00:00
GPT-5 and o-series models reject the legacy max_tokens parameter and require max_completion_tokens instead. Additionally, gpt-5-mini, gpt-5-nano, and o-series models only support the default temperature (1). This patch adds model-aware branching in buildRequestBody() to: - Send max_completion_tokens instead of max_tokens for gpt-5*/o1/o3/o4 - Skip temperature parameter for gpt-5-mini/gpt-5-nano/o-series Co-authored-by: Marcelo Emmerich <marcelo@agenticsystems.de>