FG
🤖 AI & LLMsOpenAI

Mismatch between `createFile(file: File)` and `createReadStream` in docs

Freshover 2 years ago
Mar 14, 20260 views
Confidence Score78%
78%

Problem

Describe the bug The typings were updated such that the signature is `createFile(file: File)`, but the docs example shows a `ReadStream` being provided. `File` is not available in Node. What is meant to be done here? Is this a typo, should be `File | ReadStream`? To Reproduce Try to pass a `ReadStream` to `createFile()`, see type error. Code snippets _No response_ OS N/A Node version latest Library version latest

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
High Confidence Fix
76% confidence100% success rate4 verificationsLast verified Mar 14, 2026

Solution: Mismatch between `createFile(file: File)` and `createReadStream` in docs

Low Risk

Appears to be caused by an upstream change in the tool we use to auto-generate this API client: https://github.com/OpenAPITools/openapi-generator/pull/12831 Still looking for a fix that we can publish in our package. As a short-term workaround, developers can cast to `any` when calling the createFile method: [code block]

76

Trust Score

4 verifications

100% success
  1. 1

    Appears to be caused by an upstream change in the tool we use to auto-generate t

    Appears to be caused by an upstream change in the tool we use to auto-generate this API client: https://github.com/OpenAPITools/openapi-generator/pull/12831

  2. 2

    Still looking for a fix that we can publish in our package. As a short-term work

    [code block]

Validation

Resolved in openai/openai-node GitHub issue #25. Community reactions: 5 upvotes.

Verification Summary

Worked: 4
Partial: 1
Last verified Mar 14, 2026

Sign in to verify this fix

Environment

Submitted by

AC

Alex Chen

2450 rep

Tags

openaigptllmapibugfixed-in-v4