Skip to content

Configure

Model gateway and ledger

Transports: OpenRouter, OpenCode Go, GLM Coding Plan via Pi and GPT via Sign in with ChatGPT; the router is described below. External model calls are made only by an explicit sych doctor --probe-model PROFILE and sych review --models PROFILE (ANALYSIS.md).

  • sych_core::model::ModelProvider is a single transport: ModelRequest → ModelReply | ProviderError. The adapter does not track the budget and does not retry requests; the gateway does that.
  • Route pins the profile, provider, adapter, requested model, billing_kind, enforcement and Capabilities (native structured output, enforced output cap, usage/cost reporting, hidden upstream calls). ModelReply stores the actual model, upstream provider and generation id separately from the requested ones.
  • ProviderError.kind distinguishes AUTH, ENTITLEMENT, QUOTA_EXHAUSTED, RATE_LIMITED, TRANSIENT, TIMEOUT, UNSUPPORTED, BILLING_MISMATCH, CANCELLED, CONFIG; dispatched tells whether the request could have reached the provider.
  • Prompt is assembled from layers: role → output contract → trusted rules (system message) → task → data blocks (user message). Each data block is framed as <<<DATA nonce label>>>…<<<END nonce>>>, where the nonce is part of the SHA-256 of the content itself, so repository text cannot close its own frame. The versioned template id (discovery@1) and the schema name are stored in every attempt; chain-of-thought is neither requested nor stored.
  • The reply schema is generated by schemars from the same Rust type the reply is parsed into; the provider receives it if it supports native structured output, and otherwise it is appended to the system message (# Reply schema): OpenCode Go and the GLM Coding Plan via Pi take no schema parameter, so the model reads it there.
  • The reply is parsed in full (deny_unknown_fields, no trailing text). Only a single code fence wrapping the entire reply is allowed; JSON is not extracted from prose.
  • An invalid reply gets at most one repair: the original messages + the model’s reply + the schema error. A repair is a separate attempt with its own reservation in the same budget. A second error is TaskFailure::Schema. TRUNCATED and REFUSED replies do not count as a result.
  • A TRUNCATED reply that spent reasoning tokens, on a route that can turn reasoning off (OpenRouter), is asked once more with the same messages and reasoning.effort: none (NO_REASONING attempt, its own reservation): replaying the same request reproduces the cut, while without reasoning the output cap holds the answer. A multi-unit review or discovery is not asked again but split by the engine (ANALYSIS.md).

For each attempt, before sending:

  1. Input bound: the number of UTF-8 bytes of the messages + 16 per message (no less than the byte-level BPE token count).
  2. Output bound: 2,000 tokens per request; max_output_tokens is sent only if the route honors it (output_cap_enforced).
  3. Monetary upper bound: api_usage uses the price card from price_catalog_file, rounded up, with no cache discounts. No price card or no enforced output cap means NO_PRICE_BOUND, and the request is not sent. subscription_quota is 0 per request (overage is disabled), but the provider must have a fixed_fee, otherwise FIXED_FEE_UNKNOWN.
  4. A single SQLite transaction checks and records the reservation: attempts/input/output tokens and run money (per purpose ANALYSIS | TOUR | FOLLOWUP), money for the day, the week from Monday 00:00 UTC (budgets.tenant_weekly, no cap unless set; it spans a month boundary) and the UTC calendar month. A configuration needs day ≤ week ≤ month where they are set. An attempt of a playground run (a maintainer’s try that publishes nothing) also counts against budgets.playground_daily, the day’s spend of every playground run of the tenant, set no higher than the tenant day. Output tokens are hard only for api_hard; for subscription_observable the upstream output/quota is soft/unknown, while Sych attempts, input and money stay hard.
  5. Verification reserve: pure search (discovery, high-risk audit) reserves against caps minus one attempt and its share of run money (cap / max_attempts), so it cannot spend what the verifier needs; the verifier sees the full caps. Discovery share: assessment, combined review and the high-risk audit also keep one attempt per standalone discovery batch, at most (max_attempts - 1) / 2, with the same per-attempt share of money and tokens; while that share is not zero, assessment keeps the verifier’s attempt too. Retry, repair and fallback spend the same reserve-aware remainder.

Invariant: settled charges + held reservations + unknown charges ≤ cap.

Outcome State Money
Request not sent (dispatched=false) RELEASED reservation is released
Reply with reported cost or full usage SETTLED actual charge; reference estimate kept separately
Subscription without reported money SETTLED, charge=NULL not zero but “not reported”; fee accounted separately
Timeout/cancel/disconnect after dispatch, metered reply without cost and usage UNKNOWN reservation is held (UNKNOWN_CHARGE), usage NULL

Settlement is idempotent by attempt id: SETTLED does not change again, and UNKNOWN can later be reconciled into a known charge. A charge above the reservation is stored and marked billing_mismatch; for a subscription this blocks further subscription-only reservations for that provider in the month (BILLING_MISMATCH).

models.providers.<name>.fixed_fee: { amount_micro_usd, allocated_micro_usd } is the subscription price per UTC calendar month and the share of it allocated to Sych’s model pool. The first subscription reservation in a month writes a subscription_fees row; the share counts toward the monthly limit once, not per request and not toward the daily/run limits. Fee/allocation values have no defaults: without them a subscription profile is not used.

{
"schema_version": 1,
"revision": "openrouter-2026-10-25",
"prices": {
"deepseek/deepseek-v4.1-flash": { "input_per_mtok": 300000, "output_per_mtok": 1200000 }
}
}

Prices are micro-USD per million tokens, reasoning is billed as output; the key is the profile’s model slug. If a profile lists several upstreams, the price of the most expensive one is used. sych doctor parses the catalog and prints the revision; the operator enters prices from the current rates, Sych does not guess them. An example is examples/personal/config/prices.json; its prices are a snapshot of one revision.

Adapter sych_adapters::openrouter is a single HTTP POST {endpoint}/chat/completions, with no SDK and no agent loop.

  • Pinned routing. model is an exact slug (vendor/model); openrouter/*, ~… and *latest are rejected. The profile must list upstreams; the request sends provider.order = upstreams, allow_fallbacks: false, require_parameters: true, data_collection: "deny" and does not send models (the model fallback list). The profile’s price card must cover the most expensive of the listed upstreams.
  • Reasoning. The profile’s reasoning_effort: low|medium|high is sent as reasoning.effort; without it the field is not sent. Reasoning counts toward the output cap of a single request (2,000 tokens), which is why DeepSeek in the example uses low: with the default effort the verify reply was truncated (TRUNCATED) after ~1,900 reasoning tokens. The per-request cap is budgets.<purpose>.max_output_tokens_per_request (default 2,000, no more than max_output_tokens); the reservation’s money upper bound is computed from it. Together with require_parameters, an upstream that does not support the parameter is not selected.
  • Call shape. max_units_per_call and max_shown_tokens_per_call of a profile bound one discovery call when the profile is the reviewer’s primary: a model that reasons past the output cap over many review units gets fewer per call (more calls, each shorter). Unset, a call takes as many units as fit context.max_tokens_per_request.
  • Structured output. response_format: json_schema with strict: true; local strict validation and repair always run. require_parameters prevents OpenRouter from silently choosing an upstream without schema support.
  • Streaming. The request is sent with stream: true: keep-alive comments : OPENROUTER PROCESSING keep the connection open during long reasoning, and SSE chunks are assembled into the same reply as without streaming (content, finish reason, generation id, model, upstream; usage and cost come from the last chunk). A stream cut off before [DONE] and a finish reason is a dispatched TRANSIENT/TIMEOUT with the generation id in the message, not a partial reply; an error inside the stream is parsed as an error after 200. A non-200 reply arrives as plain JSON.
  • Usage and money. The generation id, actual model, upstream provider, prompt/completion/ reasoning tokens (reasoning is included in completion, not added) and usage.cost are stored. USD is converted to micro-USD from the decimal representation of the number, rounding up, without floats.
  • Errors. 401 → AUTH, 402 → QUOTA_EXHAUSTED, 403 → ENTITLEMENT, 408 → TIMEOUT, 429 → RATE_LIMITED (+Retry-After), 503 → UNSUPPORTED (no upstream matches the requirements), other 5xx → TRANSIENT. 400/401/402/403/429/503 and connection refusal count as not dispatched (the reservation is released); 408, 5xx, a cut-off reply and error inside a 200 reply are dispatched, and the charge stays UNKNOWN. finish_reason: length/unknown → TRUNCATED, content_filter/refusal → REFUSED. A reply that did not finish with stop logs finish_reason, native_finish_reason and the beginning of the refusal.
  • Egress. Only the provider’s endpoint from sych.yaml (allowlist), no redirects and no system proxy, timeout 300 s. The key comes from the api_key_env variable and never appears in output or errors. Corporate mode with OpenRouter is rejected by configuration validation.

Deterministic, no network: capability — a metered route without an enforced output cap is not sent (crates/sych-core/tests/gateway.rs); schema — strict parsing and one repair (same file); partial stream — a cut-off and a failed stream, length (crates/sych-adapters/tests/openrouter.rs); unknown charge — timeout after dispatch and a reply without cost and usage (gateway.rs); provider selection — pinned model, provider.order, allow_fallbacks: false, require_parameters (openrouter.rs); the whole path doctor → gateway → ledger → adapter — loopback stub (crates/sych-app/tests/probe.rs). Loopback stubs answer 404 to foreign connections, since another local tool may poll a new loopback port.

Terminal window
sych db migrate --config sych.yaml
sych doctor --config sych.yaml --repo . --probe-model cheap_api

Makes one small paid structured request (echo) through the gateway and ledger and prints JSON: route (profile, model, upstreams, billing, enforcement, price revision), valid, failure and attempts (reserved, charge, charge state, tokens, resolved model, upstream, generation id). The run is stored in the ledger under access scope model-probe and closed without a review result. Exit 0 means a valid reply, 4 means no key or AUTH, 3 means another error, 2 means configuration.

Adapter sych_adapters::opencode_go is POST https://opencode.ai/inference/go/openai/v1/chat/completions (Go, inference contract). SSE chat completions parsing shared with OpenRouter lives in sych_adapters::chat.

  • The /go boundary. The endpoint of the opencode_go provider must be exactly https://opencode.ai/inference/go/openai/v1 (or loopback in tests); a path without /go draws on the Console balance and is rejected by configuration validation. Model is an exact Go id (deepseek-v4.1-flash), without opencode-go/ and *latest.
  • Headers. User-Agent: sych/<version>; x-opencode-session is the gateway task id (TaskId): the first attempt and its repair go in the same session, the next task gets a new one. The key comes from api_key_env; OpenCode auth files are not read.
  • Schema. Native structured output is not declared (response_format and max_tokens are not sent): the schema goes into the system message and the reply is validated locally, with at most one repair. Output cap and quota are soft (subscription_observable).
  • Extra Usage. Sych does not enable it and does not check it via the API (there is none). The operator confirms the setting in the Console and sets overage_disabled: true; without it the profile does not resolve (sych doctor reports this). DeepSeek in Go requires the Global region in Settings › Privacy; this is also an account setting, not Sych’s.
  • Money and quota. usage.cost is the reported charge (0 within Go limits is an observed fact, not “free”); opencode.billing_source and opencode.allowance (quota spend in plan dollars) are stored in the attempt separately; opencode.list_cost is reference only. A charge above a zero reservation (balance/byok) is marked by the ledger as billing_mismatch, and further subscription-only calls for that provider in the month are rejected. Go does not report quota windows/reset in the reply; they stay unknown and are not invented.
  • Errors are the same as for OpenRouter (shared chat): 401/403/429/5xx and a cut-off stream.

Fixtures: crates/sych-adapters/tests/opencode_go.rs (path, headers, session, body without schema, zero charge + allowance, balance charge), crates/sych-core/tests/gateway.rs (allowance separate from charge, repair in the same task), crates/sych-core/tests/config.rs (the /go boundary).

The openai_compatible adapter (sych_adapters::openai_compatible) sends POST <endpoint>/chat/completions to any OpenAI-compatible chat completions endpoint you run or pay for: a VPC gateway, vLLM, LiteLLM, Ollama, a vendor API. This is the only route a corporate config can use.

  • Endpoint and key.
    • endpoint is the base URL. Like every provider endpoint, it is part of the egress allowlist.
    • api_key_env is sent as Authorization: Bearer, with User-Agent: sych/<version>.
    • An endpoint without auth still needs api_key_env: set the variable to any value.
  • Money. The profile is api_usage / api_hard, so its model needs a card in price_catalog_file.
    • Every request carries max_tokens, so the card bounds a call before it is sent. With no card the call is refused as NO_PRICE_BOUND.
    • The charge is computed from the card and the reported usage (stream_options.include_usage). A cost field in the reply is ignored.
    • With no usage reported the charge is UNKNOWN.
  • Schema. Native structured output is not claimed: the schema goes into the system message and the reply is validated locally, with at most one repair.
  • Not covered. No vendor routing fields, reasoning controls or extra headers. A gateway that requires its own header (OpenCode Go wants x-opencode-session) needs its dedicated adapter.

Fixtures: crates/sych-adapters/tests/openai_compatible.rs (path, key, max_tokens, no schema, reported cost ignored).

Z.ai permits the Coding Plan in supported coding tools (usage rules, Pi), but not in a custom HTTP client/bot. That is why adapter sych_adapters::pi runs the real Pi CLI instead of imitating its requests.

  • Pin. Only Pi 1.4.0 (@earendil-works/pi-coding-agent@1.4.0, npm integrity sha512-Z41LpZ3yYHSC/UUps6Mr39UMFPwH8elhJBG9DY1P7kuzsE5qSK/6eMj2EHzO5evJRQWLbKSqUMw+4nCNtIyiQg==): resolve runs --version and rejects any other release. The bundle is self-contained (requires Node ≥ 22.19):

    Terminal window
    npm pack @earendil-works/pi-coding-agent@1.4.0 && tar xzf earendil-works-pi-coding-agent-1.4.0.tgz
    export SYCH_PI_BINARY="$PWD/package/dist/bundle/cli.js"
  • Endpoint and key. Provider glm_coding_plan with transport: supported_pi_cli must specify endpoint: https://api.z.ai/api/coding/paas/v4 (validated; the Standard API /api/paas/v4 has different billing) and executable_env. Pi receives the endpoint as the baseUrl of the zai provider in models.json, and the key only as ZAI_API_KEY in the process environment (not in argv). Sych cannot determine the key type (Coding Plan rather than Standard API); the operator confirms it; overage_disabled: true confirms that extra usage is disabled.

  • Isolation. Each request is a new process in a temporary directory: empty HOME, PI_CODING_AGENT_DIR and working directory, env_clear (only PATH is inherited), flags --mode json --no-session --no-tools --no-extensions --no-skills --no-prompt-templates --no-themes --no-context-files --no-mcp --no-approve --offline, PI_SKIP_VERSION_CHECK=1, PI_TELEMETRY=0. settings.json: retry.enabled: false, retry.provider.maxRetries: 0, compaction.enabled: false, cacheWarming: off, defaultProjectTrust: never. The system message is the --system-prompt file; everything else is a single prompt on stdin (repair passes the previous reply in the same prompt). A 300 s timeout kills the process; upstream spend stays unknown.

  • Reply. The single assistant message_end after agent_settled is taken from the JSONL. tool_execution_start, auto_retry_start, compaction_start, a second model turn, toolUse → UNSUPPORTED; a stream without agent_settled → dispatched TRANSIENT; length → TRUNCATED; aborted → CANCELLED. JSON is checked by the shared local validation; native schema is not declared.

  • Usage and money. Tokens come from Pi usage (input = input + cache read/write; reasoning is included in output); zero usage is unknown. Pi computes usage.cost from its own catalog, so it is a reference, not a charge; the subscription charge is not reported (NULL), and the fixed fee is accounted once a month. Z.ai quota windows do not arrive in the reply.

  • Errors follow Pi’s errorMessage (<status>: <body>) and Z.ai codes (api-code): 1000/1001/1003/1005 → AUTH; 1308/1310/1316–1321 (5-hour/weekly/monthly limit, message with reset) → QUOTA_EXHAUSTED; 1113/1309/1311/1313/1314/1315/1220 (no package, plan expired, model outside the plan, fair use) → ENTITLEMENT; 1302 → RATE_LIMITED; 1305/1234/5xx → TRANSIENT. None of them changes the key/endpoint or enables the paid API.

Fixtures: crates/sych-adapters/tests/pi.rs; the JSONL in tests/fixtures/pi was recorded by a real Pi 1.4.0 against a loopback stub (ok, err401; quota is the same stream with code 1308). A stand-in executable checks env, argv, stdin, the empty working directory and the pinned endpoint.

GPT via ChatGPT plan: Sign in with ChatGPT

Section titled “GPT via ChatGPT plan: Sign in with ChatGPT”

The transport is SIWC for open-source local clients (overview, sign-in, inference, limitations, errors). The Codex app-server is not used: text-only Responses has no agent loop, so the no-tools boundary does not need to be proven separately. A regular OpenAI API key is not this subscription: a provider with api_key_env is rejected by validation.

  • Sign-in. sych auth chatgpt --config sych.yaml --provider gpt_subscription uses authorization code + PKCE (S256) with loopback redirect http://127.0.0.1:1455/auth/callback, dynamic registration (client_id=dynamic_agent_client, agent_name_hint=Sych), scope openid profile email offline_access resource.invoke chatgpt.tokens.use.direct, resource=https://api.openai.com/v1. ext_agent_host_id is a random urn:uuid, chosen once (file <token file>.host) and reused together with the issued client_id. The callback checks state and the issued client id; the ID token, received directly from the token endpoint over TLS, is checked by iss (from /.well-known/openid-configuration), aud, exp and nonce (OIDC Core §3.1.3.7 instead of a signature). Without a granted chatgpt.tokens.use.direct the sign-in is not saved. A different sub does not overwrite an existing account’s file. On a remote machine, use ssh -L 1455:127.0.0.1:1455 HOST or paste the address the browser stopped at. After sign-in the command prints the account’s models (GET /v1/models, visibility == list); no inference is performed.
  • Tokens. The file is the path from connection_ref_env (outside the repository), written atomically with 0600; fields follow the sign-in contract (issuer, subject, client id, host id, id/access/refresh token, expiry, scopes). Before a request the token is refreshed 120 s before expiry (grant_type=refresh_token with the issued client id and resource); refresh is serialized by a lock file, and the rotated refresh token is saved together with the access token. invalid_grant and other terminal refresh codes → AUTH (sign in again), the file is not erased; invalid_client → CONFIG; network → TRANSIENT. Tokens are not logged and are not passed to other processes.
  • Request. POST https://api.openai.com/v1/responses: model, instructions (trusted layers; the route rejects system items), input (user/assistant), store: false, stream: true, text.format = strict json_schema. max_output_tokens, sampling, metadata, user and tools are not sent. The endpoint is pinned by validation; ChatGPT backend-api is not used. The documentation does not confirm text.format support on this route: on subscription_sharing_unsupported_capability the error is UNSUPPORTED with param; the parameter is not silently dropped.
  • Reply. Success is only response.completed (text deltas, usage.input_tokens/output_tokens, reasoning from output_tokens_details, response id and actual model). response.incomplete → TRUNCATED (content_filter → REFUSED), refusal → REFUSED, an output item other than message/reasoning (tool call) → UNSUPPORTED, a cut-off before completed → dispatched TRANSIENT, response.failed → by code, dispatched.
  • Errors (error.code, otherwise HTTP): usage_limit_exceeded → QUOTA_EXHAUSTED (reset is not inferred), user_not_eligible/403 → ENTITLEMENT, invalid_user/401 → AUTH, unsupported_capability → UNSUPPORTED, route_not_supported/chatpass_v2_* → CONFIG, usage_unavailable/user_unavailable/503 → TRANSIENT. Errors before the stream (admission, 4xx, 503) are not dispatched. OpenAI does not switch the billing path by itself; neither does Sych.
  • Accounting. subscription_observable: charge NULL, billing_source: chatgpt_plan, tokens as reported; standard API prices do not apply to the plan; fixed fee once a month. allowed_modes is only personal_local: SIWC for a paid or remotely hosted app requires separate admission.

Fixtures: crates/sych-adapters/tests/siwc.rs (route fields, completed/incomplete/refusal/cut, tool item, error codes, refresh with rotation and 0600, revoked session without inference, missing file/scope) and tests/siwc_auth.rs (base64url, PKCE RFC 7636, host id, claims, callback). The authorize page of auth.openai.com opens only in a browser, so sign-in itself is not covered by an automated test.

sych_core::model::Router is a single deterministic loop on top of Gateway; there is no separate orchestrator.

  • Plan. A RoutePlan is fixed per run (recorded in the analysis artifact with a revision hash): for the roles reviewer, verifier, risk_auditor — a primary and one chain. --models roles: the primary is models.roles.<role> (no role means the reviewer’s profile; in a deep manual run models.deep_roles.<role> comes first), and the chain by priority is fallback.chains.profiles.<primary> → chains.roles.<role> → chains.providers.<provider primary>. --models PROFILE pins the profile for all roles and takes only its own chain (profile, then provider), without role chains, so that a cheapest-only comparison is not mixed with subscriptions. Chains are flat: a fallback profile’s chain is not attached, so the loop does not restart (mutual A → B and B → A end after the second hop); a duplicate in a chain, self-fallback, an unknown profile, a profile named after the fake or roles selector and wait_for_usage_reset: true are rejected by validation. The analysis artifact records model, reasoning_effort and upstreams for each route.
  • Pass roles. Assessment, review and discovery use reviewer; the obligation-bound high-risk audit uses risk_auditor (where models.roles.risk_auditor points to Astra/Fable, that is the premium escalation: only for high-risk obligations, not for the whole PR); checking candidates uses verifier. A more expensive model does not substitute for missing source/environment facts: such obligations stay UNKNOWN.
  • Hop. Each profile in a chain is visited at most once per task. Before a hop the profile is resolved again (mode, billing, egress, credentials, pinned runtime), and the route must match the one planned at the start of the run; a route without native structured output is used with the schema in its prompt. Cooldown is also checked, and, inside the gateway, the same run/day/week/month caps, attempts and deadline in one ledger: switching backends does not reset the counters, the previous route’s unknown charge stays reserved, and a repair is a separate accounted attempt. A fallback profile that does not resolve stays in the plan with its reason and is skipped; an explicit --models PROFILE must resolve by itself, and roles needs at least one profile in the reviewer’s chain.
  • When to switch. Only on fallback.on: quota_exhausted, rate_limited, transient, timeout, unsupported_capability. Also when the route itself cannot be accounted (NO_PRICE_BOUND, FIXED_FEE_UNKNOWN, BILLING_MISMATCH): the next route makes a new reservation. AUTH, ENTITLEMENT, CONFIG, CANCELLED, shared caps/deadline, a schema/truncated/refused reply stop without a retry. The same route is not called again within a task; there is no waiting for reset. The engine may start a new task for the same work: a refused review sends its units to discovery, and a refused discovery runs once more after the other searches, once the shortest cooldown is over and never past the run’s deadline (ANALYSIS.md).
  • Cooldown. A profile that failed on a trigger rests for max(cooldown_seconds, Retry-After); subsequent tasks in the run skip it (SKIPPED, “cooling down until …”) and after expiry start from the primary again (revert_policy: cooldown_expiry). A timeout without Retry-After is one slow generation, not an outage: the task moves down its chain, and the profile stays usable for the run’s other tasks.
  • Outcome. hops in the analysis artifact: role, profile and ANSWERED | FELL_BACK | STOPPED | SKIPPED with failure/ reason. All skipped → NO_ELIGIBLE_ROUTE with reasons; a failed pass becomes a gap in the result (PARTIAL), not an empty success. usage_summary.routes lists each route with attempts, quota attempts and fixed fee separately.
  • Boundaries. Subscription adapters (ChatGPT, GLM, OpenCode Go) are allowed by validation only in personal_local: a personal login does not go into a hosted bot or corporate. A corporate config cannot have OpenRouter or a subscription either as a route or as a fallback; see the example examples/corporate/sych.yaml.

Fixtures: crates/sych-core/tests/router.rs (cheap → subscription → premium in one ledger, auth stop, cooldown and return to primary, exhausted cap, unknown charge, unconfigured trigger, no eligible route, a route without a fee hands over to the next one, chain priority), tests/config.rs (duplicates, self-fallback, reset wait, corporate deny-external, subscription local only).

  • The subscription transports (ChatGPT plan, GLM Coding Plan, OpenCode Go) are verified by fixtures and loopback stubs, not against the live services: each needs its own sign-in or key, fixed_fee and a confirmed overage_disabled.
  • openai_compatible is verified by loopback stubs. A live call to OpenCode Go reached the endpoint with a price-card reservation and was refused for the missing x-opencode-session header; no other endpoint has been tried live.
  • Cooldowns live within a single run; they are not persisted across processes.
  • Reconciliation of UNKNOWN attempts via GET /generation is not implemented yet: the generation id of a cut-off stream is in the attempt’s error message, but the reservation stays held for now.