Merge branch 'dev' into feat/task-decomposition-copilot

This commit is contained in:
Nicholas Tindle
2026-04-15 15:06:13 -05:00
committed by GitHub
2 changed files with 6 additions and 7 deletions

View File

@@ -156,9 +156,10 @@ class ChatConfig(BaseSettings):
"history compression. Falls back to compression when unavailable.",
)
claude_agent_fallback_model: str = Field(
default="claude-sonnet-4-6",
default="",
description="Fallback model when the primary model is unavailable (e.g. 529 "
"overloaded). The SDK automatically retries with this cheaper model.",
"overloaded). The SDK automatically retries with this cheaper model. "
"Empty string disables the fallback (no --fallback-model flag passed to CLI).",
)
claude_agent_max_turns: int = Field(
default=50,

View File

@@ -86,15 +86,14 @@ class TestResolveFallbackModel:
assert result == "claude-sonnet-4.5-20250514"
def test_default_value(self):
"""Default fallback model resolves to a valid string."""
"""Default fallback model resolves to None (disabled by default)."""
cfg = _make_config()
with patch(f"{_SVC}.config", cfg):
from backend.copilot.sdk.service import _resolve_fallback_model
result = _resolve_fallback_model()
assert result is not None
assert "sonnet" in result.lower() or "claude" in result.lower()
assert result is None
# ---------------------------------------------------------------------------
@@ -198,8 +197,7 @@ class TestConfigDefaults:
def test_fallback_model_default(self):
cfg = _make_config()
assert cfg.claude_agent_fallback_model
assert "sonnet" in cfg.claude_agent_fallback_model.lower()
assert cfg.claude_agent_fallback_model == ""
def test_max_turns_default(self):
cfg = _make_config()