pub struct ModelCallFailureData {Show 21 fields
pub api_call_id: Option<String>,
pub api_endpoint: Option<AssistantUsageApiEndpoint>,
pub bad_request_kind: Option<ModelCallFailureBadRequestKind>,
pub duration_ms: Option<i64>,
pub error_code: Option<String>,
pub error_message: Option<String>,
pub error_type: Option<String>,
pub failure_kind: Option<ModelCallFailureKind>,
pub initiator: Option<String>,
pub is_auto: Option<bool>,
pub is_byok: Option<bool>,
pub max_output_tokens: Option<i64>,
pub max_prompt_tokens: Option<i64>,
pub model: Option<String>,
pub provider_call_id: Option<String>,
pub reasoning_effort: Option<String>,
pub request_fingerprint: Option<ModelCallFailureRequestFingerprint>,
pub service_request_id: Option<String>,
pub source: ModelCallFailureSource,
pub status_code: Option<i32>,
pub transport: Option<ModelCallFailureTransport>,
/* private fields */
}Expand description
Session event “model.call_failure”. Failed LLM API call metadata for telemetry
Fields§
§api_call_id: Option<String>Completion ID from the model provider (e.g., chatcmpl-abc123)
api_endpoint: Option<AssistantUsageApiEndpoint>API endpoint used for this model call, matching CAPI supported_endpoints vocabulary
bad_request_kind: Option<ModelCallFailureBadRequestKind>For HTTP 400 failures only: whether the response carried a structured CAPI error envelope (structured_error, a deterministic validation failure) or no error body (bodyless, the transient gateway/proxy signature). Absent for non-400 failures.
duration_ms: Option<i64>Duration of the failed API call in milliseconds
error_code: Option<String>For HTTP 400 failures only: the code from the CAPI error envelope (e.g. ‘model_max_prompt_tokens_exceeded’) identifying which deterministic validation failure occurred. Raw server-controlled string, emitted only through restricted telemetry. Absent for bodyless or non-400 failures.
error_message: Option<String>Raw provider/runtime error message for restricted telemetry
error_type: Option<String>For HTTP 400 failures only: the type from the CAPI error envelope (e.g. ‘websocket_error’), a coarser companion to errorCode for envelopes that carry no code. Raw server-controlled string, emitted only through restricted telemetry. Absent for bodyless or non-400 failures.
failure_kind: Option<ModelCallFailureKind>Whether the failure originated from an API response or the request transport
initiator: Option<String>What initiated this API call (e.g., “sub-agent”, “mcp-sampling”); absent for user-initiated calls
is_auto: Option<bool>Whether the session selected Auto mode for the failed call
is_byok: Option<bool>Whether the failed call used a bring-your-own-key provider
max_output_tokens: Option<i64>Effective maximum output-token limit for the failed call
max_prompt_tokens: Option<i64>Effective maximum prompt-token limit for the failed call
model: Option<String>Model identifier used for the failed API call
provider_call_id: Option<String>GitHub request tracing ID (x-github-request-id header) for server-side log correlation
reasoning_effort: Option<String>Reasoning effort level used for the failed model call, if applicable
request_fingerprint: Option<ModelCallFailureRequestFingerprint>Content-free structural summary of the failing request. Contains only counts and shape flags (no prompt content), so it is safe for unrestricted telemetry. Populated only for client-error (4xx) failures.
service_request_id: Option<String>Copilot service request ID (x-copilot-service-request-id header) for CAPI log correlation
source: ModelCallFailureSourceWhere the failed model call originated
status_code: Option<i32>HTTP status code from the failed request
transport: Option<ModelCallFailureTransport>Transport used for the failed model call (http or websocket)
Trait Implementations§
Source§impl Clone for ModelCallFailureData
impl Clone for ModelCallFailureData
Source§fn clone(&self) -> ModelCallFailureData
fn clone(&self) -> ModelCallFailureData
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more