Skip to content

Python SDK ServiceTier enum missing "priority" — deserialization fails with Codex CLI 0.129.0 #21871

@jackyfkc

Description

@jackyfkc

SDK version: openai-codex-app-server-sdk 0.116.0a1 (installed from source)
Codex CLI version: 0.129.0-alpha.15 (npm)
Python: 3.12 OS: macOS

Bug description

When using the Python SDK to call thread/start against Codex CLI 0.129.0, the ThreadStartResponse deserialization fails because the app-server returns serviceTier: "priority", but the SDK's ServiceTier enum (generated/v2_all.py) only defines fast and flex:

    thread = codex.thread_start(
             ^^^^^^^^^^^^^^^^^^^
  File "~/Library/Python/3.12/lib/python/site-packages/codex_app_server/api.py", line 174, in thread_start
    started = self._client.thread_start(params)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "~/Library/Python/3.12/lib/python/site-packages/codex_app_server/client.py", line 306, in thread_start
    return self.request("thread/start", _params_dict(params), response_model=ThreadStartResponse)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "~/Library/Python/3.12/lib/python/site-packages/codex_app_server/client.py", line 239, in request
    return response_model.model_validate(result)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/pydantic/main.py", line 716, in model_validate
    return cls.__pydantic_validator__.validate_python(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pydantic_core._pydantic_core.ValidationError: 1 validation error for ThreadStartResponse
serviceTier
  Input should be 'fast' or 'flex' [type=enum, input_value='priority', input_type=str]
    For further information visit https://errors.pydantic.dev/2.12/v/enum
class ServiceTier(Enum):
    fast = "fast"
    flex = "flex"

Steps to reproduce

  1. Install the Python SDK from the repo: pip install git+https://github.com/openai/codex.git#subdirectory=sdk/python

  2. Have Codex CLI >= 0.129.0 installed (e.g. via Codex.app)

  3. Run:

from codex_app_server import Codex, AppServerConfig
import shutil
with Codex(config=AppServerConfig(codex_bin=shutil.which("codex"))) as codex:
    thread = codex.thread_start(model="gpt-5.4")

Metadata

Metadata

Assignees

No one assigned

    Labels

    CLIIssues related to the Codex CLIapp-serverIssues involving app server protocol or interfacesbugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions