Outcomes¶
A turn ends with a result whose outcome says how it ended. A refusal is an outcome, not an error.
| Outcome | .NET | TypeScript | What happened |
|---|---|---|---|
| Completed | Completed |
completed |
The model answered. |
| Prompt blocked | PromptBlocked |
prompt_blocked |
A rule refused the user's message. It was not sent to the model. |
| Response blocked | ResponseBlocked |
response_blocked |
A rule refused the model's answer. The user does not see it. |
| Tool denied | ToolDenied |
tool_denied |
A tool call was refused, by the user, the tool mode or a rule. |
| Rate limited | RateLimited |
rate_limited |
The organisation's limit on requests or tokens per minute was reached. |
| Budget exceeded | BudgetExceeded |
budget_exceeded |
A usage budget is used up, on servers that set budgets. |
With the outcome come notices: short, user-facing messages that explain a refusal or a limit. Show them to the user as they are.
After a refusal the session goes on. A refused message or answer is never sent to the model again, so the user can edit and resend.
What throws¶
Only real failures throw: the server cannot be reached, the request is malformed, the stream breaks off, or the user has to sign in again. Each SDK has typed errors for these; see .NET and TypeScript.