[PR #2547] [MERGED] feat(tongyi): add Kimi K2 series models support #2560

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

📋 Pull Request Information

Original PR: https://github.com/langgenius/dify-official-plugins/pull/2547
Author: @ZenKaiii
Created: 2/5/2026
Status: Merged
Merged: 2/5/2026
Merged by: @crazywoola

Base: mainHead: feat/tongyi-kimi-k2-models


📝 Commits (1)

  • dc27407 feat(tongyi): add Kimi K2 series models support

📊 Changes

6 files changed (+294 additions, -53 deletions)

View changed files

📝 models/tongyi/manifest.yaml (+1 -1)
models/tongyi/models/llm/Moonshot-Kimi-K2-Instruct.yaml (+70 -0)
📝 models/tongyi/models/llm/_position.yaml (+3 -0)
models/tongyi/models/llm/kimi-k2-thinking.yaml (+50 -0)
models/tongyi/models/llm/kimi-k2.5.yaml (+82 -0)
📝 models/tongyi/models/llm/llm.py (+88 -52)

📄 Description

Summary

Add three new Kimi models from Alibaba Cloud Bailian platform to the Tongyi plugin:

New Models

  1. kimi-k2.5 - The most versatile model in the Kimi series

    • Supports vision (multimodal)
    • Supports thinking mode (toggle via \enable_thinking\ parameter)
    • Supports tool calling
    • Context size: 262,144 tokens
    • Pricing: ¥4/M input, ¥21/M output
  2. kimi-k2-thinking - Dedicated thinking model

    • Always in thinking mode
    • Returns reasoning_content for step-by-step reasoning display
    • Supports tool calling
    • Context size: 262,144 tokens
    • Pricing: ¥4/M input, ¥16/M output
  3. Moonshot-Kimi-K2-Instruct - Fast non-thinking model

    • Direct response without thinking
    • Faster response time
    • Supports tool calling
    • Context size: 131,072 tokens
    • Pricing: ¥4/M input, ¥16/M output

Changes

  • Added model YAML configurations for the three new models
  • Updated \llm.py\ to handle thinking mode for kimi models:
    • kimi-k2.5 with enable_thinking=true forces streaming output
    • kimi-k2-thinking always forces streaming output
    • Both support incremental_output for proper reasoning display
  • Updated _position.yaml\ to include new models
  • Bumped version from 0.1.26 to 0.1.27

Reference


🔄 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/2547 **Author:** [@ZenKaiii](https://github.com/ZenKaiii) **Created:** 2/5/2026 **Status:** ✅ Merged **Merged:** 2/5/2026 **Merged by:** [@crazywoola](https://github.com/crazywoola) **Base:** `main` ← **Head:** `feat/tongyi-kimi-k2-models` --- ### 📝 Commits (1) - [`dc27407`](https://github.com/langgenius/dify-official-plugins/commit/dc274076b3b7636468f34d4935fed42b3f33eb2f) feat(tongyi): add Kimi K2 series models support ### 📊 Changes **6 files changed** (+294 additions, -53 deletions) <details> <summary>View changed files</summary> 📝 `models/tongyi/manifest.yaml` (+1 -1) ➕ `models/tongyi/models/llm/Moonshot-Kimi-K2-Instruct.yaml` (+70 -0) 📝 `models/tongyi/models/llm/_position.yaml` (+3 -0) ➕ `models/tongyi/models/llm/kimi-k2-thinking.yaml` (+50 -0) ➕ `models/tongyi/models/llm/kimi-k2.5.yaml` (+82 -0) 📝 `models/tongyi/models/llm/llm.py` (+88 -52) </details> ### 📄 Description ## Summary Add three new Kimi models from Alibaba Cloud Bailian platform to the Tongyi plugin: ### New Models 1. **kimi-k2.5** - The most versatile model in the Kimi series - Supports vision (multimodal) - Supports thinking mode (toggle via \enable_thinking\ parameter) - Supports tool calling - Context size: 262,144 tokens - Pricing: ¥4/M input, ¥21/M output 2. **kimi-k2-thinking** - Dedicated thinking model - Always in thinking mode - Returns reasoning_content for step-by-step reasoning display - Supports tool calling - Context size: 262,144 tokens - Pricing: ¥4/M input, ¥16/M output 3. **Moonshot-Kimi-K2-Instruct** - Fast non-thinking model - Direct response without thinking - Faster response time - Supports tool calling - Context size: 131,072 tokens - Pricing: ¥4/M input, ¥16/M output ### Changes - Added model YAML configurations for the three new models - Updated \llm.py\ to handle thinking mode for kimi models: - kimi-k2.5 with enable_thinking=true forces streaming output - kimi-k2-thinking always forces streaming output - Both support incremental_output for proper reasoning display - Updated \_position.yaml\ to include new models - Bumped version from 0.1.26 to 0.1.27 ### Reference - https://help.aliyun.com/zh/model-studio/kimi-api - https://bailian.console.aliyun.com/cn-beijing/?tab=model#/model-market/detail/kimi-k2.5 --- <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:17:19 -05:00
yindo closed this issue 2026-02-16 11:17:19 -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#2560