#12499: fix(config): add missing customBindHost to gateway Zod schema
Cluster:
Config Fixes and Features
## 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
#19429: Fix/custom bind host validation
by frudas24 · 2026-02-17
90.6%
#10807: fix(config): coerce numeric meta.lastTouchedAt to ISO string
by mcaxtr · 2026-02-07
79.6%
#23688: fix(gateway): accept raw IP addresses in gateway.bind for backward ...
by arosstale · 2026-02-22
79.4%
#19437: Gateway: respect custom bind host for local health/RPC target resol...
by frudas24 · 2026-02-17
77.5%
#16412: fix(config): align tools.web.fetch schema with firecrawl/readabilit...
by ciberponk · 2026-02-14
76.3%
#14564: fix(gateway): crashes on startup when tailscale meets non-loopback ...
by yinghaosang · 2026-02-12
75.8%
#10197: fix: add missing allowAgents to agent defaults subagents schema
by Yida-Dev · 2026-02-06
75.6%
#19020: bugfix(gateway): Handle invalid model provider API config gracefully\…
by funkyjonx · 2026-02-17
75.6%
#4263: fix(plugins): default configSchema when missing from manifest
by SoulSniper-V2 · 2026-01-30
75.4%
#21712: feat(config): add custom commands to CommandsSchema
by Jimmysnielsen · 2026-02-20
75.3%