After updating to Discourse v3.3.0.beta6 and Discourse AI 9d887ad4, the AI bot stopped responding after starting a conversation, only updating titles without generating replies. Logs revealed a DiscourseAi::Completions::Llm::UNKNOWN_MODEL error. Testing LLMs via the admin panel showed no issues, but the bot failed to make LLM calls. The issue was traced to a specific persona with a user association, which was not working, while another similar persona without a user worked fine. The problem persisted after updating to v3.4.0.beta1. Ultimately, deleting and recreating the problematic persona resolved the issue, confirming that deleting a persona removes related embeddings from the database aas.
Discourse version: v3.3.0.beta6
AI version: 9d887ad4
It doesn’t matter which model I choose when starting a convo with the bot
I can see successful requests in the ai_api_audit_logs table.
when a user starts a convo, the only LLM call made is title bot call (“. You are titlebot. Given a topic, you will figure out a title.\nYou will never respond with anything but 7 word topic title.”)
the bot updates the title but doesn’t respond
Requests to our providers work fine - Discourse AI isn’t even attempting to make a call
Assuming you mean to click Edit next to an LLM and then scroll down and click Run Test, I get a success message for all enabled LLMs (anthropic and openai).
I changed the default model for the persona to gpt-4o. I tried starting a PM with the bot and it didn’t work. Switched the default model back to claude 3.5 sonnet and still doesn’t work. I also tried disabling and re-enabling the persona.
I tried a PM with a different persona that uses claude 3.5 sonnet, and it works fine. One difference between the two personas is that the one that isn’t working has a user associated with it. The other persona doesn’t and responds with the auto-created claude-3-5-sonnet user.
I suppose I could delete and recreate the broken persona? However, the broken persona uses uploaded docs. If I delete the broken persona, will the associated embeddings from the uploaded docs be deleted from postgres? I don’t mind regenerating the embeddings as that is quite cheap.
For anyone who might stumble upon this, I can confirm that deleting and recreating the persona fixed the issue. Also, deleting a person indeed removes the related items in the rag_document_fragments and ai_document_fragment_embeddings tables.