Skip to content

Pi engine: support OpenAI Responses API for reasoning with tools #56676

Description

@ilja

Bug

The Pi engine’s generated OpenAI gateway currently hardcodes openai-completions.

OpenAI documents that, starting with GPT-5.4, Chat Completions does not support tool calling when reasoning_effort is anything other than none. Consequently, Pi workflows using tools with non-none reasoning fail before the first agent turn.

The API reports:

Function tools with reasoning_effort are not supported in /v1/chat/completions. To use function tools, use /v1/responses or set reasoning_effort to 'none'.

Reference: https://developers.openai.com/api/docs/guides/responses-vs-chat-completions

Expected behavior

Pi workflows should have a supported way to use openai-responses when tools and reasoning are enabled, either through automatic model-capability selection or explicit workflow configuration.

Acceptance criteria

  • Pi can route OpenAI models through the Responses API.
  • Tools work with non-none reasoning effort.
  • Existing Chat Completions behavior remains available for compatible models.

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions