{"record":{"id":"d5c3b9f4c0e70cc0","repo":"headroomlabs-ai/headroom","slug":"unknown-proxyconfig-field-key","errorCode":null,"errorMessage":"unknown ProxyConfig field: {key}","messagePattern":"unknown ProxyConfig field: (.+?)","errorType":"exception","errorClass":"AttributeError","httpStatus":null,"severity":"warning","filePath":"headroom/testing/harness.py","lineNumber":727,"sourceCode":"\n    OnPlatform = on_platform\n\n    def configure(self, callback: ConfigCallback | None = None, **overrides: Any) -> Headroom:\n        configurator = Configurator(self._headroom_config, self._proxy_config)\n        if callback is not None:\n            callback(configurator)\n        for key, value in overrides.items():\n            setattr(configurator, key, value)\n        return self\n\n    Configure = configure\n\n    def configure_proxy(self, callback: ProxyCallback | None = None, **overrides: Any) -> Headroom:\n        if callback is not None:\n            callback(self._proxy_config)\n        for key, value in overrides.items():\n            if not hasattr(self._proxy_config, key):\n                raise AttributeError(f\"unknown ProxyConfig field: {key}\")\n            setattr(self._proxy_config, key, value)\n        return self\n\n    ConfigureProxy = configure_proxy\n\n    def configure_headroom(self, callback: SdkCallback | None = None, **overrides: Any) -> Headroom:\n        if callback is not None:\n            callback(self._headroom_config)\n        for key, value in overrides.items():\n            if not hasattr(self._headroom_config, key):\n                raise AttributeError(f\"unknown HeadroomConfig field: {key}\")\n            setattr(self._headroom_config, key, value)\n        return self\n\n    ConfigureHeadroom = configure_headroom\n\n    def with_compression(\n        self,","sourceCodeStart":709,"sourceCodeEnd":745,"githubUrl":"https://github.com/headroomlabs-ai/headroom/blob/322425c43bffde1ed0b64fecf3cf5951565dd82b/headroom/testing/harness.py#L709-L745","documentation":"AttributeError raised by Headroom.configure_proxy (headroom/testing/harness.py:727) when the overrides kwargs contain a name that the ProxyConfig object does not have (hasattr check fails). Unlike the generic __setattr__ path (378), this builder validates each override explicitly and names the offending key, so typos and version-drifted field names fail fast with a precise message. configure_headroom has the mirror-image check for HeadroomConfig.","triggerScenarios":"Headroom...configure_proxy(mode='cache', retrys=3) — 'retrys' not a ProxyConfig field; using a field from release notes of a newer headroom than installed; mixing HeadroomConfig field names into configure_proxy.","commonSituations":"Chaining fluent builders from README examples against an older installed version; field renamed between majors; copy-pasting configure(...) kwargs (which are NOT checked) into configure_proxy(...) (which are).","solutions":["Check dir(proxy_config) or the ProxyConfig definition for the exact field name.","Fix the typo / use the current field name.","Verify you are on the headroom version whose docs you are reading.","If you don't need per-key checking, note configure() applies overrides unchecked — but prefer fixing the name."],"exampleFix":"# before\nharness.configure_proxy(mode='cache', timout=30)  # AttributeError: unknown ProxyConfig field: timout\n\n# after\nharness.configure_proxy(mode='cache', timeout=30)","handlingStrategy":"validation","validationCode":"overrides = {'mode': 'cache', 'timout': 30}\nunknown = [k for k in overrides if not hasattr(proxy_config, k)]\nif unknown:\n    raise TypeError(f'unknown ProxyConfig fields: {unknown}')\nharness.configure_proxy(**overrides)","typeGuard":"def known_proxy_fields(config, overrides: dict) -> list[str]:\n    return [k for k in overrides if hasattr(config, k)]","tryCatchPattern":null,"preventionTips":["Prefer configure_proxy/configure_headroom over generic configure for kwargs — their checks catch typos.","Pin the headroom version in dev environments so docs match fields."],"tags":["testing","harness","builder","typo"],"backgroundTag":null,"analyzedSha":"322425c43bffde1ed0b64fecf3cf5951565dd82b","analyzedAt":"2026-08-15T01:03:05.481Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}