docs(openrouter): document automatic identification headers#12216
Open
mvanhorn wants to merge 1 commit intocontinuedev:mainfrom
Open
docs(openrouter): document automatic identification headers#12216mvanhorn wants to merge 1 commit intocontinuedev:mainfrom
mvanhorn wants to merge 1 commit intocontinuedev:mainfrom
Conversation
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
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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #12215
What changed
Adds an "App Identification Headers" section to
docs/customize/model-providers/top-level/openrouter.mdxcovering the three OpenRouter headers Continue now sends on every request:HTTP-Referer: https://www.continue.dev/X-OpenRouter-Title: ContinueX-OpenRouter-Categories: ide-extensionValues taken directly from
packages/openai-adapters/src/apis/OpenRouter.ts(theOPENROUTER_HEADERSconstant added in #11857 and extended in #11991), so the docs match the shipped code rather than inventing anything.Also documents that
requestOptions.headerstakes precedence (the spread order{...OPENROUTER_HEADERS, ...config.requestOptions?.headers}inOpenRouterApi), 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
grep -n "HTTP-Referer\|X-OpenRouter-Title\|X-OpenRouter-Categories" packages/openai-adapters/src/apis/OpenRouter.ts(lines 14–16).OpenRouterApiconstructor spreadsOPENROUTER_HEADERSbeforeconfig.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, andX-OpenRouter-Categories. Shows how to override them viarequestOptions.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.