set_model_cost
Register a model's pricing in cents per 1,000 tokens for input and output to enable spend tracking and prevent failed-closed denials for self-hosted models.
Instructions
Register a cost for a model with no built-in pricing (required for self-hosted models: AgentGuard fails closed on unknown costs). Cents per 1,000 tokens. Optional agent_id, task_id and workflow_id accept identifiers only; spend_decide binds them into the signed actor. Read-only and cost-configuration tools accept these fields without recording a spend decision.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"model": "<model>",
"input_cents_per_ktok": "<input_cents_per_ktok>",
"output_cents_per_ktok": "<output_cents_per_ktok>"
},
"name": "set_model_cost"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | Yes | ||
| task_id | No | Optional task identifier; signed as actor.taskId on spend_decide | |
| agent_id | No | Optional agent identifier; signed as actor.agentId on spend_decide | |
| workflow_id | No | Optional workflow identifier; signed as actor.workflowId on spend_decide | |
| input_cents_per_ktok | Yes | ||
| output_cents_per_ktok | Yes |