Adapters
Flip an adapter to a new version
Point an attached alias at a new adapter model with zero downtime. The new version is staged alongside the current one; the alias cuts over atomically only once EVERY serving replica reports the new version loaded. Until then the call answers 409 ‘not yet converged’; retry the identical PATCH until it succeeds; the current version keeps serving throughout.
PATCH
/
v1
/
deployments
/
{deployment_id}
/
adapters
/
{serve_name}
Flip an adapter to a new version
curl --request PATCH \
--url https://api.veri.studio/v1/deployments/{deployment_id}/adapters/{serve_name} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model_id": "<string>"
}
'import requests
url = "https://api.veri.studio/v1/deployments/{deployment_id}/adapters/{serve_name}"
payload = { "model_id": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({model_id: '<string>'})
};
fetch('https://api.veri.studio/v1/deployments/{deployment_id}/adapters/{serve_name}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"object": "<string>",
"id": "<string>",
"deployment_id": "<string>",
"serve_name": "<string>",
"model_id": "<string>",
"version": 123,
"internal_name": "<string>",
"status": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"replicas": [
{
"replica_id": "<string>",
"state": "<string>",
"error": "<string>"
}
],
"previous_model_id": "<string>",
"pending_model_id": "<string>",
"pending_internal_name": "<string>",
"model_version_id": "<string>",
"pending_model_version_id": "<string>"
}Authorizations
Path Parameters
Body
application/json
Response
The cutover completed: the alias now serves the new model at version+1, status 'active'
A LoRA adapter attached to a multi_adapter deployment.
Flip an adapter to a new version
curl --request PATCH \
--url https://api.veri.studio/v1/deployments/{deployment_id}/adapters/{serve_name} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model_id": "<string>"
}
'import requests
url = "https://api.veri.studio/v1/deployments/{deployment_id}/adapters/{serve_name}"
payload = { "model_id": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({model_id: '<string>'})
};
fetch('https://api.veri.studio/v1/deployments/{deployment_id}/adapters/{serve_name}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"object": "<string>",
"id": "<string>",
"deployment_id": "<string>",
"serve_name": "<string>",
"model_id": "<string>",
"version": 123,
"internal_name": "<string>",
"status": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"replicas": [
{
"replica_id": "<string>",
"state": "<string>",
"error": "<string>"
}
],
"previous_model_id": "<string>",
"pending_model_id": "<string>",
"pending_internal_name": "<string>",
"model_version_id": "<string>",
"pending_model_version_id": "<string>"
}
