mirror of
https://wget.la/https://github.com/leookun/cursor-byok
synced 2026-08-19 20:47:00 +08:00
trimDanglingAssistantToolCalls in the provider router held the same consecutive-tool-message assumption as the replay projector: when a model emits function_call items before explanation text within one response (e.g. gpt-5.3-codex-spark), the sanitized sequence becomes assistant[tool_call] -> assistant[text] -> tool[result] and responded calls were stripped at the provider boundary even though the projector already replayed them correctly. The orphan tool result then forced the Responses adapter to synthesize a placeholder function_call with empty arguments, degrading the arguments the model sees on in-loop requests. Widen the response collection window to skip interleaved plain assistant text messages and drop orphan tool results, mirroring the projector fix.