Skip to content

feat(openai)!: rewrite plugin for 1.0#3419

Merged
WH-2099 merged 10 commits into
mainfrom
feat/openai-gpt-5-6-support
Jul 10, 2026
Merged

feat(openai)!: rewrite plugin for 1.0#3419
WH-2099 merged 10 commits into
mainfrom
feat/openai-gpt-5-6-support

Conversation

@WH-2099

@WH-2099 WH-2099 commented Jul 9, 2026

Copy link
Copy Markdown
Member

Summary

Fixes #3418.

  • Rewrite the OpenAI plugin runtime around the official OpenAI Python SDK with small, protocol-focused modules.
  • Make the Responses API the default for supported language models while retaining Chat Completions for audio models and compatible endpoints.
  • Preserve stateless reasoning by storing and replaying complete output items, encrypted reasoning content, and assistant phase metadata in order.
  • Request encrypted reasoning only from GPT-5 and o-series reasoning models, because non-reasoning Responses models reject that include field.
  • Handle reasoning summaries, refusals, parallel function calls, interleaved streaming events, stop sequences, incomplete responses, errors, usage, and stream closure explicitly.
  • Simplify embeddings, moderation, transcription, and speech generation while removing direct NumPy and pydub dependencies.
  • Audit every model configuration against the official model catalog, model pages, and deprecation ledger.
  • Remove the deprecated gpt-4o, gpt-audio-mini, and gpt-4o-mini-tts aliases while retaining their still-current dated snapshots.
  • Prevent all six deprecated GPT-5/o3 dated snapshots announced on 2026-06-11 from returning to the catalog.
  • Align limits, reasoning controls, service tiers, prices, voices, file formats, and model capabilities with current OpenAI documentation.
  • Replace the scattered legacy tests with parameterized pytest suites using pytest-mock.
  • Add a live API matrix derived from every presented LLM and every non-LLM model configuration.
  • Load live-test credentials from an ignored .env, redact them in pytest output, run automatically for a nonempty key, and dynamically skip otherwise.
  • Remove the unrelated remote-debug .env.example and document the billable workflow in the README.
  • Rewrite the README and bump the plugin to 1.0.0.

Breaking changes

  • The plugin now defaults supported LLMs to the Responses API.
  • Deprecated and unavailable model configurations are removed.
  • The deprecated gpt-4o, gpt-audio-mini, and gpt-4o-mini-tts aliases are no longer presented.
  • Empty embedding and TTS inputs now fail with explicit bad-request errors.
  • The legacy Completions path and obsolete duplicate integration-test harness are removed.

Change Type

  • Documentation / non-plugin change
  • Non-LLM plugin only
  • LLM and multimodal model plugin

LLM Plugin Checklist

Areas affected by this change
  • System, developer, user, assistant, and tool message flow
  • Multi-round and parallel tool interaction
  • Image, file, and audio inputs
  • Structured output
  • Reasoning summaries and stateless reasoning replay
  • Token usage and pricing metadata
  • Streaming order, stop handling, terminal states, errors, and cancellation
  • Model catalog and parameter rules

Version

  • manifest.yaml and pyproject.toml are 1.0.0.
  • openai>=2.45.0 and dify_plugin>=0.9.0 are declared and locked.
  • pytest-mock>=3.15.1 is included in the development dependency group.

Testing

  • Python 3.12 full suite with the configured .env: 210 passed, 5 skipped.
  • All 63 live cases run automatically for a nonempty OPENAI_API_KEY and skip when the key is missing, empty, or whitespace-only.
  • The current live suite collects 38 presented LLMs, 12 non-LLM configurations, and 13 representative protocol and capability boundaries.
  • The complete current live matrix was covered serially in cost-controlled batches: 58 passed and 5 skipped.
  • Four presented aliases were skipped because this API organization requires verification for gpt-5, gpt-5-mini, o3, and o3-pro.
  • The reasoning-summary case was skipped because OpenAI accepted the request but withheld the summary from the unverified organization.
  • uv run pytest --strict-markers tests/live -q
  • uv run ruff check .
  • uv run ruff format --check .
  • uv lock --check
  • git diff --check

Official references

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Note

Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported.

