mirror of
https://github.com/langgenius/dify-official-plugins.git
synced 2026-07-22 01:55:27 -04:00
[PR #2374] [MERGED] feat(openai_api_compatible): support reasoning_effort #2427
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/langgenius/dify-official-plugins/pull/2374
Author: @utsumi-fj
Created: 1/7/2026
Status: ✅ Merged
Merged: 1/7/2026
Merged by: @crazywoola
Base:
main← Head:openai_api_compatible_reasoning_effort📝 Commits (1)
7f8e4b8feat(openai_api_compatible): support reasoning_effort📊 Changes
2 files changed (+26 additions, -2 deletions)
View changed files
📝
models/openai_api_compatible/manifest.yaml(+1 -1)📝
models/openai_api_compatible/models/llm/llm.py(+25 -1)📄 Description
Related Issues or Context
Add support for configuring
reasoning_effortfor LLMs that support thinking mode.This option is available when:
Thinking Mode Supportis set toOnly Thinking ModeorBoth Modes, andBoth Modesis selected, the LLM node settingThinking modeis enabled.When enabled,
Reasoning effortcan be set tolow,medium, orhigh(aligned with the options used by openai/gpt-oss-20b and openai/gpt-oss-120b).Depending on the configuration, the following fields are added to the request:
"reasoning_effort": "<value>""chat_template_kwargs": {"reasoning_effort": "<value>"}The field 1. is compatible with OpenAI's Chat Completions API: https://platform.openai.com/docs/api-reference/chat/create#chat_create-reasoning_effort .
The field 2. is required for some OpenAI-compatible runtimes (e.g., llama.cpp-hosted models) that read reasoning-related options from template kwargs, and can be treated as an OpenAI-compatible extension.
This PR contains Changes to LLM Models Plugin
Version Control (Any Changes to the Plugin Will Require Bumping the Version)
VersionField, Not in Meta Section)Dify Plugin SDK Version
dify_plugin>=0.3.0,<0.6.0is in requirements.txt (SDK docs)Environment Verification (If Any Code Changes)
Local Deployment Environment
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.