# Discourse Chatbot 🤖

**URL:** https://meta.discourse.org/t/discourse-chatbot/256652
**Category:** Plugin
**Tags:** ai
**Created:** [March 1, 2023, 11:08am UTC](https://meta.discourse.org/t/discourse-chatbot/256652 "2023-03-01T11:08:25Z")
**Posts on this page:** 1
**Showing post:** 1124

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [August 3, 2026, 11:12am UTC](https://meta.discourse.org/t/discourse-chatbot/256652/1124 "2026-08-03T11:12:58Z")

</div>

# Recent PR summary — 1–3 August 2026

Several related PRs were merged across Discourse Chatbot and its extension plugins.

## Highlights

- Introduced advanced local reasoning strategies, including verify-and-revise, best-of-two, and uncertainty-guided reasoning.
- Added current OpenAI models and the new max reasoning effort.
- Added a semantic blocked-question gate using embedding similarity.
  - significant savings as uses embeddings to block subjects you don’t wish the bot to handle without costing you LLM tokens.

- Consolidated the basic and RAG implementations into a single DiscourseChatbot::Bot.
- Replaced bot-mode settings with trust-level built-in tool selectors.
- Renamed the extension API from “Function” to “Tool”.
- Replaced the SafeRuby based calculator tool with the constrained Dentaku expression evaluator - this is a big improvement in security, as despite its name, there are vulnerabilities in SafeRuby.
- Adopted Zeitwerk loading across Chatbot and its extension plugins.
- Moved location-specific tools into the Locations Early Access plugin (sponsor me to regain access)
- Improved calculator error recovery and support for common π/e notation.
- Refreshed the README
- Advanced the main plugin from version 1.8.0 to 2.4.1.

## Discourse Chatbot

- #162 — FIX: Preserve Responses API reasoning state ([FIX: Preserve Responses API reasoning state - Pull Request #162 - merefield/discourse-chatbot - GitHub](https://github.com/merefield/discourse-chatbot/pull/162))  
Made Responses API reasoning and tool continuations reliable, introduced configurable iteration and token limits,  
improved URL provenance validation, preserved useful partial responses, and prevented blank or malformed responses  
from being accepted.

- #163 — FEATURE: Add advanced local reasoning strategies ([FEATURE: Add advanced local reasoning strategies - Pull Request #163 - merefield/discourse-chatbot - GitHub](https://github.com/merefield/discourse-chatbot/pull/163))  
Added simple, verify-and-revise, best-of-two, and uncertainty-guided reasoning strategies for Chat Completions, with  
bounded auxiliary requests and staff-visible audit records.

- #164 — FEATURE: Add current OpenAI models ([FEATURE: Add current OpenAI models - Pull Request #164 - merefield/discourse-chatbot - GitHub](https://github.com/merefield/discourse-chatbot/pull/164))  
Updated the model selectors with newer GPT-5.x and Pro variants, routed appropriate models through the Responses  
API, and added max reasoning effort.

- #165 — FIX: Improve calculator retry guidance ([FIX: Improve calculator retry guidance - Pull Request #165 - merefield/discourse-chatbot - GitHub](https://github.com/merefield/discourse-chatbot/pull/165))  
Gave models clearer calculator syntax and recovery guidance so correctable failures are retried appropriately.

- #166 — FEATURE: Add semantic blocked-question gate ([FEATURE: Add semantic blocked-question gate - Pull Request #166 - merefield/discourse-chatbot - GitHub](https://github.com/merefield/discourse-chatbot/pull/166))  
Added an optional embedding-based gate that can identify administratively defined blocked subjects and return canned responses before invoking the main model. It includes caching, staff auditing, fail-open behaviour, and custom embedding model support.

- #167 — DEV: Replace SafeRuby and adopt Zeitwerk loading ([DEV: Replace SafeRuby and adopt Zeitwerk loading - Pull Request #167 - merefield/discourse-chatbot - GitHub](https://github.com/merefield/discourse-chatbot/pull/167))  
Replaced the vendored SafeRuby evaluator with Dentaku, aligned namespaces and filenames with Zeitwerk, and modernised the plugin’s loading and lint configuration. Turned out there were vulnerabilities in SafeRuby, hence the migration.

- #168 — DEV: Extract Locations functions from Chatbot ([DEV: Extract Locations functions from Chatbot - Pull Request #168 - merefield/discourse-chatbot - GitHub](https://github.com/merefield/discourse-chatbot/pull/168))  
Removed location-specific tools and settings from the main plugin, allowing them to be supplied independently by discourse-locations.

- #169 — FEATURE: Replace bot modes with trust-level tool selection  
([FEATURE: Replace bot modes with trust-level tool selection - Pull Request #169 - merefield/discourse-chatbot - GitHub](https://github.com/merefield/discourse-chatbot/pull/169))  
This was the main architectural rationalisation:

- #170 — FIX: Improve calculator tool recovery ([FIX: Improve calculator tool recovery - Pull Request #170 - merefield/discourse-chatbot - GitHub](https://github.com/merefield/discourse-chatbot/pull/170))  
Normalised familiar expressions such as Math::PI, Math.PI, Math::E, Math.E, and π into Dentaku-compatible syntax.  
Repeated unchanged invalid calls are now rejected with actionable guidance.

- #171 — DEV: Refresh chatbot documentation ([DEV: Refresh chatbot documentation - Pull Request #171 - merefield/discourse-chatbot - GitHub](https://github.com/merefield/discourse-chatbot/pull/171))  
Updated the README for the unified bot and tool architecture, reasoning strategies, blocked questions, calculator behaviour, limits, quotas, custom endpoints, image/PDF support, and current settings. Vision support is no longer described as experimental.

## Companion plugins

- discourse-locations #4 — FIX: Update Chatbot location extensions for tool API ([https://github.com/merefield/discourse-locations-early-access/pull/4](https://github.com/merefield/discourse-locations-early-access/pull/4))  
Migrated the extracted location integrations to DiscourseChatbot::Tool, placed them under Locations::Chatbot::Tools, and updated them for the unified bot.

- Function extension example #1 — FIX: Update example extension for Chatbot tool API ([FIX: Update example extension for Chatbot tool API - Pull Request #1 - merefield/discourse-chatbot-function-extension-example - GitHub](https://github.com/merefield/discourse-chatbot-function-extension-example/pull/1))  
Updated the example plugin to demonstrate DiscourseChatbot::Tool, Zeitwerk loading, tool-oriented settings and  
translations, and focused behaviour testing without legacy compatibility code.

---

_[View the full topic](https://meta.discourse.org/t/discourse-chatbot/256652)._
