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:
Authorizations
Path Parameters
The project key
The AI Config key
The AI Config variation key
Body
AI Config variation object to update
Replaces classifier rules on a judge variation. An empty array clears them. When this array is non-empty, messages must be empty.
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 prompt messages for this variation
Freeform JSON object. LaunchDarkly does not validate the keys. In a model config, params and customParams hold parameters that the provider's API accepts, for example {"temperature": 0.7, "maxTokens": 4096}.
The key that GET /api/v2/projects/{projectKey}/ai-configs/model-configs returns for the model config. Do not use a custom model config's ID, which is the provider model ID.
"OpenAI.gpt-4.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.
x >= 1A human-readable name for the variation
JSON Schema defining the structured output format for the variation.
Whether to publish this version of the variation
The state to move the variation to. Omit this field to keep the current state.
archived: Archive a published variation. You cannot archive a variation that is already archived. You also cannot archive the only variation of an AI Config. An AI Config itself cannot be archived.published: Restore an archived variation. You cannot publish a variation that is already published.
archived, published "archived"
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
AI Config variation updated
The variation key
The variation ID
Freeform JSON object. LaunchDarkly does not validate the keys. In a model config, params and customParams hold parameters that the provider's API accepts, for example {"temperature": 0.7, "maxTokens": 4096}.
The variation name
The version number of this resource
The color used for this variation in the UI
Classifier rules for a judge variation. When this array is non-empty, messages must be empty.
A comment describing this version of the variation
Returns the description for the agent. This is only returned for agent variations.
Returns the instructions for the agent. This is only returned for agent variations.
The prompt messages for this variation
The key of the model config that this variation uses, not the provider model ID. Absent when the variation does not use a model config.
"OpenAI.gpt-4.1"
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.
JSON Schema defining the structured output format for the variation.
The state of the variation.
archived: The variation is archived. To restore it, update the variation withstateset topublished.published: The variation is active.
archived, published "published"
The tools this variation can use
The agent skills this variation can use
Keys of the judge AI Configs attached to this variation