Skip to content

[Snyk] Upgrade openai from 3.3.0 to 5.7.0 #163

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nerdy-tech-com-gitub
Copy link
Owner

@nerdy-tech-com-gitub nerdy-tech-com-gitub commented Jul 15, 2025

snyk-top-banner

Snyk has created this PR to upgrade openai from 3.3.0 to 5.7.0.

ℹ️ Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.


⚠️ Warning: This PR contains major version upgrade(s), and may be a breaking change.

  • The recommended version is 258 versions ahead of your current version.

  • The recommended version was released 21 days ago.

Issues fixed by the recommended upgrade:

Issue Score Exploit Maturity
high severity Cross-site Request Forgery (CSRF)
SNYK-JS-AXIOS-6032459
155 Proof of Concept
medium severity Regular Expression Denial of Service (ReDoS)
SNYK-JS-AXIOS-6124857
155 Proof of Concept
medium severity Server-side Request Forgery (SSRF)
SNYK-JS-AXIOS-9292519
155 Proof of Concept
medium severity Server-side Request Forgery (SSRF)
SNYK-JS-AXIOS-9403194
155 No Known Exploit
Release notes
Package name: openai
  • 5.7.0 - 2025-06-23

    5.7.0 (2025-06-23)

    Full Changelog: v5.6.0...v5.7.0

    Features

    • api: update api shapes for usage and code interpreter (f2100e8)
  • 5.6.0 - 2025-06-20

    5.6.0 (2025-06-20)

    Full Changelog: v5.5.1...v5.6.0

    Features

    • api: make model and inputs not required to create response (52211c0)

    Bug Fixes

    • client: explicitly copy fetch in withOptions (0efacae)

    Chores

    • readme: update badges (6898954)
    • readme: use better example snippet for undocumented params (668611f)
  • 5.5.1 - 2025-06-17

    5.5.1 (2025-06-17)

    Full Changelog: v5.5.0...v5.5.1

    Chores

    • ci: enable for pull requests (e1cf00c)
  • 5.5.0 - 2025-06-16

    5.5.0 (2025-06-16)

    Full Changelog: v5.4.0...v5.5.0

    Features

  • 5.4.0 - 2025-06-16

    5.4.0 (2025-06-16)

    Full Changelog: v5.3.0...v5.4.0

    Features

    • api: add reusable prompt IDs (c720bb3)
    • client: add support for endpoint-specific base URLs (05f558b)

    Bug Fixes

    • publish script — handle NPM errors correctly (a803cce)

    Chores

    • client: refactor imports (9eb4470)
    • internal: add pure annotations, make base APIResource abstract (418eb02)
  • 5.3.0 - 2025-06-10

    5.3.0 (2025-06-10)

    Full Changelog: v5.2.0...v5.3.0

    Features

    • api: Add o3-pro model IDs (9988f8e)
  • 5.2.0 - 2025-06-09

    5.2.0 (2025-06-09)

    Full Changelog: v5.1.1...v5.2.0

    Features

    • api: Add tools and structured outputs to evals (64844f1)

    Bug Fixes

    • changelog: remove duplicated entries (18484cc)

    Chores

    • avoid type error in certain environments (44ac3d9)

    Documentation

  • 5.1.1 - 2025-06-05

    5.1.1 (2025-06-05)

    Full Changelog: v5.1.0...v5.1.1

    Bug Fixes

    • assistants: handle thread.run.incomplete while streaming (8f5e7f3)

    Chores

    • docs: use top-level-await in example snippets (065d3b0)
    • internal: fix readablestream types in node 20 (771ae81)
  • 5.1.0 - 2025-06-03

    5.1.0 (2025-06-03)

    Full Changelog: v5.0.2...v5.1.0

    Features

    • api: add new realtime and audio models, realtime session options (1219f09)

    Chores

    • adjust eslint.config.mjs ignore pattern (9b5c898)
    • api: update type names (7c296d6)
  • 5.0.2 - 2025-06-02

    5.0.2 (2025-06-02)

    Full Changelog: v5.0.1...v5.0.2

    Bug Fixes

    • api: Fix evals and code interpreter interfaces (992a9d8)

    Chores

    • deps: bump eslint-plugin-prettier (1428a8b)
    • internal: codegen related update (a65428f)
  • 5.0.1 - 2025-05-29
  • 5.0.0 - 2025-05-29
  • 5.0.0-beta.0 - 2025-03-05
  • 5.0.0-alpha.0 - 2024-12-20
  • 4.104.0 - 2025-05-29
  • 4.103.0 - 2025-05-22
  • 4.102.0 - 2025-05-21
  • 4.101.0 - 2025-05-21
  • 4.100.0 - 2025-05-16
  • 4.99.0 - 2025-05-16
  • 4.98.0 - 2025-05-08
  • 4.97.0 - 2025-05-02
  • 4.96.2 - 2025-04-29
  • 4.96.1 - 2025-04-29
  • 4.96.0 - 2025-04-23
  • 4.95.1 - 2025-04-18
  • 4.95.0 - 2025-04-16
  • 4.94.0 - 2025-04-14
  • 4.93.0 - 2025-04-08
  • 4.92.1 - 2025-04-07
  • 4.92.0 - 2025-04-07
  • 4.91.1 - 2025-04-01
  • 4.91.0 - 2025-03-31
  • 4.90.0 - 2025-03-27
  • 4.89.1 - 2025-03-26
  • 4.89.0 - 2025-03-20
  • 4.88.0 - 2025-03-19
  • 4.87.4 - 2025-03-18
  • 4.87.3 - 2025-03-11
  • 4.87.2 - 2025-03-11
  • 4.87.1 - 2025-03-11
  • 4.87.0 - 2025-03-11
  • 4.86.2 - 2025-03-05
  • 4.86.1 - 2025-02-27
  • 4.86.0 - 2025-02-27
  • 4.85.4 - 2025-02-22
  • 4.85.3 - 2025-02-20
  • 4.85.2 - 2025-02-18
  • 4.85.1 - 2025-02-14
  • 4.85.0 - 2025-02-13
  • 4.84.1 - 2025-02-13
  • 4.84.0 - 2025-02-12
  • 4.83.0 - 2025-02-05
  • 4.82.0 - 2025-01-31
  • 4.81.0 - 2025-01-29
  • 4.80.1 - 2025-01-24
  • 4.80.0 - 2025-01-22
  • 4.79.4 - 2025-01-21
  • 4.79.3 - 2025-01-21
  • 4.79.2 - 2025-01-21
  • 4.79.1 - 2025-01-17
  • 4.79.0 - 2025-01-17
  • 4.78.1 - 2025-01-10
  • 4.78.0 - 2025-01-09
  • 4.77.4 - 2025-01-08
  • 4.77.3 - 2025-01-03
  • 4.77.0 - 2024-12-17
  • 4.76.3 - 2024-12-13
  • 4.76.2 - 2024-12-12
  • 4.76.1 - 2024-12-10
  • 4.76.0 - 2024-12-05
  • 4.75.0 - 2024-12-03
  • 4.74.0 - 2024-12-02
  • 4.73.1 - 2024-11-25
  • 4.73.0 - 2024-11-20
  • 4.72.0 - 2024-11-12
  • 4.71.1 - 2024-11-06
  • 4.71.0 - 2024-11-04
  • 4.70.3 - 2024-11-04
  • 4.70.2 - 2024-11-01
  • 4.70.1 - 2024-11-01
  • 4.70.0 - 2024-11-01
  • 4.69.0 - 2024-10-30
  • 4.68.4 - 2024-10-23
  • 4.68.3 - 2024-10-23
  • 4.68.2 - 2024-10-22
  • 4.68.1 - 2024-10-18
  • 4.68.0 - 2024-10-17
  • 4.67.3 - 2024-10-08
  • 4.67.2 - 2024-10-07
  • 4.67.1 - 2024-10-02
  • 4.67.0 - 2024-10-01
  • 4.66.1 - 2024-09-30
  • 4.65.0 - 2024-09-26
  • 4.64.0 - 2024-09-25
  • 4.63.0 - 2024-09-20
  • 4.62.1 - 2024-09-18
  • 4.62.0 - 2024-09-17
  • 4.61.1 - 2024-09-16
  • 4.61.0 - 2024-09-13
  • 4.60.1 - 2024-09-13
  • 4.60.0 - 2024-09-12
  • 4.59.0 - 2024-09-11
  • 4.58.2 - 2024-09-09
  • 4.58.1 - 2024-09-06
  • 4.58.0 - 2024-09-05
  • 4.57.3 - 2024-09-04
  • 4.57.2 - 2024-09-04
  • 4.57.1 - 2024-09-03
  • 4.57.0 - 2024-08-29
  • 4.56.2 - 2024-08-29
  • 4.56.1 - 2024-08-27
  • 4.56.0 - 2024-08-16
  • 4.55.9 - 2024-08-16
  • 4.55.8 - 2024-08-15
  • 4.55.7 - 2024-08-13
  • 4.55.6 - 2024-08-13
  • 4.55.5 - 2024-08-12
  • 4.55.4 - 2024-08-09
  • 4.55.3 - 2024-08-08
  • 4.55.2 - 2024-08-08
  • 4.55.1 - 2024-08-07
  • 4.55.0 - 2024-08-06
  • 4.54.0 - 2024-08-02
  • 4.53.2 - 2024-07-26
  • 4.53.1 - 2024-07-25
  • 4.53.0 - 2024-07-22
  • 4.52.7 - 2024-07-11
  • 4.52.6 - 2024-07-11
  • 4.52.5 - 2024-07-10
  • 4.52.4 - 2024-07-08
  • 4.52.3 - 2024-07-02
  • 4.52.2 - 2024-06-29
  • 4.52.1 - 2024-06-26
  • 4.52.0 - 2024-06-19
  • 4.51.0 - 2024-06-12
  • 4.50.0 - 2024-06-10
  • 4.49.1 - 2024-06-07
  • 4.49.0 - 2024-06-06
  • 4.48.3 - 2024-06-06
  • 4.48.2 - 2024-06-05
  • 4.48.1 - 2024-06-04
  • 4.47.3 - 2024-05-31
  • 4.47.2 - 2024-05-28
  • 4.47.1 - 2024-05-14
  • 4.47.0 - 2024-05-14
  • 4.46.1 - 2024-05-13
  • 4.46.0 - 2024-05-13
  • 4.45.0 - 2024-05-11
  • 4.44.0 - 2024-05-09
  • 4.43.0 - 2024-05-08
  • 4.42.0 - 2024-05-06
  • 4.41.1 - 2024-05-06
  • 4.41.0 - 2024-05-05
  • 4.40.2 - 2024-05-03
  • 4.40.1 - 2024-05-02
  • 4.40.0 - 2024-05-01
  • 4.39.1 - 2024-04-30
  • 4.39.0 - 2024-04-29
  • 4.38.5 - 2024-04-25
  • 4.38.4 - 2024-04-24
  • 4.38.3 - 2024-04-22
  • 4.38.2 - 2024-04-19
  • 4.38.1 - 2024-04-18
  • 4.38.0 - 2024-04-18
  • 4.37.1 - 2024-04-17
  • 4.37.0 - 2024-04-17
  • 4.36.0 - 2024-04-16
  • 4.35.0 - 2024-04-16
  • 4.34.0 - 2024-04-15
  • 4.33.1 - 2024-04-13
  • 4.33.0 - 2024-04-05
  • 4.32.2 - 2024-04-04
  • 4.32.1 - 2024-04-02
  • 4.32.0 - 2024-04-01
  • 4.31.0 - 2024-03-30
  • 4.30.0 - 2024-03-28
  • 4.29.2 - 2024-03-19
  • 4.29.1 - 2024-03-15
  • 4.29.0 - 2024-03-13
  • 4.28.5 - 2024-03-13
  • 4.28.4 - 2024-02-28
  • 4.28.0 - 2024-02-13
  • 4.27.1 - 2024-02-12
  • 4.27.0 - 2024-02-09
  • 4.26.1 - 2024-02-05
  • 4.26.0 - 2024-01-25
  • 4.25.0 - 2024-01-21
  • 4.24.7 - 2024-01-13
  • 4.24.6 - 2024-01-12
  • 4.24.5 - 2024-01-12
  • 4.24.4 - 2024-01-12
  • 4.24.3 - 2024-01-10
  • 4.24.2 - 2024-01-09
  • 4.24.1 - 2023-12-22
  • 4.24.0 - 2023-12-19
  • 4.23.0 - 2023-12-17
  • 4.22.1 - 2023-12-16
  • 4.22.0 - 2023-12-15
  • 4.21.0 - 2023-12-13
  • 4.20.1 - 2023-11-27
  • 4.20.0 - 2023-11-22
  • 4.19.1 - 2023-11-20
  • 4.19.0 - 2023-11-15
  • 4.18.0 - 2023-11-14
  • 4.17.5 - 2023-11-13
  • 4.17.4 - 2023-11-10
  • 4.17.3 - 2023-11-10
  • 4.17.2 - 2023-11-09
  • 4.17.1 - 2023-11-09
  • 4.17.0 - 2023-11-09
  • 4.16.2 - 2023-11-08
  • 4.16.1 - 2023-11-06
  • 4.16.0 - 2023-11-06
  • 4.15.4 - 2023-11-05
  • 4.15.3 - 2023-11-05
  • 4.15.2 - 2023-11-04
  • 4.15.1 - 2023-11-04
  • 4.15.0 - 2023-11-03
  • 4.14.2 - 2023-10-30
  • 4.14.1 - 2023-10-27
  • 4.14.0 - 2023-10-25
  • 4.13.0 - 2023-10-23
  • 4.12.4 - 2023-10-17
  • 4.12.3 - 2023-10-16
  • 4.12.2 - 2023-10-16
  • 4.12.1 - 2023-10-11
  • 4.12.0 - 2023-10-11
  • 4.11.1 - 2023-10-03
  • 4.11.0 - 2023-09-29
  • 4.10.0 - 2023-09-21
  • 4.9.1 - 2023-09-21
  • 4.9.0 - 2023-09-21
  • 4.8.0 - 2023-09-18
  • 4.7.1 - 2023-09-15
  • 4.7.0 - 2023-09-14
  • 4.6.0 - 2023-09-08
  • 4.5.0 - 2023-09-06
  • 4.4.0 - 2023-09-01
  • 4.3.1 - 2023-08-29
  • 4.3.0 - 2023-08-27
  • 4.2.0 - 2023-08-23
  • 4.1.0 - 2023-08-22
  • 4.0.1 - 2023-08-19
  • 4.0.0 - 2023-08-16
  • 4.0.0-beta.12 - 2023-08-15
  • 4.0.0-beta.11 - 2023-08-13
  • 4.0.0-beta.10 - 2023-08-12
  • 4.0.0-beta.9 - 2023-08-11
  • 4.0.0-beta.8 - 2023-08-05
  • 4.0.0-beta.7 - 2023-07-29
  • 4.0.0-beta.6 - 2023-07-20
  • 4.0.0-beta.5 - 2023-07-17
  • 4.0.0-beta.4 - 2023-07-09
  • 4.0.0-beta.3 - 2023-07-08
  • 4.0.0-beta.2 - 2023-07-01
  • 4.0.0-beta.1 - 2023-06-27
  • 4.0.0-beta.0 - 2023-06-17
  • 3.3.0 - 2023-06-13
