Skip to content

docs(openrouter): document automatic identification headers#12216

Open
mvanhorn wants to merge 1 commit intocontinuedev:mainfrom
mvanhorn:osc/12215-openrouter-headers-docs
Open

docs(openrouter): document automatic identification headers#12216
mvanhorn wants to merge 1 commit intocontinuedev:mainfrom
mvanhorn:osc/12215-openrouter-headers-docs

Conversation

@mvanhorn
Copy link
Copy Markdown
Contributor

@mvanhorn mvanhorn commented Apr 24, 2026

Fixes #12215

What changed

Adds an "App Identification Headers" section to docs/customize/model-providers/top-level/openrouter.mdx covering the three OpenRouter headers Continue now sends on every request:

  • HTTP-Referer: https://www.continue.dev/
  • X-OpenRouter-Title: Continue
  • X-OpenRouter-Categories: ide-extension

Values taken directly from packages/openai-adapters/src/apis/OpenRouter.ts (the OPENROUTER_HEADERS constant added in #11857 and extended in #11991), so the docs match the shipped code rather than inventing anything.

Also documents that requestOptions.headers takes precedence (the spread order {...OPENROUTER_HEADERS, ...config.requestOptions?.headers} in OpenRouterApi), with a short example for users who want their own traffic attributed to a different app.

Links to OpenRouter's header docs per the issue's suggestion.

Verification

  • Header names/values: grep -n "HTTP-Referer\|X-OpenRouter-Title\|X-OpenRouter-Categories" packages/openai-adapters/src/apis/OpenRouter.ts (lines 14–16).
  • Override precedence: OpenRouterApi constructor spreads OPENROUTER_HEADERS before config.requestOptions?.headers, so user-provided values win — matches what the issue body requested.

Summary by cubic

Add an “App Identification Headers” section to the OpenRouter docs that lists the default headers Continue sends: HTTP-Referer, X-OpenRouter-Title, and X-OpenRouter-Categories. Shows how to override them via requestOptions.headers, aligns the docs with shipped code, and links to OpenRouter’s header docs (Fixes #12215).

Written for commit 8077f4b. Summary will update on new commits.

Continue sends HTTP-Referer, X-OpenRouter-Title, and
X-OpenRouter-Categories on every OpenRouter request (added in continuedev#11857
and continuedev#11991) so traffic shows up under Continue in the OpenRouter
dashboard and App Showcase. That was undocumented; this adds an 'App
Identification Headers' section to the OpenRouter provider page with
the exact header values, a link to OpenRouter's header docs, and a
short example showing how to override via requestOptions.headers for
users routing traffic through their own app.

Values matched against packages/openai-adapters/src/apis/OpenRouter.ts.

Fixes continuedev#12215
@mvanhorn mvanhorn requested a review from a team as a code owner April 24, 2026 09:32
@mvanhorn mvanhorn requested review from sestinj and removed request for a team April 24, 2026 09:32
@dosubot dosubot Bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Apr 24, 2026
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

Bojun-Vvibe added a commit to Bojun-Vvibe/oss-contributions that referenced this pull request Apr 25, 2026
…tinue docs

- BerriAI/litellm#26469 needs-discussion (config DualCache + batched prefetch, WIP)
- anomalyco/opencode#24262 request-changes (NIM deepseek-v4 chat_template_kwargs body-mutating fetch)
- continuedev/continue#12216 merge-as-is (openrouter identification headers docs)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M This PR changes 30-99 lines, ignoring generated files.

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

docs: Document OpenRouter HTTP-Referer and X-Title headers

1 participant