The previous field_validator approach passed `cls` as the first argument to `_normalize_secret`, which only accepted `v`, causing a TypeError at runtime. Switch to `Annotated[str | None, BeforeValidator(...)]` which calls the function with just the value and also eliminates the repeated validator assignment in both schema classes. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>