feat: 完成项目助手与监控演示并修复聊天及云部署配置
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
"""Explicit chat-only provider compatibility, without exposing reasoning as answers."""
|
||||
import os
|
||||
|
||||
|
||||
def chat_model_options():
|
||||
mode = os.getenv("CHAT_THINKING_MODE", "").strip().lower()
|
||||
if mode not in ("", "disabled", "enabled"):
|
||||
raise ValueError("CHAT_THINKING_MODE 只允许 disabled、enabled 或留空")
|
||||
options = {"timeout": 60, "max_retries": 0}
|
||||
if mode:
|
||||
options["extra_body"] = {"thinking": {"type": mode}}
|
||||
return options
|
||||
Reference in New Issue
Block a user