classifier_unavailable_reason(
exc: BaseException,
*,
timeout_seconds: float,
model_name: str | None| Name | Type | Description |
|---|---|---|
exc* | BaseException | Failure raised while invoking or validating the classifier. |
timeout_seconds* | float | Configured local wait budget for one batch. |
model_name | str | None | Default: NoneName of the active model when reviews inherit the main model. |
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.
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.