mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-10-21 04:26:57 +00:00
When a preflight ping fails or previous_response_not_found is returned, sub2api drops previous_response_id and retries. But if the payload contains function_call_output (tool results), the upstream API loses the response chain context needed to match tool_result to tool_use, causing 400: "No tool call found for function call output". Add hasFunctionCallOutput checks to both recovery paths: - Preflight ping failure recovery (forcePreferredConn path) - recoverIngressPrevResponseNotFound function