You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Relax enum validation in generated models to tolerate unknown/new API values #931
Enum fields in the generated models are strict Literal[...] aliases (src/apify_client/_literals.py).
Since every API response is validated with Pydantic, any enum value the platform sends that the
(older) client doesn't know raises a ValidationError and the whole call fails.
This means every new backend enum value breaks clients in the wild until we regenerate and release.
See apify/apify-sdk-python#1032 (missing MCP origin) and the reactive patch #929.
Proposal: emit an open literal Literal[...] | str instead of bare Literal[...] in the
postprocess step (scripts/postprocess_generated_models.py), so unknown values validate while known
members stay as autocomplete hints.
Activity
fix: relax enum validation to tolerate unknown API values (#941)