File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -138,6 +138,14 @@ export const sendCompletion = async (
138138 baseURL : provider . base_url ,
139139 // Use Tauri's fetch to avoid CORS issues only for openai-compatible provider
140140 ...( providerName === 'openai-compatible' && { fetch : fetchTauri } ) ,
141+ // OpenRouter identification headers for Jan
142+ // ref: https://openrouter.ai/docs/api-reference/overview#headers
143+ ...( provider . provider === 'openrouter' && {
144+ defaultHeaders : {
145+ 'HTTP-Referer' : 'https://jan.ai' ,
146+ 'X-Title' : 'Jan' ,
147+ } ,
148+ } ) ,
141149 } as ExtendedConfigOptions )
142150 if (
143151 thread . model . id &&
@@ -286,10 +294,10 @@ export const extractToolCall = (
286294 * @param calls
287295 * @param builder
288296 * @param message
289- * @param content
290- * @param approvedTools - Record of approved tools per thread
291- * @param showModal - Function to show approval modal, returns true if approved
292- * @param allowAllMCPPermissions - Global setting to allow all MCP permissions without modal
297+ * @param abortController
298+ * @param approvedTools
299+ * @param showModal
300+ * @param allowAllMCPPermissions
293301 */
294302export const postMessageProcessing = async (
295303 calls : ChatCompletionMessageToolCall [ ] ,
You can’t perform that action at this time.
0 commit comments