OpenCode调用codex分组上游报错
按照使用密钥里的配置配置了OpenCode
第一个请求可以成功 抓包看里面用了个tool_call data: {"type":"response.output_item.done","item":{"id":"xxxx","type":"function_call","status":"completed","arguments":"{"path":".","pattern":"**/AGENTS.md"}","call_id":"call_AZBFBAKdDiAMnDvibDzRvIZX","name":"glob"},"output_index":1,"sequence_number":19}
第二个请求带上这个tool_call的结果时 返回上游错误了 结果是 { "type": "function_call_output", "call_id": "call_AZBFBAKdDiAMnDvibDzRvIZX", "output": "No files found" }
错误写的是 { "error": { "code": null, "message": "No tool call found for function call output with call_id call_AZBFBAKdDiAMnDvibDzRvIZX.", "param": "input", "type": "invalid_request_error" } }
请问这是适配的问题还是什么别的问题
https://github.com/Wei-Shaw/sub2api/releases/tag/v0.1.53
更新到新版 再按新的教程配置试一下。
确实可以用了 不过我发现这么配置opencode会有一些gpt-5-nano的请求也走过来了 会导致以下的错误 虽然看起来不影响使用 { "error": { "code": "unsupported_value", "message": "Unsupported value: 'minimal' is not supported with the 'gpt-5.1' model. Supported values are: 'none', 'low', 'medium', and 'high'.", "param": "reasoning.effort", "type": "invalid_request_error" } }
gpt-5-nano映射成了gpt-5.1 ,minimal映射成了none,新版应该没问题吧?
貌似你的新fix还木有发版 等新版发了我试试再
暂时不建议用 OpenCode,抓包看了下,OpenCode 中的请求不带 session_id 参数,导致 sub2api 接口粘性会话不生效,调用的账号会一直变,缓存命中率比较低