From 9235a75e6f177ee55d2d08abe4a45cba3a8b65a3 Mon Sep 17 00:00:00 2001 From: Danila Poyarkov Date: Sun, 1 Mar 2026 10:58:22 +0300 Subject: [PATCH] Report app name to OpenRouter via X-OpenRouter-Title header --- src/composables/use-chat.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/composables/use-chat.ts b/src/composables/use-chat.ts index b0fd29755..195913e38 100644 --- a/src/composables/use-chat.ts +++ b/src/composables/use-chat.ts @@ -21,7 +21,13 @@ watch(apiKey, (key) => { const isConfigured = computed(() => apiKey.value.length > 0) function createAgent() { - const openrouter = createOpenRouter({ apiKey: apiKey.value }) + const openrouter = createOpenRouter({ + apiKey: apiKey.value, + headers: { + 'X-OpenRouter-Title': 'OpenPencil', + 'HTTP-Referer': 'https://github.com/dannote/open-pencil', + }, + }) return new ToolLoopAgent({ model: openrouter('anthropic/claude-sonnet-4'),