fix(fallback): merge fallback_providers with legacy fallback_model configurations

This commit is contained in:
QuenVix 2026-05-23 09:31:27 +03:00 committed by Teknium
parent 7f1b2b4569
commit 7245bc77eb
8 changed files with 178 additions and 38 deletions

View file

@ -102,6 +102,20 @@ class TestVerboseAndToolProgress:
assert cli.tool_progress_mode in {"off", "new", "all", "verbose"}
class TestFallbackChainInit:
def test_merges_new_and_legacy_fallback_config(self):
cli = _make_cli(config_overrides={
"fallback_providers": [
{"provider": "openrouter", "model": "anthropic/claude-sonnet-4.6"},
],
"fallback_model": {"provider": "nous", "model": "Hermes-4"},
})
assert cli._fallback_model == [
{"provider": "openrouter", "model": "anthropic/claude-sonnet-4.6"},
{"provider": "nous", "model": "Hermes-4"},
]
class TestBusyInputMode:
def test_default_busy_input_mode_is_interrupt(self):
cli = _make_cli()