Generated provider schema cannot be instantiated with --with-schema
Author: fallintoplaceCreated Jul 25, 2026Updated Jul 25, 2026
Describe the overall issue and situation
Running the provider plugin generator with --with-schema creates a schema class that remains abstract. The generated class implements supports_strict_mode, while BaseSchema requires the abstract requires_raw_output property.
The generator reports that schema support was added, but calling from_examples raises a TypeError when it tries to instantiate the class.
Steps to reproduce the issue
Generate a provider plugin:
python scripts/create_provider_plugin.py MyProvider --with-schema --no-installImport
MyProviderSchemafrom the generated package.Call
MyProviderSchema.from_examples([]).
The call fails with:
TypeError: Can't instantiate abstract class MyProviderSchema without an implementation for abstract method 'requires_raw_output'Expected behavior
A schema generated by the advertised --with-schema workflow should implement the current BaseSchema contract and be instantiable through from_examples.
Environment
Reproduced on current main at b5fe0ba with Python 3.12.
Source: google/langextract