update_ai_model_configurations

ArtificialIntelligenceApi.update_ai_model_configurations(action, role_id, force_sync=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)

Sync AI models from Bedrock

Re-reads the Bedrock foundation model catalog and reconciles it into the Amorphic AI models table: new models are added, models Bedrock no longer lists are marked deprecated, and inference profile metadata is refreshed. Requires action=sync; any other action value returns IPV-1041 as a 400. No request body is read — the operation is driven entirely by query parameters. Synchronous and idempotent: the call blocks until reconciliation finishes and the 200 Message reports what changed. Re-running with no catalog change reports “no changes detected.”

Parameters:
  • action (str) – Must be sync. Any other value returns IPV-1041 as a 400. (required)

  • role_id (str) – User role id (required)

  • force_sync (str) – Set to “yes” to force a full sync, which additionally resets user-edited model attributes (ModelParameters and Effort) back to the packaged LLMModelsMetadata.json defaults and marks their source as SYSTEM. Defaults to “no”, which preserves user edits. Only the exact string “yes” forces the sync; any other value behaves as “no”.

  • _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:

SyncAIModelsResponse

Returns:

Returns the result object.

Request and Response Examples

HTTP: PUT /ai/models

Success (HTTP 200)

Sync completed. Message summarizes the reconciliation and takes one of four forms depending on how many models were added and how many were marked deprecated.

Catalog already up to date

{
  "Message": "AI models sync completed: no changes detected."
}

New models discovered

{
  "Message": "AI models sync completed: added 3 new model(s)."
}

Models no longer offered by Bedrock

{
  "Message": "AI models sync completed: marked 2 model(s) deprecated."
}

Both additions and deprecations

{
  "Message": "AI models sync completed: added 3 new model(s), marked 2 model(s) deprecated."
}

Errors

Documented error codes: IPV-1041, AUTH-1014, DB-1002, GE-1008.

HTTP 400

Input validation failure. Body is {“Message”: “<CODE> - <text>”}. Codes: IPV-1041 (action is not sync). AUTH-1014 from the role check is also returned here, not as a 403.

Request / response example

{
  "Message": "IPV-1041 - Invalid parameter - action, allowed values/keys are sync"
}

HTTP 500

Backend failure. Body is {“Message”: “<CODE> - <text>”}. Codes: DB-1002 (models table update failed), GE-1008 (catch-all, including a Bedrock call failure during reconciliation).

Request / response example

{
  "Message": "GE-1008 - Could not complete the request. Please try again."
}