-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Description
The OpenRouter API docs says to use:
const openRouter = new OpenRouter({
apiKey: '<OPENROUTER_API_KEY>',
defaultHeaders: {
'HTTP-Referer': 'https://myapp.com', // Your app's URL
'X-Title': 'My AI Assistant', // Your app's display name
},
});
but defaultHeaders doesn't exist in type SDKOptions.
There are the "xTitle" and "httpReferer" parameters instead, but they aren't working. I don't see them going anywhere in the SDK code.
The AI-generated request code, like in src/funcs/completionsGenerate.ts, doesn't include the HTTP-Referer and X-Title headers.
Metadata
Metadata
Assignees
Labels
No labels