Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion agent/auxiliary_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -4147,7 +4147,15 @@ def _wrap_if_needed(client_obj, final_model_str: str, base_url_str: str = "",
"Dropping OpenRouter-format model %r for non-OpenRouter "
"auxiliary provider (using %r instead)", model, resolved)
model = None
final_model = model or resolved
# _resolve_auto() already handles MoA preset → aggregator resolution
# (PR #53827). Its returned ``resolved`` model is the real model ID
# the endpoint accepts. The pre-filled ``model`` from
# _read_main_model() may be a MoA preset name (e.g. "default") that
# is NOT a valid model ID — using it overrides _resolve_auto's
# correct resolution and causes HTTP 400. Prefer ``resolved`` so
# the auto-detect chain's answer wins; ``model`` remains as
# fallback when _resolve_auto returns None (non-MoA fallthrough).
final_model = resolved or model
return (_to_async_client(client, final_model, is_vision=is_vision) if async_mode
else (client, final_model))

Expand Down