[PR #223] [MERGED] refactor: update model provider to use ModelFactory for instance mana… #236

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

📋 Pull Request Information

Original PR: https://github.com/langgenius/dify-plugin-sdks/pull/223
Author: @Mairuis
Created: 10/20/2025
Status: Merged
Merged: 10/20/2025
Merged by: @Mairuis

Base: mainHead: fix/model-provider


📝 Commits (3)

  • 93e1430 refactor: update model provider to use ModelFactory for instance management
  • 029713a refactor: integrate ModelFactory for model instance mapping in tests
  • 9b94df5 refactor: remove unused imports and clean up test files

📊 Changes

5 files changed (+81 additions, -10 deletions)

View changed files

📝 python/dify_plugin/core/plugin_registration.py (+1 -1)
📝 python/dify_plugin/interfaces/model/__init__.py (+8 -8)
python/tests/interfaces/model/test_construct_model_provider.py (+33 -0)
python/tests/interfaces/model/test_model_registry_get_model.py (+35 -0)
📝 python/tests/test_model_registry_get_model.py (+4 -1)

📄 Description

…gement

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/223 **Author:** [@Mairuis](https://github.com/Mairuis) **Created:** 10/20/2025 **Status:** ✅ Merged **Merged:** 10/20/2025 **Merged by:** [@Mairuis](https://github.com/Mairuis) **Base:** `main` ← **Head:** `fix/model-provider` --- ### 📝 Commits (3) - [`93e1430`](https://github.com/langgenius/dify-plugin-sdks/commit/93e1430b8150f2d28c77a9ff0009274b9614bfec) refactor: update model provider to use ModelFactory for instance management - [`029713a`](https://github.com/langgenius/dify-plugin-sdks/commit/029713a9975f1fed7bd1020f38ba8e7ce86bbb2a) refactor: integrate ModelFactory for model instance mapping in tests - [`9b94df5`](https://github.com/langgenius/dify-plugin-sdks/commit/9b94df5297515284668e521e1ff91004d6d4cda2) refactor: remove unused imports and clean up test files ### 📊 Changes **5 files changed** (+81 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `python/dify_plugin/core/plugin_registration.py` (+1 -1) 📝 `python/dify_plugin/interfaces/model/__init__.py` (+8 -8) ➕ `python/tests/interfaces/model/test_construct_model_provider.py` (+33 -0) ➕ `python/tests/interfaces/model/test_model_registry_get_model.py` (+35 -0) 📝 `python/tests/test_model_registry_get_model.py` (+4 -1) </details> ### 📄 Description …gement # 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` - [x] If this change introduces a breaking change, I have discussed it with the project maintainer and specified the release version in the `README.md` - [x] I have described the compatibility impact and the corresponding version number in the PR description - [x] I have checked whether the plugin version is updated in the `README.md` ## Available Checks - [x] Code has passed local tests - [x] 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:21 -05:00
yindo closed this issue 2026-02-15 21:16:22 -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#236