Evidence
Terminal-bench A/B (22 tasks, same model gpt-5.6-sol, same pi agent):
| Leg |
Passed |
Notes |
| Direct to Azure |
17/22 (77%) |
$6.77 |
| Through Lynkr |
8/21 (38%) |
5× AgentTimeoutError, ~3× token burn from slow retried episodes |
Direct strictly dominated (no task passed via Lynkr that failed direct). By contrast, ITSMBench (shorter turns) shows through-Lynkr statistically equal to direct after #91 — so the remaining gap is latency-bound, not correctness-bound.
Cause
The Azure Responses path is called with stream: false: Lynkr buffers the full upstream completion (including long reasoning phases), converts formats (Responses → ChatCompletions → Anthropic → OpenAI), then synthesizes SSE to the client. On long compute-heavy tasks the added seconds-per-turn accumulate past agent harness timeouts (1500s in terminal-bench's case).
Proposed fix
True streaming passthrough for OpenAI-native clients on OpenAI-native upstreams: request stream: true upstream and transform events in flight (the SSE transformer already exists for the Anthropic direction), skipping the buffer-and-convert round trip. Preserve the empty-completion guard and cache-key behavior from #91.
Acceptance test
Re-run the 22-task terminal-bench A/B (harness + configs documented in #91): through-Lynkr pass rate within noise of direct, zero AgentTimeoutError attributable to proxy latency.
🤖 Generated with Claude Code
Evidence
Terminal-bench A/B (22 tasks, same model gpt-5.6-sol, same pi agent):
Direct strictly dominated (no task passed via Lynkr that failed direct). By contrast, ITSMBench (shorter turns) shows through-Lynkr statistically equal to direct after #91 — so the remaining gap is latency-bound, not correctness-bound.
Cause
The Azure Responses path is called with
stream: false: Lynkr buffers the full upstream completion (including long reasoning phases), converts formats (Responses → ChatCompletions → Anthropic → OpenAI), then synthesizes SSE to the client. On long compute-heavy tasks the added seconds-per-turn accumulate past agent harness timeouts (1500s in terminal-bench's case).Proposed fix
True streaming passthrough for OpenAI-native clients on OpenAI-native upstreams: request
stream: trueupstream and transform events in flight (the SSE transformer already exists for the Anthropic direction), skipping the buffer-and-convert round trip. Preserve the empty-completion guard and cache-key behavior from #91.Acceptance test
Re-run the 22-task terminal-bench A/B (harness + configs documented in #91): through-Lynkr pass rate within noise of direct, zero AgentTimeoutError attributable to proxy latency.
🤖 Generated with Claude Code