[PR #2151] [CLOSED] feat(openai_api_compatible): add new thinking feature to support deepseek v3.1 #2288

Closed
opened 2026-02-16 11:16:35 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langgenius/dify-official-plugins/pull/2151
Author: @dadastory
Created: 11/29/2025
Status: Closed

Base: mainHead: add_new_thinking_feature


📝 Commits (2)

  • afaefe9 # add new thinking feature to support deepseek v3.1
  • a95b305 Update models/openai_api_compatible/models/llm/llm.py

📊 Changes

2 files changed (+2 additions, -1 deletions)

View changed files

📝 models/openai_api_compatible/manifest.yaml (+1 -1)
📝 models/openai_api_compatible/models/llm/llm.py (+1 -0)

📄 Description

Related Issues or Context

When sending the POST request, I added a new thinking field to chat_template_kwargs in addition to the existing enable_thinking field, in order to ensure compatibility with the DeepSeek v3.1 mode.

This PR contains Changes to Non-Plugin

  • Documentation
  • Other

This PR contains Changes to Non-LLM Models Plugin

  • I have Run Comprehensive Tests Relevant to My Changes

This PR contains Changes to LLM Models Plugin

  • My Changes Affect Message Flow Handling (System Messages and User→Assistant Turn-Taking)

  • My Changes Affect Tool Interaction Flow (Multi-Round Usage and Output Handling, for both Agent App and Agent Node)

  • My Changes Affect Multimodal Input Handling (Images, PDFs, Audio, Video, etc.)

  • My Changes Affect Multimodal Output Generation (Images, Audio, Video, etc.)

  • My Changes Affect Structured Output Format (JSON, XML, etc.)

  • My Changes Affect Token Consumption Metrics

  • My Changes Affect Other LLM Functionalities (Reasoning Process, Grounding, Prompt Caching, etc.)

  • Other Changes (Add New Models, Fix Model Parameters, etc.)

Version Control (Any Changes to the Plugin Will Require Bumping the Version)

  • I have Bumped Up the Version in Manifest.yaml (Top-Level Version Field, Not in Meta Section)

Dify Plugin SDK Version

  • I have Ensured dify_plugin>=0.3.0,<0.6.0 is in requirements.txt

Environment Verification (If Any Code Changes)

Local Deployment Environment

  • Dify Version is 1.10.1, and I have tested my changes on a clean local deployment environment matching the production configuration.

SaaS Environment

  • I have tested my changes on cloud.dify.ai with a clean environment matching the production configuration

Old:
97c696b6-719d-4c45-b058-3b8e0b4778fd

New:
fbbb8cd8-240c-4ed8-8f4a-7c62b53ce0cc


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langgenius/dify-official-plugins/pull/2151 **Author:** [@dadastory](https://github.com/dadastory) **Created:** 11/29/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `add_new_thinking_feature` --- ### 📝 Commits (2) - [`afaefe9`](https://github.com/langgenius/dify-official-plugins/commit/afaefe9b6b6abf16708b6d4395c81b8171ad7100) # add new thinking feature to support deepseek v3.1 - [`a95b305`](https://github.com/langgenius/dify-official-plugins/commit/a95b305bff9c90657e84f3aa983a125f89d35c03) Update models/openai_api_compatible/models/llm/llm.py ### 📊 Changes **2 files changed** (+2 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `models/openai_api_compatible/manifest.yaml` (+1 -1) 📝 `models/openai_api_compatible/models/llm/llm.py` (+1 -0) </details> ### 📄 Description ## Related Issues or Context <!-- ⚠️ NOTE: This repository is for Dify Official Plugins only. For community contributions, please submit to https://github.com/langgenius/dify-plugins instead. - Link Related Issues if Applicable: #issue_number - Or Provide Context about Why this Change is Needed --> When sending the POST request, I added a new `thinking` field to `chat_template_kwargs` in addition to the existing `enable_thinking` field, in order to ensure compatibility with the DeepSeek v3.1 mode. ## This PR contains Changes to *Non-Plugin* <!-- Put an `x` in all the boxes that apply by replacing [ ] with [x] --> - [ ] Documentation - [x] Other ## This PR contains Changes to *Non-LLM Models Plugin* - [x] I have Run Comprehensive Tests Relevant to My Changes <!-- 📷 Include Screenshots/Videos Demonstrating the Fix, New Feature, or the Behavior Before/After Breaking Changes. --> ## This PR contains Changes to *LLM Models Plugin* <!-- LLM Models Test Example: --> <!-- https://github.com/langgenius/dify-official-plugins/blob/main/.assets/test-examples/llm-plugin-tests/llm_test_example.md --> - [ ] My Changes Affect Message Flow Handling (System Messages and User→Assistant Turn-Taking) - [ ] My Changes Affect Tool Interaction Flow (Multi-Round Usage and Output Handling, for both Agent App and Agent Node) - [ ] My Changes Affect Multimodal Input Handling (Images, PDFs, Audio, Video, etc.) - [ ] My Changes Affect Multimodal Output Generation (Images, Audio, Video, etc.) - [ ] My Changes Affect Structured Output Format (JSON, XML, etc.) - [ ] My Changes Affect Token Consumption Metrics - [ ] My Changes Affect Other LLM Functionalities (Reasoning Process, Grounding, Prompt Caching, etc.) - [x] Other Changes (Add New Models, Fix Model Parameters, etc.) ## Version Control (Any Changes to the Plugin Will Require Bumping the Version) - [x] I have Bumped Up the Version in Manifest.yaml (Top-Level `Version` Field, Not in Meta Section) <!-- ⚠️ NOTE: Version Format: MAJOR.MINOR.PATCH --> ## Dify Plugin SDK Version - [x] I have Ensured `dify_plugin>=0.3.0,<0.6.0` is in requirements.txt ## Environment Verification (If Any Code Changes) ### Local Deployment Environment - [x] Dify Version is 1.10.1, and I have tested my changes on a clean local deployment environment matching the production configuration. ### SaaS Environment - [x] I have tested my changes on cloud.dify.ai with a clean environment matching the production configuration Old: <img width="1634" height="1214" alt="97c696b6-719d-4c45-b058-3b8e0b4778fd" src="https://github.com/user-attachments/assets/6b45f642-7cd9-43fb-b2e5-b6e576c54947" /> New: <img width="1618" height="1224" alt="fbbb8cd8-240c-4ed8-8f4a-7c62b53ce0cc" src="https://github.com/user-attachments/assets/7818b52a-1994-45b8-abe2-981bbb0bee33" /> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 11:16:35 -05:00
yindo closed this issue 2026-02-16 11:16:35 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-official-plugins#2288