Build presence-aware execution targets from effective configuration

This commit is contained in:
2026-09-30 02:32:54 +00:00
parent b158a8ec2d
commit defb240b6e
14 changed files with 512 additions and 27 deletions

View File

@@ -208,6 +208,10 @@ type ExecutionProfile struct {
APIKeyEnv string `yaml:"api_key_env"`
APIKeyRequired bool `yaml:"-" json:"-"`
ExtraParams map[string]any `yaml:"extra_params"`
// ResolvedTarget is an execution-owned snapshot assembled from effective
// configuration and backend defaults. Legacy source repositories leave it nil.
ResolvedTarget *ExecutionTarget `yaml:"-" json:"-"`
TargetPresence ExecutionTargetPresence `yaml:"-" json:"-"`
}
// ExecutionTargetOverride represents per-request runtime setting overrides.
@@ -224,8 +228,9 @@ type ExecutionTargetOverride struct {
ExtraParams map[string]any `json:"extra_params,omitempty"`
}
// ExecutionTargetPresence tracks which effective runtime fields came from an
// explicit request override even when the resolved value is a zero value.
// ExecutionTargetPresence tracks effective numeric values that must be sent
// even when they are zero. Values may come from configuration or a request
// override; explicit configuration null suppresses the corresponding bit.
type ExecutionTargetPresence struct {
Temperature bool
MaxTokens bool