Skip to content

fix(ai-openrouter): correct HTTP-Referrer header to HTTP-Referer#6145

Open
LikiosSedo wants to merge 1 commit intoEffect-TS:mainfrom
LikiosSedo:fix/openrouter-referer-header
Open

fix(ai-openrouter): correct HTTP-Referrer header to HTTP-Referer#6145
LikiosSedo wants to merge 1 commit intoEffect-TS:mainfrom
LikiosSedo:fix/openrouter-referer-header

Conversation

@LikiosSedo
Copy link

Summary

The OpenRouter client sends HTTP-Referrer (double r) but the HTTP spec and OpenRouter API expect HTTP-Referer (single r). This causes app attribution via referrer/title to silently fail.

Fix

One-character fix: "HTTP-Referrer""HTTP-Referer" in the request header.

The referrer option name is kept as-is — it's a valid user-facing API name (consistent with JavaScript's own document.referrer), not an HTTP header.

Fixes #6143

The HTTP spec spells it "Referer" (single r). OpenRouter expects
this exact header name for app attribution. The current typo causes
referrer/title attribution to silently fail.

Fixes Effect-TS#6143
@LikiosSedo LikiosSedo requested a review from IMax153 as a code owner March 25, 2026 04:59
@github-project-automation github-project-automation bot moved this to Discussion Ongoing in PR Backlog Mar 25, 2026
@changeset-bot
Copy link

changeset-bot bot commented Mar 25, 2026

⚠️ No Changeset found

Latest commit: ddfed66

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@IMax153
Copy link
Member

IMax153 commented Mar 25, 2026

@LikiosSedo - 🤦 thanks for fixing my typo!

Could you please add a patch changeset to your PR via pnpm changeset with a short description of the changes made? Then I can get this in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Discussion Ongoing

Development

Successfully merging this pull request may close these issues.

ai-openrouter: referer is not passed because of typo in http headers

2 participants