mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-10-07 16:18:29 +08:00
Adversarial re-verification found one more divergence from the double-conversion chain: an upstream 200 with empty choices (or a nil response) left stop_reason as an empty string, while the old chain reports end_turn. Derive the fallback from the content blocks — the guard never fires when choices exist, since every finish_reason maps to a non-empty stop_reason. Also strengthen the equivalence tests: compare tool_use Content[].Input and tool_call Function.Arguments across bridges, and add an empty-choices stop_reason parity case.