← Back to PRs

#12499: fix(config): add missing customBindHost to gateway Zod schema

by sfo2001 open 2026-02-09 09:44 View on GitHub →
## Summary - Add `customBindHost: z.string().optional()` to the gateway object in `src/config/zod-schema.ts` - Add test coverage for `customBindHost` with various bind modes Fixes #5435 ## Context `gateway.customBindHost` is defined in the TypeScript type (`src/config/types.gateway.ts:233`) and used across onboarding, dashboard, doctor, status, and gateway runtime, but missing from the Zod schema. Since the schema uses `.strict()`, any config containing `customBindHost` fails validation with `Unrecognized key: "customBindHost"`. Previously submitted as PR #5534, which was auto-closed by triage bot. ## Test plan - [ ] `pnpm test src/config/config.gateway-custom-bind-host.test.ts` passes - [ ] Existing config tests unaffected <!-- greptile_comment --> <h2>Greptile Overview</h2> <h3>Greptile Summary</h3> This PR updates the config validation schema (`src/config/zod-schema.ts`) to accept the existing `gateway.customBindHost` field (already present in the Gateway config type) and adds a Vitest ensuring configs containing `gateway.customBindHost` no longer fail Zod `.strict()` validation. Net effect: users can include `gateway.customBindHost` in their config without receiving an “unrecognized key” validation error during `validateConfigObject()` (which parses configs via `OpenClawSchema.safeParse()`). <h3>Confidence Score: 5/5</h3> - This PR is safe to merge with minimal risk. - Change is narrowly scoped (one optional schema field + a small unit test) and matches the existing config type usage; no runtime behavior changes beyond allowing previously-rejected config keys. - src/config/config.gateway-custom-bind-host.test.ts (test isolation) <!-- greptile_other_comments_section --> <!-- /greptile_comment -->

Most Similar PRs