Raised on LibreChat-AI#16433: LibreChat-AI#16433 (comment)
getConfigOverrideIssues (packages/data-provider/src/overrides.ts) validates principal config overrides field by field, so a partial section is accepted and absent fields are left to the base. To do that it unwraps ZodEffects, which also drops the refinements attached to the unwrapped schema. Object-level refinements are skipped deliberately because they judge the merged section, not the patch, but record-level refinements such as the superRefine on addParamsSchema judge each key on its own and could be enforced.
What happens: a field patch such as endpoints.azureOpenAI.groups.0.addParams.web_search = "yes" passes validation and is stored, although addParamsSchema rejects a non-boolean web_search. A whole-array write of groups is already rejected, because arrays that replace the base are validated in full.
Expected: refinements that can judge the provided keys alone (record refinements keyed per entry) are applied on write and at merge, both for whole-document writes and for field paths that end inside a refined record, without rejecting valid partial patches of refined objects.
Raised on LibreChat-AI#16433: LibreChat-AI#16433 (comment)
getConfigOverrideIssues(packages/data-provider/src/overrides.ts) validates principal config overrides field by field, so a partial section is accepted and absent fields are left to the base. To do that it unwrapsZodEffects, which also drops the refinements attached to the unwrapped schema. Object-level refinements are skipped deliberately because they judge the merged section, not the patch, but record-level refinements such as thesuperRefineonaddParamsSchemajudge each key on its own and could be enforced.What happens: a field patch such as
endpoints.azureOpenAI.groups.0.addParams.web_search = "yes"passes validation and is stored, althoughaddParamsSchemarejects a non-booleanweb_search. A whole-array write ofgroupsis already rejected, because arrays that replace the base are validated in full.Expected: refinements that can judge the provided keys alone (record refinements keyed per entry) are applied on write and at merge, both for whole-document writes and for field paths that end inside a refined record, without rejecting valid partial patches of refined objects.