feat: OpenAI spec updates for GPT-5.x and o-series models#35
Open
vapi-tasker[bot] wants to merge 1 commit intomainfrom
Open
feat: OpenAI spec updates for GPT-5.x and o-series models#35vapi-tasker[bot] wants to merge 1 commit intomainfrom
vapi-tasker[bot] wants to merge 1 commit intomainfrom
Conversation
VAP-11729 - Add 'developer' role to OpenAiMessageRole enum for GPT-5.x and o-series models - Add deprecation notice for 'function' role in favor of 'tool' - Add new optional API parameters to OpenAiModel interface: - seed: for deterministic sampling - topP: nucleus sampling parameter - frequencyPenalty: penalize repeated tokens - presencePenalty: encourage new topics - logprobs: return token log probabilities - topLogprobs: number of top log probabilities to return - parallelToolCalls: enable parallel function calling - reasoningEffort: control reasoning depth for o1/o3 models - Add OpenAiModelReasoningEffort type with low/medium/high options - Add comprehensive unit tests for all changes All changes are backward compatible and follow existing code patterns. Co-Authored-By: Claude <noreply@anthropic.com>
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
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