Skip to content

fix: add backward-compat ModelType re-export for v2.x API compatibility (fixes #2356)#2379

Open
hanhan761 wants to merge 1 commit into
microsoft:mainfrom
hanhan761:fix-2356-modeltype-reexport
Open

fix: add backward-compat ModelType re-export for v2.x API compatibility (fixes #2356)#2379
hanhan761 wants to merge 1 commit into
microsoft:mainfrom
hanhan761:fix-2356-modeltype-reexport

Conversation

@hanhan761
Copy link
Copy Markdown

Summary

After the v3 monorepo refactoring, \ModelType\ was removed from \graphrag.config.enums. Users following documentation referencing the old import path get \ImportError: cannot import name 'ModelType'.

Changes

Added \ModelType\ as a backward-compatible \StrEnum\ to \graphrag/config/enums.py\ with the original values (\LLM, \Embedding). Usage emits a \DeprecationWarning\ suggesting users migrate to \graphrag_llm.config.types.LLMProviderType.

Related

Fixes #2356

@hanhan761 hanhan761 requested a review from a team as a code owner May 30, 2026 08:49
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