A refused key

You will learn

How the Queen sorts a provider's refusal into transient, quota, auth or a bad request.

Bees call models with keys, and keys get refused. key_failover.t27 sorts each refusal with error_kind. The z.ai code in the body wins over the HTTP status, because z.ai sends a spent quota and a passing overload with the same 429: code 1305 is transient, 1113 is quota. No answer at all is transient. A quota or auth refusal closes the key, and only a bad request is charged to the issue.

Open the interactive lesson →