What version of Effect is running?
No response
What steps can reproduce the bug?
Configuring the OpenRouterClient with title and referrer options to pass observability information to OpenRouter does not work properly. Nothing gets logged
const clientLayer = OpenRouterClient.layerConfig({
apiKey: Config.succeed(apiKey),
title: Config.succeed(title),
referrer: Config.succeed(referer),
});
What is the expected behavior?
In the OpenRouter dashboard, the log of the invocation should be attributed to the app according to the given title.
What do you see instead?
No attribution.
Additional information
The error is here :
|
options.referrer ? HttpClientRequest.setHeader("HTTP-Referrer", options.referrer) : identity, |
There is a typo "HTTP-Referrer" instead of "HTTP-Referer". The problem is that the option name has a typo also, so it will be a breaking change to fix it properly...
What version of Effect is running?
No response
What steps can reproduce the bug?
Configuring the OpenRouterClient with
titleandreferreroptions to pass observability information to OpenRouter does not work properly. Nothing gets loggedWhat is the expected behavior?
In the OpenRouter dashboard, the log of the invocation should be attributed to the app according to the given title.
What do you see instead?
No attribution.
Additional information
The error is here :
effect/packages/ai/openrouter/src/OpenRouterClient.ts
Line 105 in f99048e
There is a typo "HTTP-Referrer" instead of "HTTP-Referer". The problem is that the option name has a typo also, so it will be a breaking change to fix it properly...