Many reasoning-capable models — including OpenAI OSS, MiniMax M2, and others — currently underperform in TypingMind when tool calls are involved.
The root cause: TypingMind does not preserve the reasoning_details field between requests.
This field is critical for continuity — without it, models “forget” mid-reasoning steps and often fail partial tool invocations.
This lightweight extension fixes that.
This extension automatically:
- Intercepts all LLM responses in TypingMind that contain
reasoning_details. - Caches those reasoning segments locally.
- Restores them on subsequent turns by injecting the correct
reasoning_detailsback into the next request.
It works transparently for both streaming and non-streaming completions.
Each response is uniquely cached and matched back to the correct assistant message through a safe two-step process:
-
Response ID match When possible, the model’s
response.id(from the streamed JSON events) is bound to the assistant message that originated it. Subsequent requests use this ID to recover and re-inject the correctreasoning_details. -
Content-level fallback If a conversation branch is forked or a message ID changes, the extension falls back to a hash of the message’s content + tool calls to ensure stable mapping.
- Message chain starts: reasoning continuity begins purely from content — safe and deterministic.
- Ongoing conversations: reasoning data is preserved automatically across steps.
- Forked conversations: if a user rewinds and edits a previous turn, mismatched reasoning data is ignored safely.
This does not preserve reasoning continuity across:
- Different browsers or devices
- Reloaded TypingMind sessions (cache is in-memory only)
- Edited or truncated message histories that no longer match ID or content hashes
These constraints are deliberate to prevent reasoning corruption.
At the top of script.js, you’ll find an array like:
const ALLOWED_ENDPOINTS = [
"https://openrouter.ai/api/v1",
"https://api.minimax.chat/v1",
];Only requests sent to these endpoints will be patched to preserve reasoning continuity. You can add, remove, or change entries to match your own setup — for example, if you self-host OpenRouter or use a custom proxy.
No manifest or bundling required — it’s a single-file TypingMind extension.
-
Fork this repository and adjust the endpoint list if needed.
-
Commit your edits, then choose one of the two supported hosting methods:
https://cdn.jsdelivr.net/gh/<your-username>/typingmind-reasoning-support@main/script.jsCreate a Gist containing your
script.js, then use its.jsURL:https://gist.github.com/<your-gist-id>.js -
In TypingMind:
- Open Settings → Extensions → Add Extension
- Paste the URL of your hosted script
- Click Install, then refresh the page
When loaded successfully, you’ll see this in the console:
✅ Reasoning Continuity Extension active
The script works by:
- Hooking into TypingMind’s internal Webpack stream parser (which processes the
response.*events). - Capturing
reasoning_detailsdeltas as they arrive. - Injecting them back into the next outgoing request payload before the network call is sent.
Both streamed and non-streamed responses are supported via unified caching logic.
You can enable debug output to inspect how the reasoning continuity cache behaves. Simply open your browser console and type:
window.debugReasoning = true;This enables detailed logs showing:
- When reasoning chunks are captured (
reasoning_detailsdeltas) - When reasoning data is restored and merged into the next request
- When cache entries are created, matched, or pruned
Disable logging again by running:
window.debugReasoning = false;This feature is purely local and has no network or privacy implications — it’s only for development visibility.
Built by Teja Sunku and ChatGPT 5 to improve TypingMind’s support for reasoning-capable models. If you find it useful, please consider leaving a ⭐ on the repo.
GitHub: 👉 https://github.com/tejasunku/typingmind-reasoning-support