Repository navigation
feat(codersdk): add strict unmarshalling for ChatModelCallConfig - #27187
Conversation
…ropped model_config settings Replaces the removal-probe drop detection with codersdk.ChatModelCallConfig.UnmarshalStrict (coder/coder#27187), pinning the SDK to that PR's commit. The strict decoder shares the lenient path's aux struct, so the SDK stays the sole oracle with no schema knowledge in the provider.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b4e1fbb0e1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep them coming! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
b2c58b0 to
2cc1cd0
Compare
Adds
ChatModelCallConfig.UnmarshalStrict:UnmarshalJSONexcept unknown fields and trailing data are errors instead of being silently dropped.model_configis 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 customUnmarshalJSONand its unexported aux struct (which defines the accepted key set, including legacy pricing aliases) make strict decoding impossible from outside the package.UnmarshalJSONstays 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