Fix: Matching built-in providers fails if specified by name (Fixes #335)#351
Fix: Matching built-in providers fails if specified by name (Fixes #335)#351ambicuity wants to merge 3 commits intogoogle:mainfrom
Conversation
|
Your branch is 1 commits behind git fetch origin main
git merge origin/main
git pushNote: Enable "Allow edits by maintainers" to allow automatic updates. |
3 similar comments
|
Your branch is 1 commits behind git fetch origin main
git merge origin/main
git pushNote: Enable "Allow edits by maintainers" to allow automatic updates. |
|
Your branch is 1 commits behind git fetch origin main
git merge origin/main
git pushNote: Enable "Allow edits by maintainers" to allow automatic updates. |
|
Your branch is 1 commits behind git fetch origin main
git merge origin/main
git pushNote: Enable "Allow edits by maintainers" to allow automatic updates. |
|
Your branch is 7 commits behind git fetch origin main
git merge origin/main
git pushNote: Enable "Allow edits by maintainers" to allow automatic updates. |
|
Your branch is 8 commits behind git fetch origin main
git merge origin/main
git pushNote: Enable "Allow edits by maintainers" to allow automatic updates. |
Description
This PR fixes Issue #335 where specifying a built-in provider by name (e.g.,
provider="google") would fail in configurations using schema constraints. This happened because_create_model_with_schemawas attempting to resolve the provider before ensuring that built-in providers were loaded into the registry.The fix ensures that
providers.load_builtins_once()is called unconditionally at the start of_create_model_with_schema.Fixes #335
Bug fix
How Has This Been Tested?
I verified the fix with a reproduction script that attempted to create a model with
provider="gemini"and schema constraints.Before the fix, this resulted in an
InferenceConfigError.After the fix, the provider is successfully resolved.
Checklist:
pylintover the affected code.