pub struct ModelCallFailureData {
pub api_call_id: Option<String>,
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 initiator: Option<String>,
pub model: Option<String>,
pub provider_call_id: Option<String>,
pub service_request_id: Option<String>,
pub source: ModelCallFailureSource,
pub status_code: Option<i32>,
}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)
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.
initiator: Option<String>What initiated this API call (e.g., “sub-agent”, “mcp-sampling”); absent for user-initiated calls
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
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
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