dify - 💡(How to fix) Fix fix: migrate model type enum construction

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Fix Action

Fix / Workaround

Dify still calls ModelType.value_of(...) in provider and load-balancing services. Those call sites need to use ModelType(...) before Dify can safely upgrade to the Graphon release that contains the enum parsing change.

RAW_BUFFERClick to expand / collapse

Background

Graphon is moving model type alias parsing into ModelType._missing_ and removing the ModelType.value_of(...) compatibility helper in langgenius/graphon#157.

Dify still calls ModelType.value_of(...) in provider and load-balancing services. Those call sites need to use ModelType(...) before Dify can safely upgrade to the Graphon release that contains the enum parsing change.

Scope

  • Replace Graphon ModelType.value_of(...) calls with direct ModelType(...) construction.
  • Keep the change blocked until langgenius/graphon#157 is merged, released, and the Dify Graphon dependency is upgraded.

Validation

  • uv run --project api ruff format --check api/core/provider_manager.py api/services/model_load_balancing_service.py api/services/model_provider_service.py
  • uv run --project api ruff check api/core/provider_manager.py api/services/model_load_balancing_service.py api/services/model_provider_service.py

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

dify - 💡(How to fix) Fix fix: migrate model type enum construction