Enum ChatGenerationFailure
- Namespace
- MailFathom.Application.Chat
- Assembly
- MailFathom.Application.dll
Names why a chat request produced no answer, at the granularity a caller acts on.
public enum ChatGenerationFailure
Fields
AnswerEmpty = 5The provider ended the call without producing any text.
Terminal, and the one classification that names a declaration or a conversation to correct rather than a remote condition to wait out.
CredentialRejected = 0The provider refused the credential the deployment presented.
Terminal. Every repetition receives the same answer while counting against the account's request budget.
RateLimited = 1The provider refused the request because the deployment is over its allowed rate.
Worth repeating, but only after a backoff. It is separate from a transport fault because the provider answered rather than failed to answer, and answering again immediately is what turns a throttle into a longer one.
RequestRefused = 4The provider rejected the request itself, for a reason repeating it cannot change.
A model the deployment does not serve, a conversation beyond the model's context window, a parameter the model does not accept — and a prompt the provider's own safety system refused before generating anything. The last of those is not named apart from the others because telling it apart would mean reading the provider's error body, and that body quotes the request, which is mail text.
RequestTimedOut = 2The request outlived the time the deployment allows one chat call.
TransportFaulted = 3The request never reached an answer: the endpoint was unreachable, the connection dropped, or the response was unreadable.
Remarks
The set exists for the reason its embedding counterpart does: "the provider failed" hides the one distinction that decides what happens next. Three of these are worth another attempt and three are not, and repeating one of the second group buys the same answer while the account carries the request.
A generation the provider began and then cut short is deliberately absent. A truncated answer and one a content filter stopped are answers rather than failures, and they are reported by ChatGenerationStop on the answer itself — which is also what guarantees neither is ever retried, since nothing repeats a call that returned something.
A caller's own cancellation and a host shutdown are absent as well. Both arrive as OperationCanceledException and neither is a statement about the provider, so folding them in here would put a decision this system made among the answers a remote party gave.