# Self-Hosting an OpenSource LLM for DiscourseAI

**URL:** https://meta.discourse.org/t/self-hosting-an-opensource-llm-for-discourseai/290923
**Category:** Self-Hosting
**Tags:** ai
**Created:** [January 8, 2024, 8:39pm UTC](https://meta.discourse.org/t/self-hosting-an-opensource-llm-for-discourseai/290923 "2024-01-08T20:39:55Z")
**Posts on this page:** 1
**Showing post:** 8

<div class="post-metadata">

### Author: ![pacharanero](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pacharanero/32/500583_2.png) [@pacharanero](https://meta.discourse.org/u/pacharanero)
#### Post date: [January 20, 2026, 5:17pm UTC](https://meta.discourse.org/t/self-hosting-an-opensource-llm-for-discourseai/290923/8 "2026-01-20T17:17:35Z")

</div>

Would there be any way to add a custom HTTP header to the Discourse AI requests? We have a GPU-equipped server which we use for a variety of purposes, it has an OpenAI-compatible API but for security we have put it behind an API Management gateway, which requires a custom HTTP header (something like `SubscriptionKey`) and we supply our auth key here.

Note that this auth key is to get through the APIM, and is different from the API key one would supply for a service like the OpenAI API.

It would be great if there was a way to add Custom Headers in the setup of each LLM in the `admin/plugins/discourse-ai/ai-llms` setup page. Perhaps a 'Custom option in the ‘Provider’ dropdown, with additional options for use-cases like this?

---

_[View the full topic](https://meta.discourse.org/t/self-hosting-an-opensource-llm-for-discourseai/290923)._
