wutsusemi
wutsusemi
在使用codex进行工具调用时出现错误: Error code: 400 - {'error': {'message': 'Provider API error: Unsupported legacy protocol: /v1/chat/completions is not supported. Please use /v1/responses. (request id: 2026031017460545047272d8iBfaXx)', 'type': 'invalid_request_error'}}。 希望openai兼容支持 /v1/responses 端点或允许自定义 API 请求路径
通过 OneAPI 调用模型时,经常调用失败,出现LLM 返回了空响应,似乎原因是模型经常将结构化数据直接以纯文本 JSON 形式返回,而不是标准的 OpenAI tool_calls 格式,而当前的 agent_service.py 使用 model.with_structured_output(output_type) 时,如果未检测到 tool_calls 会直接返回 None,导致代码抛出 "LLM 返回了空响应" 错误,即使模型实际上已经生成了有效的 JSON 内容。 建议在 run_llm_agent 方法中增加处理策略,用ai给出的方案是: 优先尝试 method="json_mode",强制模型输出 JSON;若 LangChain 解析失败(返回 None),增加手动解析...