pub struct ApiErrorParams {
pub effort: Option<String>,
pub provider: Option<ApiErrorProvider>,
pub remedy: Option<ApiErrorRemedy>,
pub media: Option<ApiErrorMedia>,
pub media_reason: Option<ApiErrorMediaReason>,
pub rate_limit_info: Option<RateLimitInfo>,
}Expand description
Parameters of an assistant frame’s api_error, carried as
AssistantMessage::api_error_params only for the error kinds that have
any (CLI 2.1.274+).
Fields§
§effort: Option<String>The effort level the API refused (effort_requires_thinking).
provider: Option<ApiErrorProvider>The API provider whose credentials failed (provider_credentials,
gateway_session_expired).
remedy: Option<ApiErrorRemedy>How to repair the failed credentials (provider_credentials,
gateway_session_expired).
media: Option<ApiErrorMedia>The kind of block the API refused (media_removed); absent for
ApiErrorMediaReason::MediaBudget (CLI 2.1.288+).
media_reason: Option<ApiErrorMediaReason>Why the API refused the block (media_removed, CLI 2.1.288+).
rate_limit_info: Option<RateLimitInfo>What the refused request’s own response said about the limit
(usage_limit_reached), in the shape rate_limit_event carries:
status is rejected and isUsingOverage false, rateLimitType names
the limit, resetsAt is when it resets, and the overage fields and
limitScope say whose spend cap it is. It is that refusal’s record
and is never updated, so compare resetsAt with the clock before
calling the limit current (CLI 2.1.292+).