fix(types): correct prompt_cache_retention value from in-memory to in_memory#1783
Open
s-zx wants to merge 1 commit intoopenai:masterfrom
Open
fix(types): correct prompt_cache_retention value from in-memory to in_memory#1783s-zx wants to merge 1 commit intoopenai:masterfrom
in-memory to in_memory#1783s-zx wants to merge 1 commit intoopenai:masterfrom
Conversation
…_memory The OpenAI API documentation specifies `in_memory` (underscore) as the valid value for `prompt_cache_retention`, but the SDK was using `in-memory` (hyphen). This commit updates all four type definitions in responses.ts and completions.ts to use the correct `in_memory` value, matching the official API docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #1756
The OpenAI API documentation specifies
in_memory(underscore) as the valid value forprompt_cache_retention, but the SDK type definitions were usingin-memory(hyphen), causing a type mismatch for developers following the official docs.Changes
Updated the
prompt_cache_retentiontype union in all four locations across two files:src/resources/responses/responses.ts(3 occurrences)src/resources/chat/completions/completions.ts(1 occurrence)Before:
After:
This aligns the SDK types with the official API documentation which documents
in_memoryas the correct value.