@WH-2099 WH-2099 self-assigned this Jul 9, 2026
@WH-2099 WH-2099 requested a review from Copilot July 9, 2026 20:44
@WH-2099 WH-2099 marked this pull request as ready for review July 9, 2026 20:44
@dosubot dosubot Bot added size:XS This PR changes 0-9 lines, ignoring generated files. enhancement New feature or request labels Jul 9, 2026
@WH-2099 WH-2099 requested a review from crazywoola July 9, 2026 20:44
@WH-2099 WH-2099 enabled auto-merge (squash) July 9, 2026 20:45

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds OpenAI GPT-5.6 model-family entries to the OpenAI plugin’s predefined LLM model catalog, so the models appear in Dify’s model list with appropriate limits/capabilities and an updated plugin version.

Changes:

  • Added YAML metadata for gpt-5.6 (alias) plus gpt-5.6-sol, gpt-5.6-terra, and gpt-5.6-luna.
  • Updated the LLM model ordering list to include the new GPT-5.6 entries.
  • Bumped the OpenAI plugin manifest version to 0.4.4.

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
models/openai/models/llm/gpt-5.6.yaml Adds the gpt-5.6 alias model definition (features/params/pricing).
models/openai/models/llm/gpt-5.6-sol.yaml Adds GPT-5.6 Sol model definition.
models/openai/models/llm/gpt-5.6-terra.yaml Adds GPT-5.6 Terra model definition.
models/openai/models/llm/gpt-5.6-luna.yaml Adds GPT-5.6 Luna model definition.
models/openai/models/llm/_position.yaml Inserts the new GPT-5.6 entries into the model ordering list.
models/openai/manifest.yaml Bumps plugin version from 0.4.3 to 0.4.4.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread models/openai/models/llm/gpt-5.6.yaml
Comment thread models/openai/models/llm/gpt-5.6.yaml Outdated
Comment thread models/openai/models/llm/gpt-5.6.yaml Outdated
Comment thread models/openai/models/llm/gpt-5.6-sol.yaml
Comment thread models/openai/models/llm/gpt-5.6-sol.yaml Outdated
Comment thread models/openai/models/llm/gpt-5.6-terra.yaml
Comment thread models/openai/models/llm/gpt-5.6-terra.yaml Outdated
Comment thread models/openai/models/llm/gpt-5.6-luna.yaml
Comment thread models/openai/models/llm/gpt-5.6-luna.yaml Outdated
Comment thread models/openai/manifest.yaml Outdated
cqjjjzr
cqjjjzr previously approved these changes Jul 9, 2026
@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Jul 9, 2026
@cqjjjzr cqjjjzr temporarily deployed to models/openai July 9, 2026 20:56 — with GitHub Actions Inactive
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@dosubot dosubot Bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:XS This PR changes 0-9 lines, ignoring generated files. labels Jul 9, 2026
@WH-2099 WH-2099 marked this pull request as draft July 9, 2026 21:30
auto-merge was automatically disabled July 9, 2026 21:30

Pull request was converted to draft

@WH-2099 WH-2099 marked this pull request as ready for review July 9, 2026 22:03
@dosubot dosubot Bot added size:XL This PR changes 500-999 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Jul 9, 2026
@WH-2099 WH-2099 marked this pull request as draft July 9, 2026 22:07
BREAKING CHANGE: OpenAI 1.0 defaults supported LLMs to the Responses API, removes deprecated model entries, and replaces the legacy test and runtime architecture.
@WH-2099 WH-2099 changed the title feat(openai): add GPT-5.6 model support feat(openai)!: rewrite plugin for 1.0 Jul 9, 2026
@WH-2099 WH-2099 marked this pull request as ready for review July 9, 2026 23:23
@WH-2099 WH-2099 marked this pull request as draft July 10, 2026 07:14
@WH-2099 WH-2099 marked this pull request as ready for review July 10, 2026 09:56
@WH-2099 WH-2099 enabled auto-merge (squash) July 10, 2026 09:58
@WH-2099 WH-2099 merged commit 0c57704 into main Jul 10, 2026
3 checks passed
@crazywoola crazywoola deployed to models/openai July 10, 2026 10:03 — with GitHub Actions Active
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request lgtm This PR has been approved by a maintainer size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(openai): add GPT-5.6 model family support

4 participants