mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-28 01:21:43 +00:00
fix(tools): pass target_model to resolve_runtime_provider in delegation (#15319)
When delegation.model differs from the parent model (e.g., delegating to claude-opus-4-6 on an opencode-zen provider while the parent uses a chat_completions model), resolve_runtime_provider needs the target model to select the correct api_mode. Without it, the delegate inherits the parent's api_mode and gets 404 errors. Supersedes #15320.
This commit is contained in:
parent
00c3d848d8
commit
acfe927294
2 changed files with 22 additions and 3 deletions
|
|
@ -2164,7 +2164,7 @@ def _resolve_delegation_credentials(cfg: dict, parent_agent) -> dict:
|
|||
try:
|
||||
from hermes_cli.runtime_provider import resolve_runtime_provider
|
||||
|
||||
runtime = resolve_runtime_provider(requested=configured_provider)
|
||||
runtime = resolve_runtime_provider(requested=configured_provider, target_model=configured_model)
|
||||
except Exception as exc:
|
||||
raise ValueError(
|
||||
f"Cannot resolve delegation provider '{configured_provider}': {exc}. "
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue