Worker complete callback
POST /internal/computer-use/{session_id}/complete
Called by the Cloud Run container on successful completion. Internal only — no auth required, protected by VPC routing.
Authorizations
Parameters
Path Parameters
The computer-use session UUID
The computer-use session UUID
Request Body required
Request body for the worker complete callback.
Attributes:
steps_executed: Number of screenshot-action iterations completed.
tenant_id: Tenant UUID (passed by container for routing).
usage: Accumulated LLM token usage, or None from a container
image that predates usage reporting.
object
Accumulated Anthropic token usage reported by the container.
The worker cannot bill from inside its isolated Cloud Run container
(no Redis, no Postgres, no CreditManager — same isolation as the
D-13 deviation documented in src/workers/computer_use_worker.py),
so it counts tokens across every turn of the computer-use loop and
reports the totals here. ComputerUseExecutor._meter_llm_usage
runs the reserve/settle against the tenant’s real balance on receipt.
Every field defaults so a container image predating this contract still parses. A body with no tokens is NOT billed as zero silently: the executor logs the missing report at ERROR.
Attributes:
model: Model the container actually called (priced against this).
input_tokens: Summed usage.input_tokens across all turns.
output_tokens: Summed usage.output_tokens across all turns.
cache_creation_input_tokens: Summed cache-write tokens.
cache_read_input_tokens: Summed cache-read tokens.
turns: Number of provider round-trips.
object
Responses
200
Successful Response
object
422
Validation Error