# How to use internal AI endpoints?

**URL:** <https://meta.discourse.org/t/how-to-use-internal-ai-endpoints/405831>\
**Category:** Support\
**Tags:** ai\
**Created:** [June 22, 2026, 6:47pm UTC](https://meta.discourse.org/t/how-to-use-internal-ai-endpoints/405831 "2026-06-22T18:47:05Z")\
**Posts on this page:** 1\
**Showing post:** 5

<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:** [June 22, 2026, 11:50pm UTC](https://meta.discourse.org/t/how-to-use-internal-ai-endpoints/405831/5 "2026-06-22T23:50:39Z")

</div>

Well, I tested the endpoint with SSL within Discourse (app container) and it works, but not from the Discourse AI UI test.

I’m using ‘OpenAI’ Provider with ‘[https://llm.mydomain.tld/v1/chat/completions](https://llm.mydomain.tld/v1/chat/completions)’ as URL. The credentials are OK:

```plaintext
/var/www/discourse/plugins/discourse-ai/lib/completions/endpoints/base.rb:182:in 'DiscourseAi::Completions::Endpoints::Base#perform_completion!'
/var/www/discourse/plugins/discourse-ai/lib/completions/endpoints/open_ai_shared.rb:28:in 'DiscourseAi::Completions::Endpoints::OpenAiShared#perform_completion!'
/var/www/discourse/plugins/discourse-ai/lib/completions/llm.rb:214:in 'DiscourseAi::Completions::Llm#generate'

pitchfork-0.18.2/lib/pitchfork/soft_timeout.rb:46:in 'Pitchfork::SoftTimeout::Request#interrupt'
pitchfork-0.18.2/lib/pitchfork/soft_timeout.rb:94:in 'block (2 levels) in Pitchfork::SoftTimeout#create_timeout_thread'
pitchfork-0.18.2/lib/pitchfork/soft_timeout.rb:93:in 'Array#each'
pitchfork-0.18.2/lib/pitchfork/soft_timeout.rb:93:in 'block in Pitchfork::SoftTimeout#create_timeout_thread' 

```

It’s strange, and I’ve been trying to get it done for weeks.

* * *

Already tried this:

**EDIT 1:** `DISCOURSE_ALLOWED_INTERNAL_HOSTS: 172.16.X.X` _(LiteLLM container IP, 127.0.0.1 and the SSL terminated LLM domain host I understand is not requested to be here)_

**EDIT 2:** And I see the same 500 error when trying to enter to configure my MCP server (MCP discourse-ai tab configuration).

---

_[View the full topic](https://meta.discourse.org/t/how-to-use-internal-ai-endpoints/405831)._
