mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-25 00:51:20 +00:00
feat(providers): extend request_timeout_seconds to all client paths
Follow-up on top of mvanhorn's cherry-picked commit. Original PR only wired request_timeout_seconds into the explicit-creds OpenAI branch at run_agent.py init; router-based implicit auth, native Anthropic, and the fallback chain were still hardcoded to SDK defaults. - agent/anthropic_adapter.py: build_anthropic_client() accepts an optional timeout kwarg (default 900s preserved when unset/invalid). - run_agent.py: resolve per-provider/per-model timeout once at init; apply to Anthropic native init + post-refresh rebuild + stale/interrupt rebuilds + switch_model + _restore_primary_runtime + the OpenAI implicit-auth path + _try_activate_fallback (with immediate client rebuild so the first fallback request carries the configured timeout). - tests: cover anthropic adapter kwarg honoring; widen mock signatures to accept the new timeout kwarg. - docs/example: clarify that the knob now applies to every transport, the fallback chain, and rebuilds after credential rotation.
This commit is contained in:
parent
3143d32330
commit
f1fe29d1c3
9 changed files with 81 additions and 13 deletions
|
|
@ -67,6 +67,10 @@ model:
|
|||
|
||||
# Named provider overrides (optional)
|
||||
# Use this for per-provider request timeouts and per-model exceptions.
|
||||
# Applies to the primary turn client on every api_mode (OpenAI-wire, native
|
||||
# Anthropic, and Anthropic-compatible providers), the fallback chain, and
|
||||
# client rebuilds during credential rotation. Leaving these unset keeps the
|
||||
# SDK defaults (OpenAI ≈ 600s, native Anthropic 900s).
|
||||
#
|
||||
# providers:
|
||||
# ollama-local:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue