Discourse ai bot not working

AI-generated summary

Shin_210 reported that the Discourse AI bot wasn’t working despite following official documentation, enabling LLM selection, and configuring the API endpoint correctly. NateDhaliwal suggested checking logs, which Shin_210 shared, revealing an error. sam advised toggling the “user response API” setting, but the issue persisted Shin_210. After switching the endpoint to https://api.openai.com/v1/responses and enabling the corresponding box, testing succeeded but the bot still didn’t respond Shin_210. sam suspected authentication issues, but no new logs appeared Shin_210. sam questioned whether a persona was selected; Shin_210 confirmed it was. DevTeVe suggested trying Gemini models and avoiding Cloudflare’s AI gateway. Switching to Gemini didn’t resolve the issue, though requests were logged in Google AI Studio Shin_210. sam noted they couldn’t reproduce the issue and shared a working example. Shin_210 showed their UI differed, lacking a sidebar robot icon. sam suspected an outdated Discourse version. After upgrading, Shin_210 confirmed the AI bot began working. The root cause was likely an outdated Discourse version.


I have follow the official docs and configured the AI bot. After that I tried testing it but it didn’t work.

I did all the necessary work like enabling the LLM to be selected by AI bot, enable the AI bot for everyone. Config the LLM correctly (the AI summary does work).

Are there any errors in /logs?

yes, here it is

You probably have user response api ticked and it is not responses (or vica versa)

Toggle:

And then save and click the test button.


toggled it, clicked the test button, then saw this. Seems like the same error as in the log above

what endpoint do you have this pointed at?

https://api.openai.com/v1/chat/completions

you might as well use responses api for recent open ai models. tick the box and use:

https://api.openai.com/v1/responses


changed the url, ticked the box, tested successfully, yet still not working

look in logs, this is likely going to be auth related yoursite/logs

sorry, but I don’t see anything in logs after calling the AI bot


how did you start this discussion, by clicking on robot? it should have some persona, not seeing a persona there.

yes, by clicking on the robot, I did choose a valid persona, never get a response to see if the persona is displayed in the chat

Is there anything I can try?

My personal suggestion to get out of doubts try a Gemini model. If you happen to be using cloudflare’s AI gateway, do not!

So the problem is models provided by openAI?


switching to gemini didn’t fix the issue
Gemini did receive requests (in my Google AI Studio dashboard)

@sam please help me, or should I look elsewhere?

honestly I can not reproduce the issue…

The way it is meant to work is that you have a robot in your sidebar or header, click it and then talk to it:

I don’t know how you have this set up, or what version you are using.

How do you access your chat screen (I see you don’t have the robot icon)? Mine is just a small popup at the bottom of the screen