openai/codex · error · io::Error

NotFound

NotFound

Error message

Built-in provider {LMSTUDIO_OSS_PROVIDER_ID} not found

What it means

The LM Studio client could not find the built-in lmstudio provider entry in the model_providers config map. This guard in try_from_provider fires when config.model_providers lacks the LMSTUDIO_OSS_PROVIDER_ID key — normally the built-in provider is always present, so its absence means the config was constructed or pruned in a way that removed the required built-in entry.

Solutions

  1. Avoid overriding model_providers in config.toml in a way that drops built-in providers
  2. Reset the model_providers configuration to defaults
  3. Ensure the config passed in comes from standard Config loading rather than a hand-built map
  4. Report as a bug if this occurs with an unmodified config
Defensive patterns

Strategy: fallback

When it happens

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

Common situations: See trigger scenarios.

Understand the failure class

Background: "Not Found" / HTTP 404 Errors: What They Mean and How to Fix Them Across Libraries — this error's family across 6 libraries.


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

Appendix: source

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

use std::path::Path;
use std::time::Duration;

#[derive(Clone)]
pub struct LMStudioClient {
    client: RouteAwareClientPool,
    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 {

View on GitHub (pinned to 339751715c)