Skip to content

fix: add ModelType enum back to graphrag.config.enums for backward compatibility (fixes #2356)#2386

Open
hanhan761 wants to merge 2 commits into
microsoft:mainfrom
hanhan761:fix-2356-add-modeltype-backward-compat
Open

fix: add ModelType enum back to graphrag.config.enums for backward compatibility (fixes #2356)#2386
hanhan761 wants to merge 2 commits into
microsoft:mainfrom
hanhan761:fix-2356-add-modeltype-backward-compat

Conversation

@hanhan761
Copy link
Copy Markdown

Summary

After the monorepo restructuring, the ModelType enum was removed from graphrag.config.enums, breaking example notebooks and user code that imports it with:

from graphrag.config.enums import ModelType

This fix adds ModelType back as a backward-compatible re-export with its original Chat and Embedding values, allowing existing user code and notebooks to continue working without modification.

Issue

Fixes #2356

Verification

  • from graphrag.config.enums import ModelType now works
  • ModelType.Chat and ModelType.Embedding return expected values
  • No existing functionality is affected

@hanhan761 hanhan761 requested a review from a team as a code owner May 30, 2026 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: <title> ImportError in v3.0.9 - cannot import name 'ModelType' from 'graphrag.config.enums'

1 participant