[PR #85] [CLOSED] fix: invalid new tool call creation logic during streaming response handling in OAI-Compat model. #132

Closed
opened 2026-02-15 21:15:54 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langgenius/dify-plugin-sdks/pull/85
Author: @ExenVitor
Created: 4/9/2025
Status: Closed

Base: mainHead: fix-oai-compat-increase-tool-call


📝 Commits (1)

  • fd788ff fix: incorrectly uses new_tool_call.function.name while getting existing tool calls

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 python/dify_plugin/interfaces/model/openai_compatible/llm.py (+1 -1)

📄 Description

Differentiate new tool call instance by function name rather than tool call ID.

Sync logic from Dify main project:
https://github.com/langgenius/dify/blob/c9f18aae0fca88ec7c440e60b6153333a64d14bb/api/core/model_runtime/model_providers/__base/large_language_model.py#L112C17-L142C1


🔄 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-plugin-sdks/pull/85 **Author:** [@ExenVitor](https://github.com/ExenVitor) **Created:** 4/9/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix-oai-compat-increase-tool-call` --- ### 📝 Commits (1) - [`fd788ff`](https://github.com/langgenius/dify-plugin-sdks/commit/fd788ffd913d39f65c4e9f624ccb5e0915102398) fix: incorrectly uses new_tool_call.function.name while getting existing tool calls ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `python/dify_plugin/interfaces/model/openai_compatible/llm.py` (+1 -1) </details> ### 📄 Description Differentiate new tool call instance by function name rather than tool call ID. Sync logic from Dify main project: [https://github.com/langgenius/dify/blob/c9f18aae0fca88ec7c440e60b6153333a64d14bb/api/core/model_runtime/model_providers/__base/large_language_model.py#L112C17-L142C1](https://github.com/langgenius/dify/blob/c9f18aae0fca88ec7c440e60b6153333a64d14bb/api/core/model_runtime/model_providers/__base/large_language_model.py#L112C17-L142C1) --- <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-15 21:15:54 -05:00
yindo closed this issue 2026-02-15 21:15:54 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-plugin-sdks#132