Files
redshift 45078697fa fix(ehbp): raise upstream timeout default to 600s
EHBP (Tinfoil) forwarding applied a hard-coded 60-second budget to each
stage of the h11 client: TCP/TLS connect, request send, and response read.
Long reasoning or tool-calling turns can stay silent well past a minute,
so those requests were cut mid-turn and surfaced as a 504 (with the
X-Cashu path refunding the redeemed amount).

- Bump _DEFAULT_TIMEOUT_SECONDS in tinfoil_trailer.py from 60s to 600s.
  Both ehbp.py call sites rely on the default, so the X-Cashu and bearer
  paths both pick this up. The separate 1s close timeout is untouched.

Note the budget remains per-stage, not a wall-clock cap on the whole
request; it is not env-configurable.

Tests pass their own timeout_seconds explicitly, so none depend on the
previous default. The mocked timeout message in test_ehbp_timeout.py is
updated only to keep the wording consistent with the real error string.
2026-09-20 17:28:15 +03:00
..
2025-08-06 20:31:55 -03:00