Skip to content

type 'reasoning' was provided without its required following item #8031

Description

@danthegoodman1

Description

Related to #7099 but now with gpt-5

The provided context was:

{
    "role": "assistant",
    "content": [
      {
        "type": "reasoning",
        "text": "",
        "providerOptions": {
          "openai": {
            "itemId": "rs_689cfc25afbc8194836745e69eff008a04baf2d6100d1d70",
            "reasoningEncryptedContent": null
          }
        }
      },
...

I can't recreate this consistently, it seems it depends when openai wants to provide that reasoning context back, and it seems the package is failing to serialize it

Additionally, I do not have it set to include the encrypted reasoning content:

openai: {
          reasoningEffort: "minimal",
        } satisfies OpenAIResponsesProviderOptions,

AI SDK Version

"@ai-sdk/openai": "^2.0.5",
"ai": "^5.0.9",

Metadata

Metadata

Assignees

No one assigned

    Labels

    ai/providerrelated to a provider package. Must be assigned together with at least one `provider/*` labelprovider/openaiIssues related to the @ai-sdk/openai providersupporttask-identify-issue-type-done

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions