Skip to content

fix: support model type alias parsing#157

Merged
WH-2099 merged 1 commit into
mainfrom
fix/model-type-alias-parsing
May 23, 2026
Merged

fix: support model type alias parsing#157
WH-2099 merged 1 commit into
mainfrom
fix/model-type-alias-parsing

Conversation

@WH-2099
Copy link
Copy Markdown
Member

@WH-2099 WH-2099 commented May 23, 2026

Summary

  • support legacy provider model type strings through ModelType._missing_
  • switch Slim DSL model type parsing to direct enum construction
  • cover legacy aliases with a model dispatch test

Why

Some persisted or API-origin model type strings still use provider-native values such as embeddings, text-generation, and reranking. Letting ModelType(...) handle those aliases keeps enum parsing consistent across runtime and persistence paths.

Validation

  • uv run pytest tests/model_runtime/test_model_dispatch.py tests/dsl/test_slim_package_loader.py
  • commit hook: make tc

Closes #21

@WH-2099 WH-2099 self-assigned this May 23, 2026
@dosubot dosubot Bot added the size:M This PR changes 30-99 lines, ignoring generated files. label May 23, 2026
@WH-2099 WH-2099 force-pushed the fix/model-type-alias-parsing branch from ea275e9 to 53ed6d5 Compare May 23, 2026 11:00
@WH-2099 WH-2099 requested a review from asukaminato0721 May 23, 2026 11:01
@WH-2099 WH-2099 enabled auto-merge (squash) May 23, 2026 11:01
@WH-2099 WH-2099 merged commit ceb225d into main May 23, 2026
9 checks passed
@WH-2099 WH-2099 deleted the fix/model-type-alias-parsing branch May 23, 2026 11:09
@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label May 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

use missing in Enum

2 participants