BerriAI/litellm · error · CoreError
expected {expected}, got {actual}
Error message
expected {expected}, got {actual} What it means
Error "expected {expected}, got {actual}" thrown in BerriAI/litellm.
Source
Thrown at litellm-rust/crates/core/src/error.rs:7
use thiserror::Error;
pub type CoreResult<T> = Result<T, CoreError>;
#[derive(Debug, Error, PartialEq, Eq)]
pub enum CoreError {
#[error("expected {expected}, got {actual}")]
InvalidType {
expected: &'static str,
actual: &'static str,
},
#[error("missing required field: {0}")]
MissingField(&'static str),
#[error("invalid response: {0}")]
InvalidResponse(String),
#[error("invalid provider: {0}")]
InvalidProvider(String),
#[error("invalid request: {0}")]
InvalidRequest(String),
#[error("{0}")]
Auth(String),
#[error("upstream request failed with status {status}: {body}")]
Http { status: u16, body: String },
#[error("upstream network error: {0}")]
Network(String),View on GitHub (pinned to 77b7c6c40c)
Solutions
- Fix the input so the actual value matches the expected one ({expected}); see the error context for which field mismatched.
When it happens
Trigger: Thrown at litellm-rust/crates/core/src/error.rs:7 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of BerriAI/litellm@77b7c6c40c (2026-08-18).
Data as JSON: /api/errors/1bf183f594719d4c.
Report an issue: GitHub.