Field constraints were renamed in Pydantic v2. min_items and max_items became min_length and max_length, regex became pattern, allow_mutation=False became frozen=True, and const=True was removed with no direct replacement. Unknown keyword arguments to Field raise a TypeError, so these surface immediately rather than being ignored.
For a constant field, annotate it with Literal["fixed"], which both validates and narrows the type for static checkers. That is a real improvement over const, since it also works for discriminated unions.
Two other renames matter for JSON Schema output: Field(..., example=...) is gone in favour of json_schema_extra={"examples": [...]}, and Field(..., title=...) still works. Also note that pattern uses the Rust regex engine by default, which does not support lookahead or backreferences and rejects such patterns at model build time; set regex_engine="python-re" in model_config when you need the full Python syntax.