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:
parent
43540d058c
commit
25186c7bcb
2 changed files with 4 additions and 2 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue