Repository navigation
fix(api): delete custom models stored with legacy model_type values - #39708
Merged
crazywoola merged 2 commits intoJul 30, 2026
Merged
Conversation
After 1.14→1.15 upgrades, provider_models rows may still store text-generation/embeddings/reranking. Deletes sent llm/text-embedding/rerank and silently no-oped. Match both canonical and origin aliases in lookups. Fixes langgenius#39559
crazywoola
approved these changes
Jul 29, 2026
crazywoola
enabled auto-merge
July 29, 2026 12:31
Contributor
Pyrefly Diffbase → PR--- /tmp/pyrefly_base.txt 2026-07-30 00:58:29.566657989 +0000
+++ /tmp/pyrefly_pr.txt 2026-07-30 00:58:20.694568760 +0000
@@ -4416,16 +4416,18 @@
--> tests/unit_tests/core/entities/test_entities_provider_configuration.py:1036:31
ERROR Argument `SimpleNamespace` is not assignable to parameter `credential_record` with type `ProviderCredential | ProviderModelCredential` in function `core.entities.provider_configuration.ProviderConfiguration._update_load_balancing_configs_with_credential` [bad-argument-type]
--> tests/unit_tests/core/entities/test_entities_provider_configuration.py:1055:27
+ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
+ --> tests/unit_tests/core/entities/test_entities_provider_configuration.py:1190:12
ERROR `None` is not subscriptable [unsupported-operation]
- --> tests/unit_tests/core/entities/test_entities_provider_configuration.py:1171:12
+ --> tests/unit_tests/core/entities/test_entities_provider_configuration.py:1206:12
ERROR `None` is not subscriptable [unsupported-operation]
- --> tests/unit_tests/core/entities/test_entities_provider_configuration.py:1172:12
+ --> tests/unit_tests/core/entities/test_entities_provider_configuration.py:1207:12
ERROR `None` is not subscriptable [unsupported-operation]
- --> tests/unit_tests/core/entities/test_entities_provider_configuration.py:1188:12
+ --> tests/unit_tests/core/entities/test_entities_provider_configuration.py:1223:12
ERROR `None` is not subscriptable [unsupported-operation]
- --> tests/unit_tests/core/entities/test_entities_provider_configuration.py:1702:12
+ --> tests/unit_tests/core/entities/test_entities_provider_configuration.py:1737:12
ERROR `None` is not subscriptable [unsupported-operation]
- --> tests/unit_tests/core/entities/test_entities_provider_configuration.py:1894:12
+ --> tests/unit_tests/core/entities/test_entities_provider_configuration.py:1929:12
ERROR Object of class `ModuleType` has no attribute `MockExtension` [missing-attribute]
--> tests/unit_tests/core/extension/test_extensible.py:62:9
ERROR Cannot index into `OrderedDict[str, ModuleExtension]` [bad-index]
|
Contributor
Pyrefly Type Coverage
|
fatelei
pushed a commit
that referenced
this pull request
Jul 30, 2026
…39708) Co-authored-by: Crazywoola <100913391+crazywoola@users.noreply.github.com>
wylswz
pushed a commit
to wylswz/dify
that referenced
this pull request
Jul 30, 2026
…anggenius#39708) Co-authored-by: Crazywoola <100913391+crazywoola@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Important
Fixes #<issue number>.Summary
After upgrading from 1.14 to 1.15+, custom model rows may still store legacy
model_typevalues (text-generation/embeddings/reranking). Listing works becauseEnumTextnormalizes those values on read, but delete looked up the canonical values (llm/text-embedding/rerank), found no row, returned success, and left the model visible._model_type_db_values()usingModelType.to_origin_model_type()so queries match both canonical and legacy aliases.Fixes #39559
Screenshots
Not applicable (backend delete/query fix).
Checklist