Updates the AI model associated with an agent version.
PATCH/api/v2/AgentVersion/:agentCode/:agentVersion/model
Updates the AI model associated with an agent version.
Request
Path Parameters
The code of the agent.
The version number of the agent.
Query Parameters
Use this param to override the culture of the response. Options: - en (default) - es
- application/json
- text/json
- application/*+json
Body
The AI model update request.
main
object
required
The unique identifier of the AI model to be used by the agent. Alias of aiModelId.
The unique identifier of the AI model to use. Used instead of Vendor and ModelCode.
The model code associated with the AI model to be used by the agent. Required if Id is not provided.
The vendor associated with the AI model to be used by the agent. Required if Id is not provided.
parameters
object
Request DTO for configuring AI model execution parameters.
A float value between -2 and 2 that penalizes the likelihood of an agent reusing similar completions.
A JSON object that maps tokens to an associated bias value from -100 to 100.
The maximum number of tokens shared between the Prompt and the Output.
The maximum number of tokens that can be generated by the AI in the response.
A float value between -2 and 2 that penalizes the likelihood of an agent reusing phrases already present in the input.
The reasoning level of the agent's response (e.g., "low", "medium", "high").
The level of detail of reasoning events exposed during execution (e.g., "auto", "none", "summary", "full").
Defines sequences of tokens upon which the agent should stop generating completions.
A float value between 0 and 2 that determines the randomness of the agent's responses.
A float value that specifies the Top-K sampling parameter.
A float value between 0 and 1 that specifies the probability cutoff for generating the response (nucleus sampling).
Defines if the agent should use Vision capabilities.
Defines if the agent sends attached PDF files directly to the model provider instead of scanning them first. Only applies to models that support it.
Defines if the agent should use Plugin Emulator instead of native tools.
Defines if the agent should use extended thinking (Alibaba Cloud and DeepSeek only).
Token budget for extended thinking on vendors configured by an explicit token budget
(e.g. Anthropic's budget_tokens), where setting a budget is itself the opt-in for extended thinking
Voice identifier for realtime/audio models (e.g. "shimmer", "alloy"). Null when not applicable.
Body
The AI model update request.
main
object
required
The unique identifier of the AI model to be used by the agent. Alias of aiModelId.
The unique identifier of the AI model to use. Used instead of Vendor and ModelCode.
The model code associated with the AI model to be used by the agent. Required if Id is not provided.
The vendor associated with the AI model to be used by the agent. Required if Id is not provided.
parameters
object
Request DTO for configuring AI model execution parameters.
A float value between -2 and 2 that penalizes the likelihood of an agent reusing similar completions.
A JSON object that maps tokens to an associated bias value from -100 to 100.
The maximum number of tokens shared between the Prompt and the Output.
The maximum number of tokens that can be generated by the AI in the response.
A float value between -2 and 2 that penalizes the likelihood of an agent reusing phrases already present in the input.
The reasoning level of the agent's response (e.g., "low", "medium", "high").
The level of detail of reasoning events exposed during execution (e.g., "auto", "none", "summary", "full").
Defines sequences of tokens upon which the agent should stop generating completions.
A float value between 0 and 2 that determines the randomness of the agent's responses.
A float value that specifies the Top-K sampling parameter.
A float value between 0 and 1 that specifies the probability cutoff for generating the response (nucleus sampling).
Defines if the agent should use Vision capabilities.
Defines if the agent sends attached PDF files directly to the model provider instead of scanning them first. Only applies to models that support it.
Defines if the agent should use Plugin Emulator instead of native tools.
Defines if the agent should use extended thinking (Alibaba Cloud and DeepSeek only).
Token budget for extended thinking on vendors configured by an explicit token budget
(e.g. Anthropic's budget_tokens), where setting a budget is itself the opt-in for extended thinking
Voice identifier for realtime/audio models (e.g. "shimmer", "alloy"). Null when not applicable.
Body
The AI model update request.
main
object
required
The unique identifier of the AI model to be used by the agent. Alias of aiModelId.
The unique identifier of the AI model to use. Used instead of Vendor and ModelCode.
The model code associated with the AI model to be used by the agent. Required if Id is not provided.
The vendor associated with the AI model to be used by the agent. Required if Id is not provided.
parameters
object
Request DTO for configuring AI model execution parameters.
A float value between -2 and 2 that penalizes the likelihood of an agent reusing similar completions.
A JSON object that maps tokens to an associated bias value from -100 to 100.
The maximum number of tokens shared between the Prompt and the Output.
The maximum number of tokens that can be generated by the AI in the response.
A float value between -2 and 2 that penalizes the likelihood of an agent reusing phrases already present in the input.
The reasoning level of the agent's response (e.g., "low", "medium", "high").
The level of detail of reasoning events exposed during execution (e.g., "auto", "none", "summary", "full").
Defines sequences of tokens upon which the agent should stop generating completions.
A float value between 0 and 2 that determines the randomness of the agent's responses.
A float value that specifies the Top-K sampling parameter.
A float value between 0 and 1 that specifies the probability cutoff for generating the response (nucleus sampling).
Defines if the agent should use Vision capabilities.
Defines if the agent sends attached PDF files directly to the model provider instead of scanning them first. Only applies to models that support it.
Defines if the agent should use Plugin Emulator instead of native tools.
Defines if the agent should use extended thinking (Alibaba Cloud and DeepSeek only).
Token budget for extended thinking on vendors configured by an explicit token budget
(e.g. Anthropic's budget_tokens), where setting a budget is itself the opt-in for extended thinking
Voice identifier for realtime/audio models (e.g. "shimmer", "alloy"). Null when not applicable.
Responses
- 200
- 400
- 401
- 403
- 404
- 500
AI model updated successfully.
If the request is invalid or the model is not available.
- application/json
- Schema
- Example (from schema)
Schema
- MOD1
- MOD2
Array [
]
Stable, machine-readable error code. Branch on this value, not on message.
Human-readable, localised summary of the error.
Link to the documentation section for this error code.
errors
object
nullable
Map of keys (an invalid request field or the rule that failed) to messages. Only present when the error has specific detail to report. Values are strings, except on input_validation_error, where each value is an array of messages for that field.
property name*
object
nullable
oneOf
string
string
{
"code": "string",
"message": "string",
"documentationUrl": "string",
"errors": {}
}
The user is unauthorized or the session expired
- application/json
- Schema
- Example (from schema)
Schema
Stable, machine-readable error code. Branch on this value, not on message.
Human-readable, localised summary of the error.
Link to the documentation section for this error code.
{
"code": "string",
"message": "string",
"documentationUrl": "string"
}
The user does not have permission
- application/json
- Schema
- Example (from schema)
Schema
Stable, machine-readable error code. Branch on this value, not on message.
Human-readable, localised summary of the error.
Link to the documentation section for this error code.
{
"code": "string",
"message": "string",
"documentationUrl": "string"
}
If the agent, version, or model is not found.
- application/json
- Schema
- Example (from schema)
Schema
- MOD1
- MOD2
Array [
]
Stable, machine-readable error code. Branch on this value, not on message.
Human-readable, localised summary of the error.
Link to the documentation section for this error code.
errors
object
nullable
Map of keys (an invalid request field or the rule that failed) to messages. Only present when the error has specific detail to report. Values are strings, except on input_validation_error, where each value is an array of messages for that field.
property name*
object
nullable
oneOf
string
string
{
"code": "string",
"message": "string",
"documentationUrl": "string",
"errors": {}
}
There was an unexpected error
- application/json
- Schema
- Example (from schema)
Schema
Stable, machine-readable error code. Branch on this value, not on message.
Human-readable, localised summary of the error.
Link to the documentation section for this error code.
{
"code": "string",
"message": "string",
"documentationUrl": "string"
}