update_ai_configurations¶
- ArtificialIntelligenceApi.update_ai_configurations(action, role_id, update_ai_configurations_request, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Update AI configurations
Enables or disables AI services and updates per-component model and guard rail configurations. Partial update - only the listed components are acted on. Service enablement is applied before model and guard rail changes, so a late failure leaves the enablement changes in place.
- Parameters:
action (str) – Operation mode; only configurations is supported. (required)
role_id (str) – User role id (required)
update_ai_configurations_request (UpdateAIConfigurationsRequest) – (required)
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
- Returns:
Returns the result object.
Request and Response Examples¶
HTTP: PUT /ai
Request¶
Replace the model list for a component
{
"ServiceConfigurations": [
{
"ServiceName": "nl2sql",
"Status": "Enabled",
"AssignedModels": [
"anthropic.claude-sonnet-4-6"
],
"DefaultModel": "anthropic.claude-sonnet-4-6"
}
]
}
Attach guard rails to a component
{
"ServiceConfigurations": [
{
"ServiceName": "chats",
"Status": "Enabled",
"AssignedGuardRails": [
{
"Id": "gr-8f2e1a2b",
"Version": "1"
}
]
}
]
}
Disable a component’s owning service
{
"ServiceConfigurations": [
{
"ServiceName": "nl2sql",
"Status": "Disabled"
}
]
}
Success (HTTP 200)¶
AI configurations updated successfully.
Request / response example
{
"Message": "AI models configurations updated successfully"
}
Errors¶
Documented error codes: AI-1004, IPV-1001, IPV-1004, AI-1008, GE-1008.
HTTP 400
Invalid input
AI services are switched off application-wide
{
"Message": "AI-1004 - Cannot update AI services configuration as the AI services are disabled. Please enable AI services before updating the AI services configuration"
}
ServiceConfigurations omitted from the body
{
"Message": "IPV-1001 - Parameter 'ServiceConfigurations' is a required value."
}
Model is not enabled or its modality is not supported
{
"Message": "IPV-1004 - The following models are not supported for nl2sql: meta.llama3-70b-instruct-v1:0. Either their modalities are not supported or they are not enabled."
}
Component maps to AICore, which cannot be disabled
{
"Message": "AI-1008 - AICore cannot be disabled."
}
HTTP 500
Something went wrong at backend. An unknown component name, and AI services being disabled for the application, are also reported here.
Request / response example
{
"Message": "GE-1008 - Could not complete the request. Please try again."
}