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

+9
View File
@@ -147,6 +147,7 @@ type turnExecution struct {
llmOpts map[string]any
gracefulTerminal bool
useNativeSearch bool
ownedProviders []providers.LLMProvider
// Phase tracking
phase LLMPhase
@@ -156,6 +157,14 @@ type turnExecution struct {
abortedByHook bool // true when HookActionAbortTurn triggered
}
func (exec *turnExecution) closeOwnedProviders() {
if exec == nil {
return
}
closeUniqueStatefulProviders(exec.ownedProviders...)
exec.ownedProviders = nil
}
// newTurnExecution creates a turnExecution initialized from turnState and options.
func newTurnExecution(
agent *AgentInstance,