Expand description
What the gateway forwards: which paths, which of the harness’s headers, and which model the request names. Pure, so each is tested without a network.
Functions§
- bearer_
token - The gateway token the harness sent:
Authorization: Bearer ...(Claude Code withANTHROPIC_AUTH_TOKEN) orx-api-key. - forwarded_
headers - named_
model - The
modelthe request body names, when it is JSON and names one. - path_
allowed - The harness’s own paths a route serves. Anything else is refused, so the gateway is not a way to reach the rest of the upstream’s API with the person’s key.
- upstream_
url - with_
served_ model - The request body with its
modelmade one the route serves. A harness that insists on a Claude name (the small model it uses for titles, an alias, a[1m]context suffix) is mapped tochosen, the model the agent was given. A body that is not JSON, or names no model, goes on as it is.