---
title: "Set the native-app agent orchestration model."
method: PUT
path: "/v1/orgs/{orgId}/admin/agent-model"
tags: ["dashboards"]
---

# Set the native-app agent orchestration model.

`PUT /v1/orgs/{orgId}/admin/agent-model`

## Request

- Base URL: `http://localhost:8080`
- URL: `http://localhost:8080/v1/orgs/{orgId}/admin/agent-model`
- Auth: one of:
  - API key in cookie `dvt_session`
  - HTTP bearer

Sets the orchestration model to `auto` or a lowercase model name
(`^(auto|[a-z0-9][a-z0-9._-]{0,63})$`; input is trimmed and
lowercased). A named model that is not available on the account is
persisted as `auto` with status `fallback` (still a 200 — read
`setting.status` and `setting.message`; status `pending` means the
saved model is not applied to the agent yet (the admin card shows
"Not applied yet"), so save again to retry). A model the engine rejects
is a 400 carrying its error. Snowflake mode only (404 elsewhere);
requires the `connection:manage` capability (admin or owner; an API key
needs that scope), own org only. Runs under the caller's own Snowflake
session: 409 when that session has no usable warehouse. Audit-logged.

## Request body

- object
  - `model` string, required: `auto` or a model name such as `claude-sonnet-5-5`.

## Response `200`

The setting was applied (possibly with a fallback status).

- object
  - `data` object, required
    - `setting` object, required: The engine's `set_agent_model` result (ok, requested, model, status, message).
  - `meta` Meta, required: Response metadata.
    - `requestId` string, required: Correlates with the X-Request-Id header.
    - `total` integer: Item count, present on collection responses.
    - `nextCursor` string, nullable: Opaque keyset-pagination cursor, present on paginated responses (e.g. GET /v1/dashboards) when more rows exist beyond this page. Pass it back as the `cursor` query param to fetch the next page; absent or null on the last page.
    - `roleResolveDegraded` boolean: Snowflake mode only (DVT-2260), on GET /v1/dashboards: present and true when the caller's live Snowflake role resolution failed or was unavailable — role-shared dashboards may be missing from this page. Omitted (not merely false) whenever resolution succeeded or the role-share arm does not apply (off snowflake mode, an org admin/owner, or off the ingress listener).

## Other responses

- `400`: Malformed request.
- `401`: Missing, invalid, or expired session.
- `403`: The caller's role does not permit this action.
- `404`: Resource does not exist.
- `409`: The caller's Snowflake session has no usable warehouse (set a default warehouse or bind the app's consumer_warehouse reference).
- `502`: The engine could not apply the setting.
- `504`: The engine timed out calling the agent model procedure. Try again.

---

[API](https://skmtc.dev/dvt/apis/dvt-rest-api.md) · [All operations](https://skmtc.dev/dvt/apis/dvt-rest-api/llms.txt) · [OpenAPI document](https://skmtc.dev/dvt/apis/dvt-rest-api/revisions/00016f504165?raw)
