Update AI Config variation
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" } ] }Authorization
ApiKey read, writeIn: header
Scope: read, write
Path Parameters
Request Body
application/json
AI Config variation object to update
Human-readable description of what this patch changes
Description for agent when the config is in agent mode.
Instructions for agent when the config is in agent mode.
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.
1 <= valueJSON Schema defining the structured output format for the variation.
One of 'archived', 'published'
List of tools to use for this variation. The latest version of the tool will be used.
List of tool keys to use for this variation. The latest version of the tool will be used.
List of agent skills to attach to this variation. Replaces the current attachments.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X PATCH "https://example.com/api/v2/projects/string/ai-configs/string/variations/string" \ -H "Content-Type: application/json" \ -d '{ "judgeConfiguration": { "judges": [ { "samplingRate": 0.36160767, "judgeConfigKey": "judgeConfigKey" }, { "samplingRate": 0.36160767, "judgeConfigKey": "judgeConfigKey" } ] }, "instructions": "instructions", "description": "description", "published": true, "modelConfigKey": "modelConfigKey", "tools": [ { "version": 6, "key": "key" }, { "version": 6, "key": "key" } ], "skills": [ { "version": 1, "key": "key" }, { "version": 1, "key": "key" } ], "toolKeys": [ "toolKeys", "toolKeys" ], "name": "name", "messages": [ { "role": "role", "content": "content" }, { "role": "role", "content": "content" } ], "comment": "comment", "model": "{}", "state": "state", "outputFormat": { "key": "" }, "modelConfigVersion": 1 }'{ "judgeConfiguration": { "judges": [ { "samplingRate": 0.36160767, "judgeConfigKey": "judgeConfigKey" }, { "samplingRate": 0.36160767, "judgeConfigKey": "judgeConfigKey" } ] }, "instructions": "instructions", "color": "color", "_links": { "parent": { "href": "href", "type": "type" } }, "description": "description", "modelConfigKey": "modelConfigKey", "judgingConfigKeys": [ "judgingConfigKeys", "judgingConfigKeys" ], "version": 5, "tools": [ { "customParameters": { "key": "" }, "version": 7, "key": "key" }, { "customParameters": { "key": "" }, "version": 7, "key": "key" } ], "skills": [ { "version": 9, "key": "key" }, { "version": 9, "key": "key" } ], "createdAt": 1, "_publishedAt": 2, "_archivedAt": 5, "name": "name", "messages": [ { "role": "role", "content": "content" }, { "role": "role", "content": "content" } ], "comment": "comment", "model": "{}", "_id": "_id", "state": "state", "outputFormat": { "key": "" }, "key": "key", "modelConfigVersion": 6}