classifier_unavailable_reason(
exc: BaseException,
*,
timeout_seconds: float,
spec: str | None| Name | Type | Description |
|---|---|---|
exc* | BaseException | |
timeout_seconds* | float | |
spec | str | None | Default: None |
Build a safe agent/UI reason for a failed auto classifier call.
Provider exception text stays out of the reason (it can carry secrets or
noisy HTML). Only real local deadline expiry
(_ClassifierDeadlineExceededError) says the classifier did not respond
within the configured wait budget; a bare provider TimeoutError stays
type-only so we do not claim dcode's deadline fired when the model failed
first. A configured classifier model that cannot be built is named as such
so the user fixes the setting instead of waiting out a nonexistent outage.
Failure raised while invoking or validating the classifier.
Configured local wait budget for one batch.
Label of the distinct classifier model that failed, when one is in
use — its spec, or its model name when a chat model instance was
supplied programmatically (in which case there is no setting to
change). Naming it points the user at the setting to fix; a cached
model built against a since-rotated credential fails here rather
than at construction. None when reviews inherit the main agent
model and the spec would say nothing.