Files
coder/codersdk
Ethan b0f0a54ab7 feat(codersdk): add strict unmarshalling for ChatModelCallConfig (#27187)
Adds `ChatModelCallConfig.UnmarshalStrict`: `UnmarshalJSON` except
unknown fields and trailing data are errors instead of being silently
dropped.

`model_config` is free-form JSON at its edges (Terraform config, API
bodies), so a typo'd setting is dropped with no signal;
coder/terraform-provider-coderd#388 uses this for plan-time validation.
It has to live in codersdk because the custom `UnmarshalJSON` and its
unexported aux struct (which defines the accepted key set, including
legacy pricing aliases) make strict decoding impossible from outside the
package. `UnmarshalJSON` stays lenient since it is on the read path for
stored configs and older clients, where unknown keys mean version skew
rather than user error.

_Opened by Coder Agents on behalf of @ethanndickson._

Relates to CODAGT-797
2026-07-14 03:32:03 +00:00
..
…