---
title: "Update project model grant"
method: PATCH
path: "/orgs/{orgID}/projects/{projectID}/model-grants/{modelGrantID}"
tags: ["Models"]
---

# Update project model grant

`PATCH /orgs/{orgID}/projects/{projectID}/model-grants/{modelGrantID}`

## Request

- Base URL: `https://api.omnara.com/v1`
- URL: `https://api.omnara.com/v1/orgs/{orgID}/projects/{projectID}/model-grants/{modelGrantID}`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `__Host-omnara_session` and API key in header `X-Omnara-Csrf`

Updates the project's overrides for the configured model. Omitted fields keep their current values; null, or [] for supported_reasoning_efforts, input_modalities, and output_modalities, clears an override so the project inherits from the configured model. Agents already using the model apply the updated overrides on their next model call. Updates are validated against the configured model's current revision but not against agent configs, so narrowing below a config's model settings, such as its context_window_tokens or reasoning effort, makes that agent's next model call fail.

## Path parameters

- `orgID` string, required
- `projectID` string, required
- `modelGrantID` string, required

## Request body

- UpdateProjectModelGrantRequest: Update a project model grant's overrides. Omitted fields keep their current values. Null clears an override so the project inherits from the configured model; for arrays, an empty array clears the override.
  - `context_window_tokens` integer, nullable: Project context budget for input and output tokens. Cannot exceed the configured model's budget. Triggers compaction when estimated input exceeds the remaining budget after output and safety reserves. The turn fails if compaction cannot make it fit.
  - `max_output_tokens` integer, nullable: Project output-token ceiling. Cannot exceed the configured model's ceiling.
  - `default_max_output_tokens` integer, nullable: Default output allowance per request for this project; agents can raise it up to max_output_tokens. Null inherits the configured model's.
  - `default_cache_retention` 'none' | 'short' | 'long', nullable: Prompt-cache preference for model requests; `short` when omitted. `short` applies the route's default caching (explicit cache breakpoints where the provider requires them) and, where the route accepts one, a stable conversation key for cache-aware routing. `long` prefers the route's extended cache lifetime where one exists (currently Anthropic's one-hour cache, which on Bedrock requires Claude 4.5 or newer) and behaves like `short` elsewhere. `none` sends no Omnara-managed cache controls or conversation key; providers may still cache prefixes on their own.
  - `supports_tools` boolean, nullable: Project-level tool-use gate. Can disable tools, but cannot enable tools when the configured model does not support them.
  - `supports_reasoning` boolean, nullable: Project-level reasoning gate. Can disable reasoning, but cannot enable reasoning when the configured model does not support it.
  - `default_reasoning_effort` string, nullable: Reasoning effort this project uses by default. Null inherits the configured model's.
  - `supported_reasoning_efforts` string[]: Reasoning efforts this project may use, limited to the configured model's. If this excludes the inherited default_reasoning_effort, set default_reasoning_effort too.
  - `input_modalities` string[]: Input types this project may send, such as text, image, or file; limited to the configured model's.
  - `output_modalities` string[]: Output types this project may receive, limited to the configured model's.

## Response `200`

Route response.

- ProjectModelGrantEnvelope
  - `grant` ProjectModelGrant, required
    - `id` string, required
    - `org_id` string, required
    - `project_id` string, required: Project ID (proj_...).
    - `configured_model_id` string, required
    - `context_window_tokens` integer, nullable: Project context budget for input and output tokens, or omitted/null to inherit from the configured model. Triggers compaction when estimated input exceeds the remaining budget after output and safety reserves. The turn fails if compaction cannot make it fit.
    - `max_output_tokens` integer, nullable: Project output-token ceiling, or omitted/null to inherit from the configured model.
    - `default_max_output_tokens` integer, nullable: Project default per-request output-token cap, or omitted/null to inherit from the configured model.
    - `default_cache_retention` 'none' | 'short' | 'long': Prompt-cache preference for model requests; `short` when omitted. `short` applies the route's default caching (explicit cache breakpoints where the provider requires them) and, where the route accepts one, a stable conversation key for cache-aware routing. `long` prefers the route's extended cache lifetime where one exists (currently Anthropic's one-hour cache, which on Bedrock requires Claude 4.5 or newer) and behaves like `short` elsewhere. `none` sends no Omnara-managed cache controls or conversation key; providers may still cache prefixes on their own.
    - `supports_tools` boolean, nullable: Project-level tool-use override, or omitted/null to inherit from the configured model.
    - `supports_reasoning` boolean, nullable: Project-level reasoning override, or omitted/null to inherit from the configured model.
    - `default_reasoning_effort` string: Project default reasoning effort, or omitted/empty to inherit from the configured model.
    - `supported_reasoning_efforts` string[], required: Project subset of configured-model reasoning efforts. Empty means inherit. When non-empty, default_reasoning_effort must resolve to one of these values.
    - `input_modalities` string[], required: Project subset of configured-model input types (text, image, or file). Empty means inherit.
    - `output_modalities` string[], required: Project subset of configured-model output types. Empty means inherit.
    - `created_at` string, date-time, required
    - `updated_at` string, date-time, required

## Other responses

- `400`: The request was invalid.
- `401`: Authentication is required or invalid.
- `403`: The authenticated principal is not authorized.
- `404`: The requested resource was not found or is not visible.
- `409`: The request conflicts with current resource state or idempotency history.
- `503`: The service dependency required to satisfy the request is unavailable.
- `4XX`: Any other client error. The body carries the shared Error envelope restricted to client error codes; statuses with a dedicated response above are documented precisely.
- `5XX`: Any other server error. The body carries the shared Error envelope restricted to server error codes.

## Changes

- **2026-10-15** `bc64894d95c5`: 1 breaking, 1 warning
  - the `context_window_tokens` request property's min was increased to `2.00`
  - the `context_window_tokens` request property's max was set to `2147483647.00`
- **2026-10-05** `3d9e2cf46e07`: 159 info
  - added the optional property `current_digest` to the response with the `400` status
  - added the optional property `current_digest` to the response with the `401` status
  - added the optional property `current_digest` to the response with the `403` status
  - added the optional property `current_digest` to the response with the `404` status
  - …155 more
  - …this revision’s changelog is incomplete
- **2026-09-28** `acddeb8fc6a5`: 7 warning, 7 info
  - added the new `upstream_unavailable` enum value to the `code` response property for the response status `400`
  - added the new `upstream_unavailable` enum value to the `code` response property for the response status `401`
  - added the new `upstream_unavailable` enum value to the `code` response property for the response status `403`
  - added the new `upstream_unavailable` enum value to the `code` response property for the response status `404`
  - …10 more
- **2026-09-01** `e4978b047d7a`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/omnara/apis/omnara-api-2/changes/orgs/:orgID/projects/:projectID/model-grants/:modelGrantID/patch.md)

---

[API](https://skmtc.dev/omnara/apis/omnara-api-2.md) - [All operations](https://skmtc.dev/omnara/apis/omnara-api-2/llms.txt) - [OpenAPI document](https://skmtc.dev/omnara/apis/omnara-api-2/revisions/343aebb1dff1?raw)
