Omit inactive runtime schemas from prepared snapshots
This commit is contained in:
@@ -692,6 +692,11 @@ func resolveOutputContract(ctx context.Context, def *domain.PromptDefinition, ov
|
||||
if contract.Format == "" {
|
||||
contract.Format = domain.FormatText
|
||||
}
|
||||
if contract.ValidationMode != domain.ValidationJSONSchema {
|
||||
// Inactive runtime values are not execution metadata. Dropping them
|
||||
// avoids retaining arbitrary caller-owned Go objects.
|
||||
contract.Schema = nil
|
||||
}
|
||||
if contract.ValidationMode == domain.ValidationJSONSchema && contract.Schema != nil {
|
||||
value, err := validate.DecodeInlineSchema(ctx, contract.Schema)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user