from openai GitHub release notes

Important

  • Warning: This PR contains a major version upgrade, and may be a breaking change.
  • Check the changes in this PR to ensure they won't cause issues with your project.
  • This PR was automatically created by Snyk using the credentials of a real user.
  • Max score is 1000. Note that the real score may have changed since the PR was raised.

Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.

For more information:

Summary by Sourcery

Upgrade openai dependency from 3.1.0 to 5.7.0 in package.json to resolve security vulnerabilities and incorporate latest API improvements.

Bug Fixes:

  • Resolve CSRF, ReDoS, and SSRF vulnerabilities in axios by bumping openai to 5.7.0.

Enhancements:

  • Adopt openai 5.x API enhancements including updated shapes for usage and code interpreter support.

Snyk has created this PR to upgrade openai from 3.3.0 to 5.7.0.

See this package in npm:
openai

See this project in Snyk:
https://app.snyk.io/org/nerds-github/project/1b9e8975-d6d0-4375-9da3-0aa27511634d?utm_source=github&utm_medium=referral&page=upgrade-pr
Copy link

sourcery-ai bot commented Jul 15, 2025

Reviewer's Guide

Update openai package from v3 to v5 by bumping its version spec in package.json to address multiple high-/medium-severity vulnerabilities.

Class diagram for OpenAI SDK major version upgrade (v3 to v5)

classDiagram
    class OpenAI_v3 {
        +createCompletion()
        +createChatCompletion()
        +createImage()
        +createEmbedding()
        +createFile()
        +createFineTune()
        +listModels()
        +retrieveModel()
        +deleteFile()
        +downloadFile()
        +listFiles()
        +retrieveFile()
        +createModeration()
        +createEdit()
        +createTranscription()
        +createTranslation()
        +createAnswer()
        +createClassification()
    }
    class OpenAI_v5 {
        +chat.completions.create()
        +images.generate()
        +audio.transcriptions.create()
        +audio.translations.create()
        +embeddings.create()
        +files.create()
        +files.list()
        +files.retrieve()
        +files.del()
        +models.list()
        +models.retrieve()
        +fineTuning.jobs.create()
        +fineTuning.jobs.list()
        +fineTuning.jobs.retrieve()
        +moderations.create()
        +assistants.create()
        +assistants.list()
        +assistants.retrieve()
        +threads.create()
        +threads.list()
        +threads.retrieve()
        +threads.messages.create()
        +threads.messages.list()
        +threads.messages.retrieve()
        +threads.runs.create()
        +threads.runs.list()
        +threads.runs.retrieve()
        +threads.runs.steps.list()
        +threads.runs.steps.retrieve()
    }
    OpenAI_v3 <|-- OpenAI_v5 : breaking changes, new structure
Loading

File-Level Changes

Change Details Files
Bump openai dependency version
  • Change version spec from ^3.1.0 to ^5.7.0
clients/js/examples/node/package.json

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

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.

2 participants