Skip to content

apiKey became mandatory in v6.36.0 #1957

Description

@Menduist

Confirm this is a Node library issue and not an underlying OpenAI API issue

  • This is an issue with the Node library

Describe the bug

Since this commit:
359afb9

An empty apiKey ("") doesn't work anymore:


     42|     const client = new OpenAI({
       |                    ^
Error: Error: Missing credentials. Please pass an `apiKey`, `workloadIdentity`, `adminAPIKey`, or set the `OPENAI_API_KEY` or `OPENAI_ADMIN_KEY` environment variable.
     43|         apiKey: "",

To Reproduce

Create an OpenAI client with an empty apiKey

Code snippets

OS

any

Node version

any

Library version

=6.36

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingupstreamNeeds to be addressed in Stainless upstream

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions