Skip to main content
 print this page

Update model status or parameters

PUT 

/ai/models/:model_id

Five mutations on a single model, selected by the required action query parameter. All of them are synchronous - a 200 means the change is persisted. enable - creates or refreshes the model's cost inference profile, test-invokes the model, flips ModelStatus to Enabled and writes the model's modality entries disable - refuses while the model is still referenced: if it is allow(listed for any component), or used as a knowledge base embedding model, or bound to an agent, GE-1034 is returned as a 400 naming the blocking resources. Otherwise the Bedrock inference profile is deleted, cost tag metadata is cleaned up, the status flips to Disabled and the modality entries are removed. Idempotent: disabling an already-disabled model returns 200 with "AI model is already disabled" and changes nothing. update_parameters - the entire request body is the parameter map. Each inference parameter value must be sent as a string holding a Python literal (for example "0.5", "4096", "['\n\nHuman:']"). A non-stringvalue returns IPV-1004. Parameters are validated by test-invoking the model before they are persisted, so an invalid combination fails the call rather than the next invocation. Effort and AdaptiveThinking are handled separately from the inference parameters and are each validated by their own test invoke. Sending only Effort and/or AdaptiveThinking leaves existing parameters untouched. Setting Effort on a model whose AdaptiveThinking is (or is being set) false returns IPV-1004. A successful update marks the values as user-owned so an ordinary PUT /ai/models?action=sync preserves them; force_sync resets them. set_default_inference_type - requires InferenceType in the body. The model must be Enabled and the value must appear in the model's InferenceTypesSupported; INFERENCE_PROFILE additionally requires the model to already carry InferenceProfileDetails. Anything else returns IPV-1004 or IPV-1001 as a 400. update_cost_tags - requires CostTags in the body (an empty array is valid and means "no cost tags"). Omitting the key entirely returns IPV-1001. Recreates the model's cost inference profile with the new tags and cascades the change to every agent using the model. Any other action value returns IPV-1041 as a 400.

Request

Responses

The requested change is persisted. Message identifies which change was applied; the already-disabled variant means no change was made.

Response Headers
    Access-Control-Allow-Origin
    Access-Control-Allow-Methods
    Access-Control-Allow-Headers