Skip to content

Add OpenRouter app attribution headers#58

Merged
skye-harris merged 1 commit into
skye-harris:masterfrom
alexjurkiewicz:openrouter-app-attribution
Apr 13, 2026
Merged

Add OpenRouter app attribution headers#58
skye-harris merged 1 commit into
skye-harris:masterfrom
alexjurkiewicz:openrouter-app-attribution

Conversation

@alexjurkiewicz
Copy link
Copy Markdown
Contributor

  • Restores HTTP-Referer and X-Title headers to all API requests
  • These were removed in a15c17a as "unnecessary" but are used by OpenRouter for app attribution
  • Without them, the App shows as "Unknown" in the OpenRouter activity log rather than "Home Assistant"
  • HTTP-Referer points to this repo instead of the upstream HA integration

Restores the HTTP-Referer and X-Title headers that were removed in
a15c17a. These are used by OpenRouter for app attribution — without
them, the App shows as "Unknown" in the OpenRouter activity log.
HTTP-Referer points to this repo rather than the upstream HA integration.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@alexjurkiewicz
Copy link
Copy Markdown
Contributor Author

Example OpenRouter log of requests from the upstream integration and this one:
Screenshot 2026-04-13 at 9 17 19 am

@skye-harris
Copy link
Copy Markdown
Owner

Happy to add them back if theyre useful to you :)

Their removal was pretty early on and I wasn't really anticipating openrouter users to use this integration over the stock one at the time is my excuse :)

@skye-harris skye-harris merged commit 0e1ffdc into skye-harris:master Apr 13, 2026
@alexjurkiewicz
Copy link
Copy Markdown
Contributor Author

Thank you! Yes, I am a happy OpenRouter user. It doesn't seem like upstream is interested in working on the main integration.

There are a few "big" QoL changes that could happen for this integration. #1 would be to rename it from "Local LLM" to something a little more generic. As far as I know that would be a breaking change for existing users though... What do you think?

@alexjurkiewicz alexjurkiewicz deleted the openrouter-app-attribution branch April 13, 2026 14:13
@skye-harris
Copy link
Copy Markdown
Owner

There are a few "big" QoL changes that could happen for this integration. #1 would be to rename it from "Local LLM" to something a little more generic. As far as I know that would be a breaking change for existing users though... What do you think?

The local space is still my main target tbh, as at the end of the day that's the space that's primarily lacking in HA core, and what I can more readily test without signing-up for additional services :) I don't think renaming the integration is really a huge quality of life thing, as it doesn't affect how it works or provide any new functionality at all, and yeah if I don't rename the repository as well then people simply don't use the new name and just refer to it by the old name in the repo url anyway (as noted with my tools integration where its still referred to as llm intents after I renamed it when it no longer used the Intent system!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants