Codex 0.145.0 --oss with LM Studio fails catalog parsing and never reaches /v1/responses

Open 💬 1 comment Opened Jul 28, 2026 by sathinator-afk

What version of Codex CLI is running?

codex-cli 0.145.0

Local provider

  • LM Studio headless daemon (llmster 0.0.20-1 on Windows)
  • lms CLI commit: 71bd99c
  • Model: openai/gpt-oss-20b
  • OS: Windows 11 build 26200

What issue are you seeing?

The documented LM Studio OSS flow fails before inference.

Command:

codex exec --oss --local-provider lmstudio `
  --model openai/gpt-oss-20b `
  --sandbox read-only `
  --skip-git-repo-check `
  "Reply with exactly: Codex local integration verified"

Codex logs:

ERROR codex_models_manager::manager: failed to refresh available models:
failed to decode models response: missing field `models`;
body: {
  "data": [
    {
      "id": "openai/gpt-oss-20b",
      "object": "model",
      "owned_by": "organization_owner"
    }
  ],
  "object": "list"
}

Codex then warns that model metadata is missing and does not reach inference; the process remains running while the LM Studio model is idle.

Expected behavior

codex --oss should work with LM Studio as documented and send the prompt to LM Studio's OpenAI-compatible POST /v1/responses endpoint.

Verification

The LM Studio service itself is healthy:

  • GET /api/v1/models returns the native catalog shape with a top-level models field.
  • POST /v1/responses against openai/gpt-oss-20b completes successfully.
  • GET /v1/models correctly returns the standard OpenAI-compatible shape with a top-level data field.

This suggests Codex’s LM Studio provider is parsing the OpenAI-compatible /v1/models response as though it were LM Studio's native /api/v1/models catalog.

Suggested fix

For the LM Studio provider, either:

  1. accept the OpenAI-compatible { "data": [...] } model-list shape, or
  2. query /api/v1/models when Codex needs LM Studio-specific metadata.

LM Studio’s current Codex integration documentation states that codex --oss should work with its /v1/responses endpoint.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