> ## Documentation Index
> Fetch the complete documentation index at: https://weights.fyi/run/llms.txt

# POST /v1/compute/plans/dry-run

```text
POST https://weights.fyi/run/v1/compute/plans/dry-run
Authorization: Bearer <token>                    scope: submit
Content-Type: application/json
```

**Available since:** 2026-11-16: included in this build; see [What is live](/run/docs/what-is-live.md) for deployment status.

**Answer time:** synchronous; the checks run in the service and wait for no capacity. Each call to the stand-in waits at most 5 s, and the whole check has one deadline, reported in `limits`.

Checks one ComputePlan without admitting it. The body is the plan [POST /v1/compute/plans](/run/docs/reference/compute-plans-create.md) takes: one plan per call, one verdict per answer; there is no batch form. Nothing is written, queued or charged and no capacity is requested, so the same plan can be checked any number of times and submitted afterwards.

The plan is read by the plan rules of submission, then your tenancy grant is checked before any simulation or source read. Each model is checked against its pinned release. Every chat stage sends its declared request, or a synthetic request sized on the stage's session context, to a stand-in for the model at its context window. The stand-in counts tokens approximately and generates nothing real. It does not measure speed or prove that a run will succeed.

## Request

| Name | Where | Required | Meaning |
|---|---|---|---|
| `Authorization` | header | yes | Bearer token with `submit`. |
| plan fields | body | yes | One JSON object of at most 1 MiB with the fields of [plan submission](/run/docs/reference/compute-plans-create.md); `stages` must be an array of at most 128 entries by default. The service may configure another limit. |
| `verify_source` | query | no | `1` or `true` reads every source by range; `0` or `false` cannot disable verification required by the service. |

Source verification follows submission's rules: set `verify_source: true` on the plan to read all stages' sources, on a stage's workload to read that stage's sources, or use the query parameter. The service setting `WEIGHTS_VERIFY_SOURCE_ON_SUBMIT=1` also requests it. These checks read actual source bytes using submission's custody rules; unreadable sources become findings. Without verification, `source_uris` stays `unverified`.

Declare a chat request in a stage's `metadata.request`, or the plan's `metadata.request` for every stage that does not override it. The request's messages, tools, reasoning effort and template options are checked as declared. A synthetic request leaves the actual request shape unverified.

## Return value

**200 OK** with the verdict, also for a plan the rules refuse.

| Field | Meaning |
|---|---|
| `ok` | True when no finding is an error. Checks can still be unverified. |
| `verified` | True only when every check is `checked`; this still does not prove execution. |
| `checks` | `roster_pins`, `source_uris`, `context_bounds`, `template_kwargs`, `tools` and `request_shape`, each with `status` and `detail`. Status is `checked`, `failed` or `unverified`. |
| `unverified` | Names of checks whose status is `unverified`. |
| `plan_valid` | Whether the plan rules accept the plan. When false, `findings` holds `invalid_compute_plan` with the reason and nothing else was checked. |
| `tenancy_authorized` | Whether your account holds the grant submission needs for the plan's tenant and organisation; null for an invalid plan. A missing grant returns `compute_tenancy_unauthorized`, empty models and stages, and every check unverified. |
| `models` | One entry per model, described below. |
| `stages` | One entry per stage: what the declared or synthetic request was sized on (`request`) and the stand-in's answer (`twin`), or why the stage sends no chat request. |
| `findings` | Every `error` and `warning`, each with a `code`, a `message` and the `model` or `stage_id` it concerns. |
| `source_probe` | Sources actually read, their response status, range support and format check; an empty unverified receipt when none was read successfully. |
| `limits` | When simulation was attempted. `stages`, `max_stages`, `stages_used_pct`. `loopback_timeout_seconds`: 5, the most one call to the stand-in waits. `deadline_seconds`: that timeout times one model listing plus one call per chat stage, so 15 for two chat stages; `elapsed_seconds`, `deadline_used_pct`. `slot_wait_seconds`, `concurrent_twins`, `twins_in_use`, `twins_in_use_pct`, `twins_peak`: the simulation slots this check shared. |
| `cost_usd_micros` | Always 0. |

| `models[]` field | Meaning |
|---|---|
| `requested`, `model_id`, `ok` | The name the plan used, the catalog identifier it resolved to, and whether the model passed. |
| `pinned` | Whether the model's release is pinned by digest. |
| `tp_degree` | The parallel width the model is planned at. |
| `context_window`, `context_window_pinned` | The window in tokens that requests were sized against, and whether the release states it. |
| `context_window_basis` | How the window was derived, in words. A stated window is quoted. Otherwise it is an upper bound, `min(architectural_max_model_len, kv_cache_tokens)`: the smaller of the model's own limit and the cache capacity planned for it, with the warning `max_model_len_unpinned`. It is not a measurement. |
| `context_bounds` | `status`, `binding` (which bound applies), `max_model_len`, `architectural_max_model_len`, `kv_cache_tokens`. |
| `tools_supported`, `reasoning_efforts`, `template_kwargs` | Whether tool calls are accepted, the reasoning efforts the model takes, and the template options its release records, such as `enable_thinking`. |

