router-for-me/CLIProxyAPI · error
decode codex.live-media-relay.disable-private-remote-ips: %w
Error message
decode codex.live-media-relay.disable-private-remote-ips: %w
What it means
Same decode step for the current key disable-private-remote-ips: its YAML value is not a boolean. Note the decoder is strict — YAML 1.1-style truthiness like 'yes'/'no'/'on' is not accepted as bool by gopkg.in/yaml.v3.
Source
Thrown at internal/config/codex_live.go:40
if errDecode := value.Decode(&decoded); errDecode != nil {
return errDecode
}
var allowPrivate *bool
var disablePrivate *bool
if value.Kind == yaml.MappingNode {
for index := 0; index+1 < len(value.Content); index += 2 {
key := value.Content[index].Value
switch key {
case "allow-private-remote-ips":
var setting bool
if errDecode := value.Content[index+1].Decode(&setting); errDecode != nil {
return fmt.Errorf("decode codex.live-media-relay.allow-private-remote-ips: %w", errDecode)
}
allowPrivate = &setting
case "disable-private-remote-ips":
var setting bool
if errDecode := value.Content[index+1].Decode(&setting); errDecode != nil {
return fmt.Errorf("decode codex.live-media-relay.disable-private-remote-ips: %w", errDecode)
}
disablePrivate = &setting
}
}
}
if allowPrivate != nil && disablePrivate != nil {
return errors.New("codex.live-media-relay cannot set both allow-private-remote-ips and disable-private-remote-ips")
}
if allowPrivate != nil {
decoded.DisablePrivateRemoteIPs = !*allowPrivate
log.Warn("codex.live-media-relay.allow-private-remote-ips is deprecated; use disable-private-remote-ips with the inverse value")
}
*c = CodexLiveMediaRelayConfig(decoded)
return nil
}
// EffectiveMaxSessions returns the configured media session limit.
func (c CodexLiveMediaRelayConfig) EffectiveMaxSessions() int {View on GitHub (pinned to 78f0c4079e)
Solutions
- Use a bare boolean: disable-private-remote-ips: false.
- Remove quotes introduced by env interpolation (e.g. ${VAR:-false} rendering as a string).
- Validate the rendered config YAML with a schema or 'go run' dry-load before starting the server.
Example fix
# before disable-private-remote-ips: "true" # after disable-private-remote-ips: true
Defensive patterns
Strategy: validation
Validate before calling
# Render template then check the value is a bool
python3 -c "import yaml,sys; v=yaml.safe_load(open('config.yaml'))['codex']['live-media-relay']['disable-private-remote-ips']; assert isinstance(v,bool), type(v)" Prevention
- yaml.v3 is strict: yes/no/on/off are strings, not booleans — always write true/false.
- Avoid quoting values that come from env interpolation.
When it happens
Trigger: codex.live-media-relay.disable-private-remote-ips is set to a non-bool (string 'true', 1, list, map), so value.Content[index+1].Decode(&setting) fails.
Common situations: Quoted '"false"' from env-substituted templates; using yes/no expecting YAML 1.1 coercion; indentation mistake nesting another key under it.
Related errors
- decode codex.live-media-relay.allow-private-remote-ips: %w
- codex.live-media-relay.public-ip is invalid: %q
- codex.live-media-relay UDP range requires at least %d ports
- codex.live-media-relay.ice-servers[%d].urls is required
- codex.live-media-relay.ice-servers[%d] contains an invalid U
AI-assisted analysis of router-for-me/CLIProxyAPI@78f0c4079e (2026-08-15).
Data as JSON: /api/errors/2bfa45dd90beaa40.
Report an issue: GitHub.