Detach schemas without provider value limits

This commit is contained in:
2026-11-05 20:06:37 +00:00
parent 9463c9463a
commit 6c015a17fa
6 changed files with 66 additions and 81 deletions

View File

@@ -249,16 +249,8 @@ func clonePreparedRun(source *domain.PreparedRun) (*domain.PreparedRun, error) {
if source.StructuredOutput.JSONSchema != nil {
jsonSchema := *source.StructuredOutput.JSONSchema
copied.StructuredOutput.JSONSchema = &jsonSchema
schema, copyErr := cloneJSONValue(source.StructuredOutput.JSONSchema.Schema)
if copyErr != nil {
return nil, copyErr
}
copied.StructuredOutput.JSONSchema.Schema = schema
copied.StructuredOutput.JSONSchema.Schema = jsonvalue.CloneTrusted(source.StructuredOutput.JSONSchema.Schema)
}
}
return &copied, nil
}
func cloneJSONValue(source any) (any, error) {
return jsonvalue.Copy(source)
}