Skip to content

fix: correct prompt cache retention literal#3319

Open
nightcityblade wants to merge 1 commit into
openai:mainfrom
nightcityblade:fix/issue-2883
Open

fix: correct prompt cache retention literal#3319
nightcityblade wants to merge 1 commit into
openai:mainfrom
nightcityblade:fix/issue-2883

Conversation

@nightcityblade
Copy link
Copy Markdown

  • I understand that this repository is auto-generated and my pull request may not be merged

Changes being requested

Fixes #2883.

Updates the prompt_cache_retention literal value from "in-memory" to "in_memory" for chat completions and responses, matching the API value. Tests generated request examples are updated accordingly.

Additional context & links

Validation run:

  • uv run --python 3.9 ruff check src/openai/types/chat/completion_create_params.py src/openai/types/responses/response.py src/openai/types/responses/response_create_params.py src/openai/resources/chat/completions/completions.py src/openai/resources/responses/responses.py tests/api_resources/test_responses.py tests/api_resources/chat/test_completions.py — passed
  • uv run --python 3.9 pyright src/openai/types/chat/completion_create_params.py src/openai/types/responses/response.py src/openai/types/responses/response_create_params.py src/openai/resources/chat/completions/completions.py src/openai/resources/responses/responses.py — passed
  • uv run --python 3.9 python -c 'import openai; print(openai.__version__)' — passed
  • uv run --python 3.9 pytest tests/api_resources/test_responses.py tests/api_resources/chat/test_completions.py — attempted, but the generated API resource tests require a Prism mock server at 127.0.0.1:4010; without it they fail with connection refused.

@nightcityblade nightcityblade requested a review from a team as a code owner May 27, 2026 03:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

prompt_cache_retention type declares "in-memory" but API expects "in_memory"

1 participant