# Create custom LLM plugin or any other option?

**URL:** <https://meta.discourse.org/t/create-custom-llm-plugin-or-any-other-option/354147>\
**Category:** Product Support\
**Created:** [February 24, 2025, 12:50pm UTC](https://meta.discourse.org/t/create-custom-llm-plugin-or-any-other-option/354147 "2025-02-24T12:50:45Z")\
**Posts on this page:** 5\
**Page:** 1

## AI-generated summary

In a [Support](/t/create-custom-llm-plugin-or-any-other-option/354147) discussion titled "Create custom LLM plugin or any other option?", [Wurzelseppi](/t/-/354147/1) asks if it’s possible to create a custom LLM plugin for their corporate Discourse board, which cannot use public LLMs like ChatGPT. Their internal AI service uses a proprietary API requiring both API keys and OIDC-based authentication. [satonotdead](/t/-/354147/2) suggests using the existing plugin’s support for custom models/endpoints, or forking it for advanced needs. [pfaffman](/t/-/354147/3) encourages checking if the built-in AI plugin already supports their use case. [sam](/t/-/354147/4) confirms that if the internal API follows OpenAI-style interfaces, Discourse AI can be used out-of-the-box by defining a custom LLM. [Wurzelseppi](/t/-/354147/5) appreciates the help but expresses concern about the complex authentication (OIDC + API key), asking if customization of request handling is possible without forking. The consensus implies that while basic integration may work, advanced auth requirements likely necessitate forking and custom development.

<div class="post-metadata">

**Author:** ![Wurzelseppi](https://avatars.discourse-cdn.com/v4/letter/w/eada6e/32.png) [@Wurzelseppi](https://meta.discourse.org/u/Wurzelseppi)\
**Post date:** [February 24, 2025, 12:50pm UTC](https://meta.discourse.org/t/create-custom-llm-plugin-or-any-other-option/354147/1 "2025-02-24T12:50:45Z")

</div>

Hi all,

we´re hosting an discourse board within our corporate network. We can´t integrate ChatGPT or any other public LLM, but there is a big initiative in our company that creates an internal service for AI modules (including GPT).  
The have their own API, though, and I wanted to ask if it would be possible to write an custom LLM plugin?  
Or what other option do we have ?

The calls to this internal API have to be authenticated, and the API itself needs another API key, so there are several mandantory information that have to be provided upfront.

Any help would be much appreciated.

Thanks and Greetings,

WS

---

<div class="post-metadata">

**Author:** ![satonotdead](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/satonotdead/32/447830_2.png) [@satonotdead](https://meta.discourse.org/u/satonotdead)\
**Post date:** [February 24, 2025, 1:31pm UTC](https://meta.discourse.org/t/create-custom-llm-plugin-or-any-other-option/354147/2 "2025-02-24T13:31:03Z")

</div>

You can use custom models and/or endpoints with the current plugin.

Then, if you need to add more functionality, you can fork and maintain your own plugin as well.

---

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [February 24, 2025, 6:55pm UTC](https://meta.discourse.org/t/create-custom-llm-plugin-or-any-other-option/354147/3 "2025-02-24T18:55:19Z")

</div>

> [@Wurzelseppi](#):
>
> I wanted to ask if it would be possible to write an custom LLM plugin?

Yes, but have you installed the AI plugin to see what it supports already?

---

<div class="post-metadata">

**Author:** ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
**Post date:** [February 25, 2025, 1:01am UTC](https://meta.discourse.org/t/create-custom-llm-plugin-or-any-other-option/354147/4 "2025-02-25T01:01:32Z")

</div>

As long as your internal endpoints use a OpenAI type of API interfaces you can use Discourse AI as is and just define a custom LLM.

---

<div class="post-metadata">

**Author:** ![Wurzelseppi](https://avatars.discourse-cdn.com/v4/letter/w/eada6e/32.png) [@Wurzelseppi](https://meta.discourse.org/u/Wurzelseppi)\
**Post date:** [February 25, 2025, 7:44am UTC](https://meta.discourse.org/t/create-custom-llm-plugin-or-any-other-option/354147/5 "2025-02-25T07:44:09Z")

</div>

I´ll try it out. One big concern I´m having, though, is the authentication thing.  
It´s not only API key, but also OIDC based (corporate policy stuff 🙂 )…

Meaning I would need to somehow customize the way the board makes requests agains this API. Is that possible without forking and doing it myself ?

Thanks folks, you´re awsome time and again 👍
