Repository navigation
refactor(model-runtime)!: remove legacy model type aliases - #207
Merged
Merged
Conversation
Remove legacy provider-native model type alias parsing from ModelType while keeping canonical model type values and provider-native output mapping covered by tests. BREAKING CHANGE: ModelType no longer accepts legacy provider-native model type strings such as text-generation, embeddings, or reranking. Callers must pass canonical Graphon model type values instead. Closes #206 Assisted-by: Codex:GPT-5.4
QuantumGhost
enabled auto-merge (squash)
July 3, 2026 04:55
WH-2099
approved these changes
Jul 6, 2026
2 of 19 tasks
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.
AI disclosure: This PR was primarily drafted with Codex using GPT-5.4.
I have reviewed and edited the final diff, and I am responsible for the content.
Important
!Related Issue
Closes #206
Summary
Remove legacy provider-native model type alias parsing from
ModelTypenow that the Dify legacymodel_typemigration window has completed.This keeps canonical Graphon model type values accepted:
llmtext-embeddingrerankspeech2textmoderationttsIt also keeps
ModelType.to_origin_model_type()unchanged so Graphon can still map canonical model types to provider-native strings at the outbound provider boundary.BREAKING CHANGE:
ModelTypeno longer accepts legacy provider-native model type strings such astext-generation,embeddings, orreranking. Callers must pass canonical Graphon model type values instead.Validation:
uv run pytest tests/model_runtime/test_model_dispatch.py -k 'model_type_rejects_legacy_origin_model_type_aliases or model_type_accepts_canonical_values or model_type_to_origin_model_type_uses_model_map'just testjust checkChecklist
!