tinyhumansai/openhuman · error

proxy.scope='services' requires a non-empty proxy.services l

Error message

proxy.scope='services' requires a non-empty proxy.services list when proxy is enabled

What it means

Thrown by ProxyConfig validation during config load: proxy.enabled=true together with proxy.scope="services" requires the proxy.services allow-list to be non-empty after normalization. Scope "services" means only listed services are routed through the proxy, so an empty list would appear enabled while proxying nothing; the validator fails fast instead of letting that state ship.

Source

Thrown at src/openhuman/config/schema/proxy.rs:138

        for selector in self.normalized_services() {
            if !is_supported_proxy_service_selector(&selector) {
                anyhow::bail!(
                    "Unsupported proxy service selector '{selector}'. Use tool `proxy_config` action `list_services` for valid values"
                );
            }
        }

        if self.enabled && !self.has_any_proxy_url() {
            anyhow::bail!(
                "Proxy is enabled but no proxy URL is configured. Set at least one of http_proxy, https_proxy, or all_proxy"
            );
        }

        if self.enabled
            && self.scope == ProxyScope::Services
            && self.normalized_services().is_empty()
        {
            anyhow::bail!(
                "proxy.scope='services' requires a non-empty proxy.services list when proxy is enabled"
            );
        }

        Ok(())
    }

    pub fn should_apply_to_service(&self, service_key: &str) -> bool {
        if !self.enabled {
            return false;
        }

        match self.scope {
            ProxyScope::Environment => false,
            ProxyScope::OpenHuman => true,
            ProxyScope::Services => {
                let service_key = service_key.trim().to_ascii_lowercase();
                if service_key.is_empty() {

View on GitHub (pinned to 7491200858)

Solutions

  1. Add at least one service key to proxy.services (e.g. services = ["llm", "backend", "updates"]) and reload config
  2. If everything should be proxied, set scope = "all" instead of "services"
  3. If the proxy was enabled unintentionally, set enabled = false (or unset the env vars forcing it on)

Example fix

# before
[proxy]
enabled = true
scope = "services"

# after
[proxy]
enabled = true
scope = "services"
services = ["llm", "backend", "updates"]
Defensive patterns

Strategy: validation

Validate before calling

// Lint the proxy block before deploy/startup instead of crashing in Config::load
let p = &cfg.proxy;
if p.enabled && p.scope == ProxyScope::Services && p.normalized_services().is_empty() {
    return Err(anyhow::anyhow!("scope='services' needs a non-empty proxy.services list"));
}

Try / catch

Wrap Config::load; when the error message mentions proxy.scope, print targeted guidance (add services entries or switch scope to "all") and exit non-zero before the app layer turns it into a generic startup failure.

Prevention

When it happens

Trigger: Loading a TOML config (or env-overridden config) where [proxy] has enabled=true, scope="services", and services is absent, empty, or contains only entries that normalize away (unknown service keys). Validation runs during Config load, before the app starts.

Common situations: Copying a proxy block from a template that omits the services list; switching scope from "all" to "services" without adding entries; trimming the services list during cleanup; env overrides enabling the proxy while the TOML keeps scope=services with no list.

Related errors


AI-assisted analysis of tinyhumansai/openhuman@7491200858 (2026-08-17). Data as JSON: /api/errors/82d121f25b1783cb. Report an issue: GitHub.