Wanted
Send OpenRouter's app-attribution headers on the OpenRouter backend (docs):
HTTP-Referer: required for an app page and for rankings.
X-OpenRouter-Title: the display name.
X-OpenRouter-Categories: for example cli-agent or ide-extension.
- Optionally
X-OpenRouter-App-Visibility: hidden.
By default, name pi-typesafe. Add a createTypeSafe option (for example attribution) so an extension built on this library can name itself instead.
Constraints
- The headers go only to the OpenRouter backend. Requests to the TypeSafe backend stay exactly as they are.
- The headers carry no secret and no user content.
- The SDK client accepts
defaultHeaders. Check that they reach the injected fetch on both the judgment request and the model list.
Wanted
Send OpenRouter's app-attribution headers on the OpenRouter backend (docs):
HTTP-Referer: required for an app page and for rankings.X-OpenRouter-Title: the display name.X-OpenRouter-Categories: for examplecli-agentoride-extension.X-OpenRouter-App-Visibility: hidden.By default, name pi-typesafe. Add a
createTypeSafeoption (for exampleattribution) so an extension built on this library can name itself instead.Constraints
defaultHeaders. Check that they reach the injectedfetchon both the judgment request and the model list.