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 -2
View File
@@ -795,11 +795,10 @@ multi 操作支持一次修改多处:
# 通过插件管理器执行
result = self._execute_tool_by_name(tool_name, tool_args)
# 记录工具结果到历史
# 记录工具结果到历史(官方 OpenAI tool 消息不含 name 字段)
tool_result_msg = {
"role": "tool",
"tool_call_id": call_id,
"name": tool_name,
"content": result[:5000] if result else "执行完成"
}
self.shared_conversation_history.append(tool_result_msg)