Skip to content

OpenAI - type 'reasoning' was provided without its required following item #9838

@xaliqm1

Description

@xaliqm1

Before submitting your bug report

Relevant environment info

- OS:
- Continue version:
- IDE version:
- Model:
- config:
  

  
  OR link to agent in Continue hub:

Description

When using GPT-5 (or o-series reasoning models) via the openai provider, the conversation fails with the following error:type 'reasoning' was provided without its required following item.","type":"invalid_request_error","param":"input","code":null}

To reproduce

Configure a model in config.yaml using provider: openai and model: gpt-5 (or o1/o3).

Engage in a multi-turn conversation where the model generates "thinking" or reasoning steps.

On the subsequent prompt, the API returns a 400 error because the history injected by Continue violates the reasoning-item sequence rules.

Log output

Metadata

Metadata

Labels

area:integrationIntegrations (context providers, model providers, etc.)kind:bugIndicates an unexpected problem or unintended behavior

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions