Files
go-sip/internal/dispatcher/current_ai.go
T

19 lines
614 B
Go

package dispatcher
import (
"fmt"
"git.ipao.vip/rogee/go-sip/internal/ai"
"git.ipao.vip/rogee/go-sip/internal/configread"
)
// validateCurrentAISnapshot is the shared admission gate for every source of
// approved task configuration. SDK-inexpressible settings must fail before a
// call reserves capacity or reaches the Agent; no defaults replace them.
func validateCurrentAISnapshot(snapshot configread.CurrentSnapshot) error {
if _, err := ai.BindCurrent(snapshot.Task, snapshot.Providers); err != nil {
return fmt.Errorf("task %q approved AI snapshot: %w", snapshot.Task.TaskID, err)
}
return nil
}