openai/codex · error · io::Error

InvalidData

InvalidData

Error message

oss provider must have a base_url

What it means

Error "oss provider must have a base_url" thrown in openai/codex.

Source

Thrown at codex-rs/lmstudio/src/client.rs:30

    base_url: String,
}

const LMSTUDIO_CONNECTION_ERROR: &str = "LM Studio is not responding. Install from https://lmstudio.ai/download and run 'lms server start'.";
const LMSTUDIO_CONNECTION_TIMEOUT: Duration = Duration::from_secs(5);

impl LMStudioClient {
    pub async fn try_from_provider(config: &Config) -> std::io::Result<Self> {
        let provider = config
            .model_providers
            .get(LMSTUDIO_OSS_PROVIDER_ID)
            .ok_or_else(|| {
                io::Error::new(
                    io::ErrorKind::NotFound,
                    format!("Built-in provider {LMSTUDIO_OSS_PROVIDER_ID} not found",),
                )
            })?;
        let base_url = provider.base_url.as_ref().ok_or_else(|| {
            io::Error::new(
                io::ErrorKind::InvalidData,
                "oss provider must have a base_url",
            )
        })?;

        let client = RouteAwareClientPool::with_connect_timeout(
            config.http_client_factory(),
            ClientRouteClass::Other,
            LMSTUDIO_CONNECTION_TIMEOUT,
        );

        let client = LMStudioClient {
            client,
            base_url: base_url.to_string(),
        };
        client.check_server().await?;

        Ok(client)

View on GitHub (pinned to 339751715c)

When it happens

Trigger: Thrown at codex-rs/lmstudio/src/client.rs:30 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of openai/codex@339751715c (2026-08-25). Data as JSON: /api/errors/b12751db5ec70361. Report an issue: GitHub.