-
Notifications
You must be signed in to change notification settings - Fork 40
Open
Labels
[Feature]New feature to highlight in changelogs.New feature to highlight in changelogs.
Description
OpenAI has introduced the Responses API (POST /v1/responses) as the new, unified endpoint that consolidates functionality from both Chat Completions and Assistants/Threads APIs.
Advantages of using the Responses API
- Unified design: One endpoint for chat, tools, and multimodal interactions.
- Built-in memory: Supports
store:trueandconversation.id, which means conversations can persist without resending the full message history. This can significantly reduce token usage and costs for long-running chats. - Native tool handling: Cleaner definition of tools and structured
tool_calloutputs, easier to validate and safer than current function-calling prompts. - Multimodal ready: Accepts text, images, and audio in the same request.
- Consistent output: Always returns a
responseobject withoutput[],usage,status, etc., which simplifies logging and debugging. - Future direction: OpenAI is evolving the Responses API, while Chat Completions is effectively a legacy path for new projects.
Disadvantages / Migration Considerations
- Newer API: Responses API is less mature; not all SDKs or plugins in the ecosystem support it fully yet.
- Learning curve: Output parsing is slightly more complex (
output[]vs.choices[0].message.content). - Migration cost: Projects already using Chat Completions will need refactoring to adapt request/response handling.
- Community ecosystem: Most tutorials and sample code still target Chat Completions.
Proposal
Evaluate adding support for the Responses API in this client library, either:
- As a replacement for Chat Completions, or
- As an additional option, allowing developers to choose between
chat.completionsandresponses.
This would ensure the library stays aligned with OpenAI’s current API direction and provides WordPress developers with a future-proof integration option.
benoit-mercusot
Metadata
Metadata
Assignees
Labels
[Feature]New feature to highlight in changelogs.New feature to highlight in changelogs.