Skip to content

[Bug]: Assistant related resources such as Threads are missing the now manually added OpenAI-Beta: assistants=v2 header #700

@jon-sm

Description

@jon-sm

Description

Introduced in v0.17.0 #688

Error:

You must provide the 'OpenAI-Beta' header to access the Assistants API. Please try again by setting the header 'OpenAI-Beta: assistants=v2'.

The OpenAI-Beta: assistants=v2 was added to the assistant resource but its needed also on other assistant-related resources such as:

  • Threads
  • Messages
  • Runs

Steps To Reproduce

OpenAI::threads()->createAndRunStreamed([
    'assistant_id' => 'assistant_id',
    'model' => 'model_id',
    'thread' => [
        'messages' => [
            [
                'role' => 'user',
                'content' => 'test',
            ],
        ],
    ],
])

OpenAI PHP Client Version

v0.17.0

PHP Version

8.3.22

Notes

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions