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)
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)
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)
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)
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)
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)
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)
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)
This was the main architectural rationalisation:- Replaced the separate basic and RAG bots with DiscourseChatbot::Bot.
- Added built-in tool selectors for each trust level.
- Made an empty selector equivalent to a simple, tool-free bot.
- Folded Vision and painting into the tool-selection system.
- Left externally supplied plugin tools outside the built-in selectors.
- Renamed Function terminology, settings and classes to Tool.
- Reordered, collocated and conditionally hid settings.
- Added migration handling for existing configurations.
- Made quota deductions concurrency-safe.
- Corrected response character limits, logging selection and binary PDF reading.
-
#170 — FIX: Improve calculator tool recovery (FIX: Improve calculator tool recovery - Pull Request #170 - merefield/discourse-chatbot - GitHub)
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)
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)
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)
Updated the example plugin to demonstrate DiscourseChatbot::Tool, Zeitwerk loading, tool-oriented settings and
translations, and focused behaviour testing without legacy compatibility code.