Skip to content

ResponseInputMessageItem has a mandatory id property #1530

Open
@matthewgertner

Description

@matthewgertner

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

I'm getting linter errors when using openai.responses.create() because ResponseInputMessageItem wants an id property. This property is not mentioned anywhere in the documentation, however. I guess it can be safely omitted but the type definitions should probably be updated accordingly.

To Reproduce

 const input = [
    {
      role: 'user',
      content: [
        { type: 'input_text', text: prompt },
        ...referenceImages.map((buffer) => ({
          type: 'input_image',
          detail: 'auto',
          image_url: `data:image/png;base64,${buffer.toString('base64')}`,
        })),
      ],
    },
  ];

  return openai.responses.create({
    model: 'gpt-4-vision-preview',
    input,
    stream: true,
  });

Code snippets

OS

macOS

Node version

v23.9.0

Library version

5.1.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingopenapi

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions