From 5e882481c6d72b2cea677c796e9035dad79df42d Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Fri, 17 Jul 2026 17:08:02 +0000 Subject: [PATCH] docs(sdks): document python tcp_keepalive generator config option Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- .../sdks/generators/python/configuration.mdx | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/fern/products/sdks/generators/python/configuration.mdx b/fern/products/sdks/generators/python/configuration.mdx index 47036fd155..be8bd7ace0 100644 --- a/fern/products/sdks/generators/python/configuration.mdx +++ b/fern/products/sdks/generators/python/configuration.mdx @@ -211,6 +211,33 @@ Allow specifying arbitrary configuration to your packages `pyproject.toml` by ad When enabled, skips code formatting (like black) on the generated Python code. + +Opt in to platform-guarded TCP keepalive on the generated default `httpx` transport. Disabled by default, so existing generated SDKs are unchanged. When enabled, the transport applies `SO_KEEPALIVE` plus best-effort per-platform idle, interval, and probe-count settings, so long, non-streaming requests survive idle-connection reaping by a firewall or load balancer. + +```yaml +config: + tcp_keepalive: + enabled: true + idle_seconds: 60 + interval_seconds: 30 + count: 5 +``` + +Requires `httpx>=0.25`. A user-supplied `httpx_client`, or a `custom_transport` `http_client`, always takes precedence over the keepalive default, which only affects the generated default transport. + + + Whether to enable TCP keepalive on the generated default transport. + + + Seconds a connection is idle before the first keepalive probe. + + + Seconds between keepalive probes. + + + Number of failed probes before the connection is dropped. + + Sets the client timeout in seconds, or `infinity` to disable timeouts.