mirror of
https://github.com/langgenius/dify-official-plugins.git
synced 2026-07-22 01:55:27 -04:00
[PR #1192] [MERGED] feat: support OpenRouter reasoning tokens excluding, repair OpenRouter tool use #1761
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/1192
Author: @orangeclk
Created: 7/2/2025
Status: ✅ Merged
Merged: 7/3/2025
Merged by: @crazywoola
Base:
main← Head:openrouter-reason-exclude📝 Commits (2)
bad0e0cfeat: support openrouter reasoning tokens excluding11b1ffffix: openrouter tool use repair📊 Changes
11 files changed (+106 additions, -39 deletions)
View changed files
📝
models/openrouter/manifest.yaml(+1 -1)📝
models/openrouter/models/llm/claude-3.7-sonnet-thinking.yaml(+0 -0)📝
models/openrouter/models/llm/claude-3.7-sonnet.yaml(+10 -0)📝
models/openrouter/models/llm/claude-sonnet-4.yaml(+10 -0)📝
models/openrouter/models/llm/gemini-2.5-flash-lite-preview-06-17.yaml(+11 -2)📝
models/openrouter/models/llm/gemini-2.5-flash.yaml(+11 -2)📝
models/openrouter/models/llm/gemini-2.5-pro.yaml(+13 -3)📝
models/openrouter/models/llm/grok-3-mini-beta.yaml(+10 -0)📝
models/openrouter/models/llm/llm.py(+22 -31)📝
models/openrouter/provider/openrouter.yaml(+18 -0)➕
openrouter.difypkg(+0 -0)📄 Description
Related Issues or Context
Support has been added for OpenRouter's feature to exclude Chain-of-Thought (CoT) reasoning from the response. This enables CoT models to directly support Dify's structured output, eliminating the need for users to add separate nodes for CoT cleanup or parameter extraction.
Furthermore, the code handling OpenRouter's reasoning parameter has been streamlined for better robustness and simplicity, also leading to a more intuitive user interface.
It takes effect for the Gemini 2.5, Claude Sonnet and Grok 3 series.
Fixes #1088 and fix #21847

The function call issues for both predefined and customized models have been fixed.
Fixes this: https://github.com/langgenius/dify-official-plugins/pull/1177#issuecomment-3026507341
This PR contains Changes to Non-Plugin
This PR contains Changes to Non-LLM Models Plugin
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.5.0is in requirements.txt (SDK docs)Environment Verification (If Any Code Changes)
Local Deployment Environment
SaaS Environment
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.