Fix abstract schemas generated by provider plugin script - #504
Open
fallintoplace wants to merge 1 commit into
Open
Fix abstract schemas generated by provider plugin script#504fallintoplace wants to merge 1 commit into
fallintoplace wants to merge 1 commit into
Conversation
|
No linked issues found. Please link an issue in your pull request description or title. Per our Contributing Guidelines, all PRs must:
You can also use cross-repo references like |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes #505
Related to #99
Type: Bug fix
Summary
The provider plugin generator added in #144 still emits the old
supports_strict_modeproperty. WhenBaseSchemamoved to therequires_raw_outputcontract in #239, the generator template was not updated.As a result, schemas created with
--with-schemaremain abstract andfrom_examples()raises aTypeError.This change:
requires_raw_outputimplementation
Truebecause the generated provider configures structured output asraw JSON
instantiates it through
from_examples()The patch is limited to the generator template and its provider-plugin
regression coverage. It restores the documented workflow without changing
runtime APIs.
How Has This Been Tested?
pytest -q -m "not live_api and not requires_pip and not integration" pyink scripts/create_provider_plugin.py tests/provider_plugin_test.py --check --diff --config pyproject.toml isort scripts/create_provider_plugin.py tests/provider_plugin_test.py --check-only --diff pylint --rcfile=tests/.pylintrc tests/provider_plugin_test.pyThe local suite passed with 707 tests and 47 subtests. CI also passes
formatting, Python 3.10 through 3.12, and the plugin and Ollama integration
suites.
Checklist:
requires_raw_output.pylintover the affected test file.