Edit an existing variation of an AI Config. This creates a new version of the variation.
The request body must be a JSON object of the fields to update. The values you include replace the existing values for the fields.
If the variation is in use in a project environment where approval settings require review for this AI Config, this endpoint returns 403 and the change must be submitted through an approval request.
Here's an example:
```
{
"messages": [
{
"role": "system",
"content": "The new message"
}
]
}
```
Request
AI Config variation object to update
commentstringOptional
Human-readable description of what this patch changes
descriptionstringOptional
Description for agent when the config is in agent mode.
instructionsstringOptional
Instructions for agent when the config is in agent mode.
messageslist of objectsOptional
modelConfigKeystringOptional
modelConfigVersionintegerOptional>=1
The exact model config version to set this variation to. Requires modelConfigKey to be
set (either in this patch or already on the variation), and the version must exist for
that model config. When omitted, the variation keeps the version it is currently set to,
unless the patch changes modelConfigKey, in which case the variation records the new
model config’s current (latest) version.
outputFormatmap from strings to anyOptional
JSON Schema defining the structured output format for the variation.
statestringOptional
One of 'archived', 'published'
toolslist of objectsOptional
List of tools to use for this variation. The latest version of the tool will be used.
toolKeyslist of stringsOptional
List of tool keys to use for this variation. The latest version of the tool will be used.
skillslist of objectsOptional
List of agent skills to attach to this variation. Replaces the current attachments.
judgeConfigurationobjectOptional
Response
AI Config variation updated
descriptionstringOptional
Returns the description for the agent. This is only returned for agent variations.
instructionsstringOptional
Returns the instructions for the agent. This is only returned for agent variations.
messageslist of objectsOptional
modelConfigKeystringOptional
modelConfigVersionintegerOptional
The version of the model config that this variation is pinned to, when it references a
custom model config. Absent when the variation does not reference a model config, when
the variation is not pinned to a specific version, or when custom model config versioning
is not enabled for the project.
outputFormatmap from strings to anyOptional
JSON Schema defining the structured output format for the variation.
toolslist of objectsOptional
skillslist of objectsOptional
judgeConfigurationobjectOptional
judgingConfigKeyslist of stringsOptional