mirror of
https://github.com/Routstr/routstr-core.git
synced 2026-10-05 20:28:23 +00:00
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.