Skip to content

fix(openai): clarify GPT-5.6 Chat Completions tool error#3467

Merged
zyssyz123 merged 1 commit into
mainfrom
fix/dify-2818-openai-chat-tools-error
Jul 20, 2026
Merged

fix(openai): clarify GPT-5.6 Chat Completions tool error#3467
zyssyz123 merged 1 commit into
mainfrom
fix/dify-2818-openai-chat-tools-error

Conversation

@zyssyz123

Copy link
Copy Markdown
Contributor

Summary

  • recognize the OpenAI 400 returned when GPT-5.6 uses function tools with reasoning through Chat Completions
  • replace that known upstream error with actionable guidance to switch API Protocol to Responses
  • preserve the existing generic error mapping for unrelated bad requests and custom endpoint behavior

Testing

  • uv run pytest tests/test_routing.py -q (51 passed)
  • uv run pytest -q (155 passed, 63 skipped live tests)
  • uv run ruff check models/common_openai.py tests/test_routing.py
  • uv run ruff format --check models/common_openai.py tests/test_routing.py
  • packaged with dify-plugin package and verified the archive
  • deployed the package to the remote dev environment and reproduced the Agent request end to end
  • verified Chat Completions without tools, Chat Completions with tools plus reasoning_effort=none, and Responses with tools

Linear: DIFY-2818

@dosubot dosubot Bot added size:M This PR changes 30-99 lines, ignoring generated files. bug Something isn't working labels Jul 20, 2026
@zyssyz123
zyssyz123 enabled auto-merge (squash) July 20, 2026 11:26
@zyssyz123
zyssyz123 merged commit 2c2d055 into main Jul 20, 2026
3 checks passed
@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Jul 20, 2026
@zyssyz123
zyssyz123 deleted the fix/dify-2818-openai-chat-tools-error branch July 20, 2026 11:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working lgtm This PR has been approved by a maintainer size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants