fix(v8.0): openai 引擎改纯官方格式 + 讯飞 500 兼容 + <input> 向导

- openai_engine: 请求体严格纯官方 OpenAI /chat/completions 格式(tool 消息去 name、
  tool_calls 重建、tools 统一 type=function);500(含 xunfei/Invalid Params)自动去掉
  tools 降级重试;_friendly_error 友好提示;MODEL_CONTEXT_WINDOWS 补讯飞星火。
- ollama_engine/fc_tools/cli_core: tool 消息去 name。
- config.py resolve_input_value(<input> 语法);ollama max_token_k(默认 <input:...>);
  launcher 向导加 max_token_k 步骤。
This commit is contained in:
shuiyu67 committed 2026-08-05 00:26:02 +08:00
1 parent 539c21be72
commit dfc42d8583
7 files changed
+203 -23

No files matched your search

+1 -1
View File
@@ -120,11 +120,11 @@ def fc_result_to_message(tool_call_id: str, tool_name: str, result: str) -> Dict
Returns:
{"role": "tool", "tool_call_id": ..., "content": ...}
注意: 官方 OpenAI 的 tool 消息不含 name 字段(严格服务端如讯飞会拒),故不写入。
"""
return {
"role": "tool",
"tool_call_id": tool_call_id,
"name": tool_name,
"content": result[:10000] if result else "" # 截断过长结果
}