TestNewHasNoHTTPTimeout pins that the streaming Client must NOT set http.Client.Timeout: that field is end-to-end (it covers body reads) and would abort a legitimately slow SSE stream with "context deadline exceeded … while reading body" on slow local backends. Per-turn context cancellation governs
(t *testing.T)
| 817 | // First turn: 400 → fallback → success. |
| 818 | for _, e := range collect(c.Chat(context.Background(), nil, nil)) { |
| 819 | if e.Kind == EventError { |
| 820 | t.Fatalf("first turn must succeed via fallback, got error: %v", e.Err) |
| 821 | } |
| 822 | } |
| 823 | if len(bodies) != 2 { |
| 824 | t.Fatalf("first turn should send initial + retry (2 requests), got %d", len(bodies)) |
| 825 | } |
| 826 | if !strings.Contains(bodies[0], `"reasoning_effort"`) { |
| 827 | t.Fatalf("first attempt should send reasoning_effort: %s", bodies[0]) |