feat(openrouter): send HTTP-Referer and X-Title headers in core/llm OpenRouter class
Merged
RO
7mo ago+19+19+01234567890123456789-2-2-0123456789
Summary
- Adds
HTTP-Referer,X-OpenRouter-Title, andX-OpenRouter-Categoriesheaders to the core/llmOpenRouterclass, matching what #11857 did for the openai-adaptersOpenRouterclass - Uses
X-OpenRouter-Title(the newer official header) instead ofX-Title - Adds
X-OpenRouter-Categories: ide-extensionfor marketplace attribution - Deduplicates headers by exporting
OPENROUTER_HEADERSfrom openai-adapters and importing it in core - User-configured
requestOptions.headerstake precedence over the defaults
Builds on #11857
Test plan
- Verify OpenRouter requests from the core/llm path include
HTTP-Referer,X-OpenRouter-Title, andX-OpenRouter-Categoriesheaders - Verify user-configured
requestOptions.headerscan still override these defaults - Confirm the OpenRouter activity dashboard shows "Continue" in the App column