mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-29 06:31:32 +00:00
fix(fallback): forward custom_providers to fallback model context-length detection
Original commit 21078ebce by PaTTeeL targeted _try_activate_fallback in
pre-refactor run_agent.py. The body now lives in
agent/chat_completion_helpers.try_activate_fallback — re-applied there.
Co-authored-by: PaTTeeL <9150277+PaTTeeL@users.noreply.github.com>
This commit is contained in:
parent
4ab9a06a51
commit
b5bcffe167
1 changed files with 1 additions and 0 deletions
|
|
@ -850,6 +850,7 @@ def try_activate_fallback(agent, reason: "FailoverReason | None" = None) -> bool
|
|||
agent.model, base_url=agent.base_url,
|
||||
api_key=agent.api_key, provider=agent.provider,
|
||||
config_context_length=getattr(agent, "_config_context_length", None),
|
||||
custom_providers=agent._custom_providers,
|
||||
)
|
||||
agent.context_compressor.update_model(
|
||||
model=agent.model,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue