[Bug] Wrong attribution header when using OpenAI translation #94

Closed
opened 2026-04-05 16:16:02 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @monolithic827 on 2/1/2026

Describe the bug
When constructing the request to OpenAI API, we name the attribution header Referer:

2dab3733fd/src/stores/settings/advanced.js (L684)

However it looks like it should be named HTTP-Referer.

Here is a translation request in OpenRouter's activity log:

Image

And here is the same request with HTTP-Referer replacing Referer:

Image

Is there a reason to use Referer? Does OpenAI needs it like that?
If not I'll be happy to open a PR for this. It'll make tracking the requests from VRCX way easier 😄

Docs for reference: https://openrouter.ai/docs/app-attribution

To Reproduce

  1. Enable Bio Translate API

  2. Set provider to OpenAI

  3. Set API endpoint to https://openrouter.ai/api/v1/chat/completions

  4. Enter API key

  5. Select an AI model, I used z-ai/glm-4.5-air:free

  6. Optionally set a system prompt, I used:

    Your task is to translate bios from various languages to English. Output only the exact bio in English. Try to convey language nuances and meanings that don't translate directly.

  7. Save

  8. Translate any bio

  9. See the app attribution in https://openrouter.ai/activity

Expected behavior
The requests should be attributed to VRCX and not show up as Unknown

Screenshots
Added above

What version you are running
Compiled from source @ 2dab3733fd3d64bcce0ab32844ac5f32a67a58cb

*Originally created by @monolithic827 on 2/1/2026* **Describe the bug** When constructing the request to OpenAI API, we name the attribution header `Referer`: https://github.com/vrcx-team/VRCX/blob/2dab3733fd3d64bcce0ab32844ac5f32a67a58cb/src/stores/settings/advanced.js#L684 However it looks like it should be named `HTTP-Referer`. Here is a translation request in OpenRouter's activity log: <img width="1367" height="63" alt="Image" src="https://github.com/user-attachments/assets/0da87504-87a5-4789-9f2c-c2bf16a5588e" /> And here is the same request with `HTTP-Referer` replacing `Referer`: <img width="1369" height="64" alt="Image" src="https://github.com/user-attachments/assets/46eae697-b849-4bad-82b4-491016e15eb9" /> Is there a reason to use `Referer`? Does OpenAI needs it like that? If not I'll be happy to open a PR for this. It'll make tracking the requests from VRCX way easier 😄 Docs for reference: https://openrouter.ai/docs/app-attribution **To Reproduce** 1. Enable `Bio Translate API` 2. Set provider to `OpenAI` 3. Set API endpoint to `https://openrouter.ai/api/v1/chat/completions` 4. Enter API key 5. Select an AI model, I used `z-ai/glm-4.5-air:free` 6. Optionally set a system prompt, I used: > Your task is to translate bios from various languages to English. Output only the exact bio in English. Try to convey language nuances and meanings that don't translate directly. 7. Save 8. Translate any bio 9. See the app attribution in https://openrouter.ai/activity **Expected behavior** The requests should be attributed to VRCX and not show up as `Unknown` **Screenshots** Added above **What version you are running** Compiled from source @ [`2dab3733fd3d64bcce0ab32844ac5f32a67a58cb`](https://github.com/vrcx-team/VRCX/tree/2dab3733fd3d64bcce0ab32844ac5f32a67a58cb)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/VRCX#94