[PR #209] [MERGED] fix: use dict.get() to avoid KeyError when transforming llm response #222

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

📋 Pull Request Information

Original PR: https://github.com/langgenius/dify-plugin-sdks/pull/209
Author: @whhe
Created: 9/23/2025
Status: Merged
Merged: 9/26/2025
Merged by: @Yeuoly

Base: mainHead: fix-openai-compatible-resp-keyerror


📝 Commits (1)

  • 395c083 fix: use dict.get() to avoid KeyError when transforming llm response

📊 Changes

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

View changed files

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

📄 Description

Pull Request Checklist

Thank you for your contribution! Before submitting your PR, please make sure you have completed the following checks:

Compatibility Check

  • I have checked whether this change affects the backward compatibility of the plugin declared in README.md
  • I have checked whether this change affects the forward compatibility of the plugin declared in README.md
  • If this change introduces a breaking change, I have discussed it with the project maintainer and specified the release version in the README.md
  • I have described the compatibility impact and the corresponding version number in the PR description
  • I have checked whether the plugin version is updated in the README.md

Available Checks

  • Code has passed local tests
  • Relevant documentation has been updated (if necessary)

🔄 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/209 **Author:** [@whhe](https://github.com/whhe) **Created:** 9/23/2025 **Status:** ✅ Merged **Merged:** 9/26/2025 **Merged by:** [@Yeuoly](https://github.com/Yeuoly) **Base:** `main` ← **Head:** `fix-openai-compatible-resp-keyerror` --- ### 📝 Commits (1) - [`395c083`](https://github.com/langgenius/dify-plugin-sdks/commit/395c083ed12775175ed7fd65630751483d167e9d) fix: use dict.get() to avoid KeyError when transforming llm response ### 📊 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 # Pull Request Checklist Thank you for your contribution! Before submitting your PR, please make sure you have completed the following checks: ## Compatibility Check - [x] I have checked whether this change affects the **backward compatibility** of the plugin declared in `README.md` - [x] I have checked whether this change affects the **forward compatibility** of the plugin declared in `README.md` - [ ] If this change introduces a breaking change, I have discussed it with the project maintainer and specified the release version in the `README.md` - [ ] I have described the compatibility impact and the corresponding version number in the PR description - [ ] I have checked whether the plugin version is updated in the `README.md` ## Available Checks - [x] Code has passed local tests - [ ] Relevant documentation has been updated (if necessary) --- <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:16:18 -05:00
yindo closed this issue 2026-02-15 21:16:18 -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#222