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:
parent
63288f1d80
commit
111ca88fab
1 changed files with 6 additions and 0 deletions
|
|
@ -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"),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue