Start here
The safe first move
Replace Field(const=True, default=value) with a Literal type annotation. This changes the validation behavior.
Stop before automation when: Choosing the right Literal type for the constant. Fields where the const behavior interacts with validation.
Target shape
from typing import Literal
from pydantic import BaseModel
class Config(BaseModel):
version: Literal["1.0"] = "1.0"