Current OpenAI language, embedding, moderation, and audio models.
[!IMPORTANT]
Version 1.0 is a major rewrite of the plugin runtime, model catalog, and test suite.
It replaces the underlying request and streaming logic, removes deprecated model configurations, and adds focused coverage for reasoning, tool calls, multimodal inputs, and interleaved streams.
This plugin connects Dify to OpenAI language, embedding, moderation, speech-to-text, and text-to-speech models.
Install the plugin and open the OpenAI provider in Dify's Model Provider settings.
Add an OpenAI API key and, when needed, an Organization ID or custom API base URL.
The API base may be entered with or without the trailing .
Responses is the recommended protocol and the default for official models that support it.
Choose Chat Completions only for a compatible endpoint or a model whose documented API surface requires it.

The plugin sends by default and requests encrypted reasoning content when it uses the Responses API.
Complete response output items are stored in the assistant message's opaque payload and replayed in original order on the next turn.
Reasoning summaries are user-visible only when is enabled for a supported model.
OpenAI may require organization verification before returning reasoning summaries.
Install the locked environment and run the checks from this directory.
The tests in send billable requests to the real OpenAI API whenever a nonempty is available.
They skip dynamically only when the key is missing, empty, or whitespace-only in both and the process environment.
Create a local in this plugin directory for test credentials.
The test harness reads only those OpenAI variables from , and explicit process environment variables take precedence.
The repository ignores ; never commit it or include its values in test output.
Run the complete matrix.
The complete matrix sends one logical request for every configured model plus focused boundary requests, and the tool replay scenario sends a second request.
The OpenAI SDK may retry transient failures, so actual HTTP attempts can exceed the logical request count.
It should be run serially because parallel execution increases both spend and rate-limit pressure.
Use standard pytest node IDs or expressions to focus the matrix while developing.
The following smoke command sends one short request.
The presentation matrix gives every LLM in one minimal request, using streaming whenever the model contract supports it.
Embedding, moderation, speech-to-text, and text-to-speech tests are derived from every YAML configuration in their respective model directories.
Representative models separately cover Responses and Chat Completions, streaming and non-streaming, structured output, reasoning summaries, streamed function calls, encrypted reasoning replay, stop and incomplete states, and image, document, and audio inputs.
Exact event interleavings, fragmented tool arguments, empty reasoning blocks, failures, cancellation, and malformed responses remain in deterministic unit tests because a live service cannot reliably reproduce those event orders.
Cases blocked only by OpenAI organization verification are reported as skips; all other API errors fail the run.
Reasoning summary coverage may also be skipped when OpenAI accepts the request but withholds the summary from an unverified organization.