feat(models): add configurable default fallback chain (#3200)

* feat(models): add configurable default fallback chain

* fix(lint): resolve linter issues

* fix(models): keep default fallback chain valid

* fix(models): normalize default chain on model writes

* fix(models): harden fallback chain consistency

* fix(models): preserve raw model provider injection

* fix(agent): preserve provider-prefixed model configs

* fix(agent): preserve injected provider contracts

* fix(agent): preserve fallback providers after model switch

* fix(build): update Go to 1.25.13
This commit is contained in:
LC authored and GitHub committed 2026-08-19 17:17:32 +08:00
1 parent 49183d7e8d
commit bbf6893ca7
39 files changed
+5376 -436

No files matched your search

+1
View File
@@ -429,6 +429,7 @@ func TestPipeline_CallLLM_UsesSuccessfulFallbackDisplayNameWithoutAlias(t *testi
{Provider: "openai", Model: "gpt-5.4", IdentityKey: "model_name:primary", DisplayName: "primary-model"},
{Provider: "anthropic", Model: "claude-sonnet", DisplayName: "anthropic/claude-sonnet"},
}
agent.CandidateProviders[candidateProviderKey(agent.Candidates[1])] = provider
al.fallback = providers.NewFallbackChain(providers.NewCooldownTracker(), nil)
pipeline := NewPipeline(al)