mirror of
https://github.com/usestrix/strix.git
synced 2026-10-10 03:28:11 +00:00
fix: reject a fallback model on a different tool-schema route
This commit is contained in:
parent
2c5d4a166b
commit
9ddb2b0bb6
1 changed files with 10 additions and 0 deletions
|
|
@ -176,6 +176,16 @@ async def run_strix_scan(
|
||||||
coordinator = AgentCoordinator()
|
coordinator = AgentCoordinator()
|
||||||
coordinator.set_snapshot_path(agents_path)
|
coordinator.set_snapshot_path(agents_path)
|
||||||
fallback_model = settings.llm.fallback_model
|
fallback_model = settings.llm.fallback_model
|
||||||
|
if fallback_model and (
|
||||||
|
uses_chat_completions_tool_schema(fallback_model, settings) != chat_completions_tools
|
||||||
|
):
|
||||||
|
# Agents build their tool set once, for the primary model's schema. A
|
||||||
|
# fallback on the other SDK route would reject every replayed turn, so
|
||||||
|
# it can never recover a denied agent — fail fast instead.
|
||||||
|
raise RuntimeError(
|
||||||
|
f"STRIX_LLM_FALLBACK '{fallback_model}' uses a different tool schema than "
|
||||||
|
f"'{resolved_model}'. Pick a fallback from the same provider family."
|
||||||
|
)
|
||||||
coordinator.configure_denial_fallback(
|
coordinator.configure_denial_fallback(
|
||||||
fallback_model,
|
fallback_model,
|
||||||
settings.llm.denied_retries,
|
settings.llm.denied_retries,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue