[PR #4149] [MERGED] chore: Add HTTP-Referer and X-Title headers for OpenRouter #8200

Closed
opened 2025-11-11 17:47:33 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/4149
Author: @arsaboo
Created: 7/27/2024
Status: Merged
Merged: 7/27/2024
Merged by: @tjbck

Base: devHead: openrouter


📝 Commits (1)

  • 2871476 Add HTTP-Referer and X-Title headers for OpenRouter

📊 Changes

1 file changed (+3 additions, -0 deletions)

View changed files

📝 backend/apps/openai/main.py (+3 -0)

📄 Description

Pull Request Checklist

  • Target branch: Pull requests should target the dev branch.
  • Description: Briefly describe the changes in this pull request.
  • Changelog: Ensure a changelog entry following the format of Keep a Changelog is added at the bottom of the PR description.
  • Documentation: Have you updated relevant documentation Open WebUI Docs, or other documentation sources?
  • Dependencies: Are there any new dependencies? Have you updated the dependency versions in the documentation?
  • Testing: Have you written and run sufficient tests for the changes?
  • Code Review: Have you self-reviewed your code and addressed any coding standard issues?

Description

The header information is not added to chat completion request currently. This results in unknown for the App in OpenRouter dashboard.

image


Changelog Entry

Added

  • HTTP-Referer and X-Title header information for chatcompletion requests to OpenRouter.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/open-webui/pull/4149 **Author:** [@arsaboo](https://github.com/arsaboo) **Created:** 7/27/2024 **Status:** ✅ Merged **Merged:** 7/27/2024 **Merged by:** [@tjbck](https://github.com/tjbck) **Base:** `dev` ← **Head:** `openrouter` --- ### 📝 Commits (1) - [`2871476`](https://github.com/open-webui/open-webui/commit/287147687ed671b519fa3649b0a39ae6795860eb) Add HTTP-Referer and X-Title headers for OpenRouter ### 📊 Changes **1 file changed** (+3 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `backend/apps/openai/main.py` (+3 -0) </details> ### 📄 Description ## Pull Request Checklist - [x] **Target branch:** Pull requests should target the `dev` branch. - [x] **Description:** Briefly describe the changes in this pull request. - [x] **Changelog:** Ensure a changelog entry following the format of [Keep a Changelog](https://keepachangelog.com/) is added at the bottom of the PR description. - [x] **Documentation:** Have you updated relevant documentation [Open WebUI Docs](https://github.com/open-webui/docs), or other documentation sources? - [x] **Dependencies:** Are there any new dependencies? Have you updated the dependency versions in the documentation? - [x] **Testing:** Have you written and run sufficient tests for the changes? - [x] **Code Review:** Have you self-reviewed your code and addressed any coding standard issues? --- ## Description The header information is not added to chat completion request currently. This results in `unknown` for the App in OpenRouter dashboard. ![image](https://github.com/user-attachments/assets/5445c0dc-6ab4-4c1e-8eb8-d6a6ff357784) --- ### Changelog Entry ### Added - HTTP-Referer and X-Title header information for chatcompletion requests to OpenRouter. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-11 17:47:33 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#8200