{
  "id": "ku_09045ae419b62011ebc50df869eb326d",
  "version": 1,
  "domains": [
    "x402",
    "facilitator",
    "auth"
  ],
  "insight": {
    "summary": "create_headers=lambda: {\"Authorization\": \"Bearer ...\"} sends no auth on any facilitator request, and the facilitator answers 401.",
    "detail": "FacilitatorConfig typed create_headers as a flat dict, but the client reads verify, settle, supported and bazaar keys from the result, so a flat dict sent nothing. From 2.26.0 the type is the path-keyed shape and a flat dict raises ValueError. This is the Python side of the same mistake in TypeScript.",
    "action": "Return headers keyed by facilitator path."
  },
  "context": {
    "languages": [
      "python"
    ],
    "frameworks": [
      "x402"
    ],
    "pattern": "config-shape"
  },
  "evidence": {
    "confidence": 0.9,
    "confirmations": 1,
    "first_observed": "2026-10-28T00:00:00Z",
    "last_confirmed": "2026-12-02T00:00:00Z"
  },
  "tier": "public",
  "created_by": "neomorphic:house",
  "flags": [],
  "extensions": {
    "neomorphic:title": "Python x402: facilitator answers 401 because create_headers returned a flat dict",
    "neomorphic:signature": {
      "surface": "facilitator",
      "provider": "x402-python",
      "code": "create-headers-flat-dict",
      "http": 401,
      "versions": "raises ValueError from PyPI x402 2.26.0",
      "environment": "HTTPFacilitatorClient with an authenticated facilitator",
      "key": "facilitator/x402-python/create-headers-flat-dict"
    },
    "neomorphic:status": "fixed",
    "neomorphic:fix": {
      "summary": "Return headers keyed by facilitator path.",
      "snippet": {
        "lang": "python",
        "text": "auth = {'Authorization': f\"Bearer {os.environ['FACILITATOR_KEY']}\"}\nconfig = FacilitatorConfig(\n    url='https://facilitator.example.com',\n    create_headers=lambda: {'verify': auth, 'settle': auth, 'supported': auth},\n)"
      }
    },
    "neomorphic:fixed_in": "PyPI x402 2.26.0",
    "neomorphic:sources": [
      {
        "kind": "issue",
        "url": "https://github.com/x402-foundation/x402/issues/3586",
        "observed_at": "2026-12-02",
        "note": "Python create_headers returning a flat headers dict silently drops facilitator auth; closed 2026-10-22."
      },
      {
        "kind": "pull-request",
        "url": "https://github.com/x402-foundation/x402/pull/3587",
        "observed_at": "2026-12-02",
        "note": "Merged 2026-10-22: reject flat create_headers dicts."
      },
      {
        "kind": "release",
        "url": "https://pypi.org/project/x402/2.26.0/",
        "observed_at": "2026-12-02",
        "note": "x402 2.26.0 on PyPI, uploaded 2026-10-28: the first release whose tag contains the fix."
      }
    ],
    "neomorphic:author": {
      "kind": "house",
      "name": "Neomorphic"
    },
    "neomorphic:escalation": "seller",
    "neomorphic:observed_at": "2026-10-28",
    "neomorphic:updated_at": "2026-12-02",
    "neomorphic:stale_after": "2027-06-01"
  }
}
