xai-org/grok-build · error · acp::Error
RATE_LIMITED_ERROR_CODE (-32003)
RATE_LIMITED_ERROR_CODE (-32003)
Error message
Rate limited
What it means
Error "Rate limited" thrown in xai-org/grok-build.
Source
Thrown at crates/codegen/xai-grok-shell/src/session/acp_session_impl/sampler_turn.rs:1270
error_type: "encrypted_content_mismatch".to_string(),
message: friendly.clone(),
},
))
.await;
return Err(acp::Error::invalid_params().data(friendly));
}
if matches!(error.kind, SamplingErrorKind::RateLimited) {
self.log_terminal_failure("rate_limited", error.status_code, &detailed_message);
self.send_xai_notification(XaiSessionUpdate::RetryState(
crate::extensions::notification::RetryState::Exhausted {
attempts: rate_limit_waits,
reason: detailed_message.clone(),
is_rate_limited: true,
},
))
.await;
let acp_err = acp::Error::new(
crate::sampling::error::RATE_LIMITED_ERROR_CODE,
"Rate limited".to_string(),
)
.data(detailed_message);
return Err(acp_err);
}
// 4. Auth-401 recovery only applies to refreshable session-token auth (the
// stable gate, not `creds.auth_type`): a static api-key isn't refreshable,
// so retrying re-sends the same rejected bearer and 401-loops the turn.
// See `crate::agent::auth_method::session_token_auth_gate`.
// One sampling-config snapshot drives every arm-4 decision, so the
// provider resolution and the gate can't disagree mid-model-switch.
let (failed_model_id, failed_base_url) = self
.chat_state_handle
.get_sampling_config()
.await
.map(|c| (c.model, c.base_url))View on GitHub (pinned to bc7f02eddd)
When it happens
Trigger: Thrown at crates/codegen/xai-grok-shell/src/session/acp_session_impl/sampler_turn.rs:1270 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of xai-org/grok-build@bc7f02eddd (2026-08-31).
Data as JSON: /api/errors/76e72717430de692.
Report an issue: GitHub.