Skip to content

Conversation

@vapi-tasker
Copy link

@vapi-tasker vapi-tasker bot commented Jan 31, 2026

Summary

This PR aligns the client-sdk-web with the latest OpenAI API specification updates identified in the audit (VAP-11729).

Changes Made

  • Added developer role (HIGH): Added the developer role to OpenAIMessage interface, required for GPT-5.x and o-series models
  • Added GPT-5.2 models (MEDIUM): Added gpt-5.2 and gpt-5.2-chat-latest to all OpenAI model definitions:
    • OpenAIModel.model
    • OpenAIModel.fallbackModels
    • WorkflowOpenAIModel.model
    • EvalOpenAIModel.model
    • Azure OpenAI credential model lists
  • Added missing API parameters (MEDIUM): Added optional parameters to OpenAIModel:
    • seed - For deterministic sampling
    • topP - Nucleus sampling parameter
    • frequencyPenalty - Penalize tokens based on frequency
    • presencePenalty - Penalize tokens based on presence
    • logprobs - Return log probabilities
    • topLogprobs - Number of top log probs to return
    • parallelToolCalls - Enable parallel function calling
    • reasoningEffort - Control reasoning effort for o-series models (low/medium/high)
  • Added deprecation notice (LOW): Added JSDoc deprecation notice for function role, recommending tool role instead

Backward Compatibility

All changes are backward compatible:

  • New roles are additive to the existing union type
  • New parameters are optional
  • Existing code using current models and roles will continue to work

Test Coverage

Added comprehensive test suite (__tests__/openai-spec.test.ts) covering:

  • All message role types including the new developer role
  • GPT-5.2 model support across all interfaces
  • All new optional API parameters
  • Backward compatibility with existing parameters
  • Model fallback configurations

Test Results

PASS __tests__/openai-spec.test.ts
PASS __tests__/vapi.test.ts

Test Suites: 2 passed, 2 total
Tests:       33 passed, 33 total

Linear Issue

Closes VAP-11729


Generated with Claude Code

- Add 'developer' role to OpenAIMessage for GPT-5.x and o-series models
- Add GPT-5.2 and GPT-5.2-chat-latest models to all OpenAI model lists
- Add new optional API parameters: seed, topP, frequencyPenalty,
  presencePenalty, logprobs, topLogprobs, parallelToolCalls, reasoningEffort
- Add JSDoc deprecation notice for 'function' role (use 'tool' instead)
- Add comprehensive tests for all new features

Co-Authored-By: Claude <noreply@anthropic.com>
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.

1 participant