refactor: use X-OpenRouter-Title and add X-OpenRouter-Categories header

- Replace X-Title with X-OpenRouter-Title (the newer official header)
- Add X-OpenRouter-Categories: ide-extension for marketplace attribution
- Use "Continue" as the title (the product name)
This commit is contained in:
Dallin Romney 2026-04-01 12:48:14 -07:00
parent 43540d058c
commit 25186c7bcb
2 changed files with 4 additions and 2 deletions

View file

@ -7,7 +7,8 @@ import OpenAI from "./OpenAI.js";
const OPENROUTER_HEADERS: Record<string, string> = {
"HTTP-Referer": "https://www.continue.dev/",
"X-Title": "Continue.dev",
"X-OpenRouter-Title": "Continue",
"X-OpenRouter-Categories": "ide-extension",
};
class OpenRouter extends OpenAI {

View file

@ -12,7 +12,8 @@ export interface OpenRouterConfig extends OpenAIConfig {
const OPENROUTER_HEADERS: Record<string, string> = {
"HTTP-Referer": "https://www.continue.dev/",
"X-Title": "Continue.dev",
"X-OpenRouter-Title": "Continue",
"X-OpenRouter-Categories": "ide-extension",
};
export class OpenRouterApi extends OpenAIApi {