Avoid redundant smoke report copying
This commit is contained in:
@@ -211,6 +211,12 @@ func toDomainExecutionTargetOverride(override *ExecutionTargetOverride) (*domain
|
||||
}
|
||||
|
||||
func fromDomainExecutionTarget(target domain.ExecutionTarget) ExecutionTarget {
|
||||
return fromDomainExecutionTargetWithOwnedParams(target, copyAnyMap(target.ExtraParams))
|
||||
}
|
||||
|
||||
// fromDomainExecutionTargetWithOwnedParams projects scalar settings and takes
|
||||
// ownership of extraParams, which the caller has already copied.
|
||||
func fromDomainExecutionTargetWithOwnedParams(target domain.ExecutionTarget, extraParams map[string]any) ExecutionTarget {
|
||||
return ExecutionTarget{
|
||||
BackendID: target.BackendID,
|
||||
Endpoint: target.Endpoint,
|
||||
@@ -222,7 +228,7 @@ func fromDomainExecutionTarget(target domain.ExecutionTarget) ExecutionTarget {
|
||||
ServiceTier: target.ServiceTier,
|
||||
ReasoningEffort: target.ReasoningEffort,
|
||||
APIKeyEnv: target.APIKeyEnv,
|
||||
ExtraParams: copyAnyMap(target.ExtraParams),
|
||||
ExtraParams: extraParams,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user