| Finding `code` | Meaning and action |
|---|---|
| `invalid_compute_plan`, `compute_tenancy_unauthorized` | The plan rules or your grant refuse the plan; nothing else was checked. Fix the plan or restore access. |
| `model_not_in_roster`, `manifest_sha256_unpinned`, `tree_sha256_unpinned`, `revision_mismatch`, `image_unpinned` | `roster_pins`: the plan names a model with no fully pinned release here. Choose a model whose entry reads `pinned: true`. |
| `context_smaller_than_request`, `session_exceeds_kv_pool`, `context_window_unknown`, `context_window_exceeds_architecture` | `context_bounds`. `context_smaller_than_request`: the session context does not hold the request; shorten it or raise `mean_context_tokens`. `session_exceeds_kv_pool`: one session does not fit the cache capacity planned for the model; lower `mean_context_tokens`. The other two: no usable window is recorded, or the stated one exceeds the model's own limit. `request_exceeds_session_context` and `max_model_len_unpinned` are warnings. |
| `thinking_unsupported` | `chat_template_kwargs.enable_thinking: true` on a model with no reasoning output whose `template_kwargs` do not list `enable_thinking`. A template that lists it accepts it. Remove the option or choose another model. |
| `template_kwarg_invalid`, `reasoning_effort_unsupported` | A template option of the wrong type (`enable_thinking` must be a boolean), or an effort outside `reasoning_efforts`. `template_kwarg_unverified` is a warning. |
| `tools_unsupported`, `tool_schema_invalid` | `tools`: the model takes no tool calls, or a declared tool is malformed. |
| `source_unreachable` and the other [source codes](/run/docs/errors.md#source-verification) | `source_uris`: a source could not be read as declared. `source_probe_unavailable` is a warning here and leaves the check `unverified`; it is not the `503` of submission. |
| `dry_run_deadline_exceeded` | The stand-in or a source read did not answer within its 5 s or the check's deadline. That stage is not checked and `ok` is false. Send the check again. |

Only an error makes `ok` false. A warning marks something the check could not pin down, such as a context window that is an upper bound and not a stated figure.

## Errors

| Status | Code | Meaning |
|---|---|---|
| `400` | `invalid_json`, `invalid_compute_plan` | Invalid JSON, a non-object body, `stages` is not an array or exceeds the service limit, or an invalid `verify_source` query value. |
| `401` | `unauthorized`, `invalid_token`, `token_revoked`, `token_expired` | Supply a valid token. |
| `403` | `scope_required`, `account_suspended` | Token lacks `submit`, or the account is suspended. |
| `413` | `body_too_large` | Body exceeds 1 MiB. |
| `429` | `rate_limited`, `dry_run_busy` | The token's request rate, or every simulation slot of the service stayed busy (`twin_slots` says how many there are). Nothing was checked; wait `Retry-After` (`retry_after_seconds`) and send the same check again. |

## Examples

```sh
curl -s https://weights.fyi/run/v1/compute/plans/dry-run \
  -H "Authorization: Bearer $WEIGHTS_API_KEY" -H "Content-Type: application/json" \
  -d '{"plan_id":"example-plan","operation_key":"example-1","tenancy":{"tenant_id":"demo","org_slug":"demo","platform":"api","max_budget_usd_micros":1000000},"schedule":{"window_start_ms":1793232000000,"until_ms":1793318400000,"wake_policy":"scavenger_stream"},"stages":[{"stage_id":"pages","execution_mode":"weights_managed_compute","workload":{"kind":"classifier_drain","model":"laya-page-role","open_stream":true,"total_items_hint":0,"output_prefix_uri":"r2://tenants/demo/results/"}}]}'
```

Selected response fields:

```json
{"schema":"weights.twin-dry-run/v1","plan_id":"example-plan","plan_valid":true,"ok":true,"verified":false,"tenancy_authorized":true,"cost_usd_micros":0,"unverified":["source_uris","context_bounds","template_kwargs","tools","request_shape"],"source_probe":{"verified":false,"mode":"syntax_and_custody_only","probes":[]},"models":[{"requested":"laya-page-role","ok":true,"pinned":true}],"stages":[{"stage_id":"pages","kind":"classifier_drain","ok":true,"twin":{"exercised":false}}],"findings":[]}
```

## History

- 2026-11-16: added the dry run of a plan before submission; documented its single-plan scope, timing bounds, model diagnostics and finding codes.

## See also

- [POST /v1/compute/plans](/run/docs/reference/compute-plans-create.md)
- [GET /v1/compute/plans/{plan_id}](/run/docs/reference/compute-plans-get.md)
- [GET /v1/compute/capabilities](/run/docs/reference/compute-capabilities.md)
