Type Compatibility

Treat contract changes like API changes. Some edits are safe; others are breaking for downstream systems.

Usually compatible

  • Adding optional fields.
  • Widening a type (e.g., string -> string | null).

Potentially breaking

  • Removing required fields.
  • Narrowing types or enums.
  • Tightening output schemas in a way that valid outputs now fail.

Use version diffs and evaluations before publishing a change.

See also

Was this page helpful?