Replace access from your terminal
With the CLI installed and your Millwork key configured, find the connection:state is rotated: the CLI checked the replacement
and switched to it. You keep the connection and saved
models. For providers other than AWS Bedrock, remove the old API key in its
controls after this check. A passing
connection check confirms access; it does not submit a model task.
Continue an interrupted replacement
Keep the continuation command printed before setup starts. It includes the operation’s request key; the later command also includes--handoff-id.
Run the printed command to continue the same replacement. It includes an npm
form if millwork is not on your path. Do not generate another key to recover
a response you did not receive.
If the browser step expires, inspect the connection with millwork provider list before starting a fresh replacement. A failed or expired replacement keeps the old settings; it does
not restore an expired or revoked credential.
Replace access from a script
Read the affected connection first:action_required without changing the connection. After approval,
use the returned command with --yes. That flag approves the credential
operation only. It does not approve a paid run.
A pending browser step returns exit code 2 with human_handoff, its action,
expiry and continuation commands. JSON mode does not wait for the browser.
Use --open-browser to request opening the current link; it cannot be combined
with --no-browser. Complete the human step, then use the saved continuation
with its original --idempotency-key and --handoff-id. Neither value is a
provider key; keep actual keys and setup links out of chat.
Replace access through the REST API
Start a new browser setup for the existing connection. OpenRouter asks you to approve access again; a key-entry provider asks for a replacement key. AWS Bedrock keeps the connection’s existing method and asks for a new key or STS session for the same region and profile. Follow Provider setup fields for the details. Rotation does not start a paid run.Before you begin
SetMILLWORK_API_URL and MILLWORK_API_KEY as shown in
Make your first API call.
Find the connection you are updating and the two values its secure setup needs:
connection_id,
source_id, and auth_scheme of the one whose access you are replacing.
1
Complete a new secure setup
Start a new secure setup, the one-time browser step, for the same
connection. Use the connection’s existing Expected result:
source_id and auth_scheme.umask 077 keeps newly created response files private to you. Keep
handoff.json out of source control and support messages. Keep
ROTATION_REQUEST_KEY for this replacement. If a response is lost, replay
that request with the same key and body after inspecting its saved state.Expected result: 201 with state pending, a handoff_intent_id, and
a one-time continue_url. Open that link in a browser and replace
access there: approve again for OpenRouter, enter the replacement for a
key-entry provider, or renew AWS access with the same method, region and profile.
Do not create a second connection. Then wait for setup to complete:completed. If it is pending, finish the browser
step and repeat this status read. If it is consumed, inspect the existing
connection before taking another action. If it is expired or failed,
start a new secure setup; the old link cannot be reused. The full request reference
is in Connect a provider account.2
Switch to the replacement access
status is active, test_state is passed, and
both revision numbers match. binding_revision identifies the current
saved credential version; tested_binding_revision identifies the version that
passed the connection test. Matching values confirm that Millwork tested
the credentials now in use.3
Finish replacing access
For providers other than AWS Bedrock, remove or revoke the old API key only
after the new revision passes. Use the
provider’s own controls.
Millwork schedules deletion of its old saved credential; this is separate
from revoking access at the provider. A short-term Bedrock key or STS session
keeps its existing AWS expiration. Routine renewal does not require revoking
the session or other keys.
If it fails
Never send a provider key or a one-time setup URL to support.