Skip to content

chore(desp)!: update openai sdk to v6 and deprecate v4 - #120

Merged
ryoppippi merged 2 commits into
mainfrom
ENG-11183-support-the-latest-openai-sdk-in-ai-node-sdk
Oct 9, 2025
Merged

chore(desp)!: update openai sdk to v6 and deprecate v4#120
ryoppippi merged 2 commits into
mainfrom
ENG-11183-support-the-latest-openai-sdk-in-ai-node-sdk

Conversation

@ryoppippi

@ryoppippiryoppippi commented Oct 9, 2025

Copy link
Copy Markdown
Contributor

Summary

  • Update OpenAI SDK to v6 and deprecate v4
  • Fix typecheck errors by supporting both AI SDK v4 and v5

Changes

  • Dependencies: OpenAI SDK updated from ^5.7.0 to ^6.2.0
  • peerDependencies: OpenAI updated from 4.x|5.x to 5.x|6.x
  • AI SDK compatibility: Support both v4 (parameters) and v5 (inputSchema) formats
  • Remove ToolSet type import to avoid version-specific type conflicts
  • Update tests to use v5 API while maintaining v4 compatibility

Migration guide for consumers

  • Upgrade any usage of openai 4.x to 5.x or 6.x
  • If you install zod, ensure ^3.25 or ^4 to satisfy OpenAI v6 peers

Test plan

  • All unit tests pass
  • Typecheck passes
  • Compatible with AI SDK 4.x and 5.x as per peerDependencies
  • Compatible with OpenAI SDK 5.x and 6.x

🤖 Generated with Claude Code

Co-Authored-By: Claude noreply@anthropic.com

@pkg-pr-new

pkg-pr-newBot commented Oct 9, 2025

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/StackOneHQ/stackone-ai-node/@stackone/ai@120

commit: 9db386b

@ryoppippiryoppippi changed the title chore!(desp): update openai sdk to v6 and deprecate v4chore(desp): update openai sdk to v6 and deprecate v4Oct 9, 2025
@ryoppippiryoppippi changed the title chore(desp): update openai sdk to v6 and deprecate v4chore(desp)!: update openai sdk to v6 and deprecate v4Oct 9, 2025
@ryoppippi
ryoppippi marked this pull request as ready for review October 9, 2025 13:13
@ryoppippi
ryoppippi requested a review from a team as a code ownerOctober 9, 2025 13:13
CopilotAI review requested due to automatic review settings October 9, 2025 13:13
@ryoppippi
ryoppippi enabled auto-merge (squash) October 9, 2025 13:13

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR upgrades the OpenAI SDK dependency from version 5.7.0 to 6.2.0 and updates peer dependencies to deprecate OpenAI v4 support. This aligns with ENG-11183 requirements and ensures consumers use OpenAI 5.x or 6.x versions.

Key Changes

  • Updated OpenAI SDK from ^5.7.0 to ^6.2.0 in devDependencies
  • Modified peer dependencies to require OpenAI 5.x|6.x instead of 4.x|5.x

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@cubic-dev-aicubic-dev-aiBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

auto-merge was automatically disabled October 9, 2025 15:31

Pull Request is not mergeable

@ryoppippi
ryoppippiforce-pushed the ENG-11183-support-the-latest-openai-sdk-in-ai-node-sdk branch from 59448d2 to 9dd442aCompareOctober 9, 2025 17:47
…eters
- Change toAISDK to provide both inputSchema (v5) and parameters (v4)
- Remove ToolSet type import to avoid version-specific type conflicts
- Update tests to check inputSchema.jsonSchema instead of parameters.jsonSchema
- Maintain backward compatibility with AI SDK v4 while supporting v5
This fixes typecheck errors while maintaining compatibility with both
AI SDK 4.x and 5.x as specified in peerDependencies.
@ryoppippi
ryoppippi merged commit 417ffc5 into mainOct 9, 2025
7 checks passed
@ryoppippi
ryoppippi deleted the ENG-11183-support-the-latest-openai-sdk-in-ai-node-sdk branch October 9, 2025 17:57
@github-actionsgithub-actionsBot mentioned this pull request Oct 9, 2025
Sign up for freeto 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.

3 participants

@ryoppippi@NicolasBelissent