feat: OpenAI spec updates for GPT-5.x and o-series models #35
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
This PR updates the server-sdk-typescript SDK to align with the latest OpenAI API specification, addressing gaps identified in the API audit (VAP-11729).
Changes Made
Added
developerrole to OpenAiMessageRole enum (HIGH priority): Required for GPT-5.x and o-series models. The developer role provides system-level instructions that take precedence over user messages.Added deprecation notice for
functionrole (LOW priority): Thefunctionrole is deprecated in favor oftool. Added JSDoc deprecation annotations to guide users toward the recommended approach.Added optional API parameters to OpenAiModel (MEDIUM priority):
seed- For deterministic samplingtopP- Nucleus sampling parameter (alternative to temperature)frequencyPenalty- Penalize repeated tokens (-2.0 to 2.0)presencePenalty- Encourage new topics (-2.0 to 2.0)logprobs- Return log probabilities of output tokenstopLogprobs- Number of top log probabilities to return (0-20)parallelToolCalls- Enable parallel function callingreasoningEffort- Control reasoning depth for o1/o3 reasoning models (low/medium/high)Added OpenAiModelReasoningEffort type: New enum type with
low,medium, andhighoptions for controlling reasoning effort.Test Plan
Backward Compatibility
All changes are fully backward compatible:
Files Changed
src/api/types/OpenAiMessageRole.ts- Added developer role and deprecation noticesrc/api/types/OpenAiModel.ts- Added new optional parameterssrc/api/types/OpenAiModelReasoningEffort.ts- New type filesrc/api/types/index.ts- Export new typetests/unit/types/- New comprehensive test files.fernignore- Preserve test files from Fern regenerationRelated Issues
VAP-11729
Generated with Claude Code