fix(honcho): honor per-host timeout in config resolution

HonchoClientConfig timeout/requestTimeout resolution skipped the per-host config
block, silently dropping a host-scoped timeout and falling through to the global
config.yaml value (or the default). Add the host block at the front of the
resolution chain, consistent with every other field (base_url, api_key, etc.).
This commit is contained in:
k4z4n0v4 2026-06-25 10:10:00 +04:00 committed by Teknium
parent 63288f1d80
commit 111ca88fab

View file

@ -457,7 +457,13 @@ class HonchoClientConfig:
or os.environ.get("HONCHO_BASE_URL", "").strip()
or None
)
# Host block wins, then flat/global, then env — consistent with every
# other field above. Previously the host block was skipped, silently
# dropping a per-host `timeout`/`requestTimeout` and falling through to
# config.yaml honcho.timeout (or the 30s default).
timeout = _resolve_optional_float(
host_block.get("timeout"),
host_block.get("requestTimeout"),
raw.get("timeout"),
raw.get("requestTimeout"),
os.environ.get("HONCHO_TIMEOUT"),