Update a prompt’s metadata and/or create a new version with updated template content.
Partial version updates: Set patch: true to perform a partial update of version fields (string, parameters, model, virtual_key, version_description, functions, tools, tool_choice, is_raw_template, prompt_metadata). When enabled, any version fields omitted from the request are backfilled from the current latest version, allowing you to update only the fields you need. When patch is omitted or false, all version fields must be provided together (original strict validation).
Metadata-only updates: Fields like name, collection_id, version_description, and virtual_key can always be updated independently without affecting versioning.
When true, enables partial version updates. Missing version fields (string, parameters, model) are backfilled from the current latest version, so you only need to provide the fields you want to change. When false or omitted, the original strict validation is preserved for backward compatibility.
The prompt template string. When patch is true, this field is optional and will be inherited from the current latest version if omitted.
Model parameters (e.g. temperature, max_tokens). When patch is true, this field is optional and will be inherited from the current latest version if omitted.
The model identifier. When patch is true, this field is optional and will be inherited from the current latest version if omitted.
The virtual key to associate with this version. When patch is true, this field is optional and will be inherited from the current latest version if omitted.
A human-readable description for this version. When patch is true, this field is optional and will be inherited from the current latest version if omitted.
Function definitions available to the model. When patch is true, this field is optional and will be inherited from the current latest version if omitted.
Tool definitions available to the model. When patch is true, this field is optional and will be inherited from the current latest version if omitted.
Controls which tool the model uses. When patch is true, this field is optional and will be inherited from the current latest version if omitted.
Whether the template string is raw (1) or processed (0). When patch is true, this field is optional and will be inherited from the current latest version if omitted.
0, 1 Additional metadata for the prompt version. When patch is true, this field is optional and will be inherited from the current latest version if omitted.