{"version":"2.1.295","anchor":"http-idle-timeout-can-be-set-by-a-new-bodyidletimeout-option","canonical_anchor":"http-idle-timeout-can-be-set-by-a-new-bodyidletimeout-option","heading":"Stream idle and API timeouts can now come from a config, with API_FORCE_IDLE_TIMEOUT taking precedence","tier":"use","area":"Streaming","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.295\/e\/http-idle-timeout-can-be-set-by-a-new-bodyidletimeout-option","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.295","markdown":"### Stream idle and API timeouts can now come from a config, with API_FORCE_IDLE_TIMEOUT taking precedence\n\nIdle and request timeouts can now be set from a config (bodyIdleTimeout, stream_idle_timeout_ms, api_timeout_ms) when the env vars are unset\n\n**Unclear.** Whether `bodyIdleTimeout` is something a user can set, and what it defaults to, is not settled.\n\n**What**\n\nA timeout is how long Claude Code waits before giving up. The body idle timeout stops a streaming reply when no data arrives for too long.\n\n- `API_FORCE_IDLE_TIMEOUT`, when set to a true or false value, now takes precedence. Otherwise a new `bodyIdleTimeout` option decides whether the idle timeout applies.\n\n- The API client reads a `body_idle_timeout` value from a config object and passes it on as `bodyIdleTimeout` only when it is true or false.\n\n- `CLAUDE_STREAM_IDLE_TIMEOUT_MS` now falls back to a `stream_idle_timeout_ms` config value. That value must be a whole number within limits and is capped at the maximum.\n\n- If `API_TIMEOUT_MS` is unset, the request timeout now comes from `api_timeout_ms` in the same config, still defaulting to 600000 (10 minutes).\n\n- A new lower limit keeps a timeout at no less than 300000 milliseconds (5 minutes).\n\n- Provider setup now takes the provider and a resolved value instead of the old region helpers.\n\n**Why**\n\nIf you see stalled streams or early timeouts, the environment variables still win when set, but when they are not, the values may now come from a config rather than fixed defaults.\n\n- Area: Streaming\n- Names: `API_FORCE_IDLE_TIMEOUT`\n- Tier: Use it now\n- Useful: 2\/5\n- Signal: 2\/5\n- Scope: individual\n- Heads-up: no"}