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’ as URL. The credentials are OK:
/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).