v0.1.3 — Code file attachments
Release Notes — 0.1.3
Tag: 0.1.3
Date: 2026-06-16
Tagline: "Attach source code files as context in Brainstorming and Algorithm Design"
✨ Features
Code file attachments
- Brainstorming — New Attach Code button alongside PDF attachments, plus a paperclip button in the NodeChat input bar. Supports
.py,.js,.ts,.java,.go,.rs, and 30+ other text/code extensions. - Algorithm Design — Attach code files above the prompt; their contents are injected into the graph run as context.
- Backend — New
POST /upload_code_filesendpoint reads uploaded source files (UTF-8 with fallback), caps total context at 50k chars, and returns fenced code blocks for the LLM.
Files
app.py—/upload_code_filesendpoint; algorithm mode merges attached code into promptindex.html— attachment UI for both modesjs/components/node-chat.js— paperclip attach button in chat inputcss/node-chat.css— attach button styles
Release Notes — 0.1.2
Tag: 0.1.2
Date: 2026-06-15
Tagline: "Unlimited QNN dimensions with a live memory estimator for 8 GB laptops"
✨ Features
Unlimited agent spanning (width × height)
- Algorithm Design — CoT trace depth is no longer capped at 32. New
Manual width (unlimited) mode lets you set any number of agents per
layer; MBTI archetypes cycle when width exceeds the checkbox count. - Brainstorming — Manual/Massive topology layers and width inputs no longer
cap at 10,000. Backend accepts any positive integer the user enters.
QNN Memory Estimator
A live calculator panel in both Algorithm Design and Brainstorming
modes shows:
- Total agents (
width × height) and estimated total state size in MB/GB - Per-agent RAM at the selected epoch count
- 8 GB laptop fit check with headroom / overflow warning and a suggested
max agent count - Expandable single-agent growth table (epochs 1–10) as an educated guess
based on runtime constants: ~30 KB persona, ~5–8 KB/epoch memory append,
~450 KB summarization cap per agent
Users can adjust the laptop RAM input (default 8 GB); local LlamaCpp reserves
~1.5 GB for the model automatically.
Files
js/components/memory-calculator.js— estimator moduleindex.html— calculator UI, unlimited dimension inputs, algorithm manual width toggleapp.py— removed 10k backend caps; algorithm manual width with MBTI cycling
Release Notes — 0.1.1
Tag: 0.1.1
Date: 2026-06-10
Tagline: "Perplexity chart no longer accumulates duplicate points across anchors / modes"
🐛 Bug Fixes
Perplexity chart accumulation (BUG-12)
The "Average Perplexity per Epoch" chart could keep adding duplicate data points
every time a new run (or new anchor within a multi-anchor distillation) emitted
a perplexity value, because the frontend blindly pushed onto a parallel-arrays
state and the chart instance was destroy()-and-recreated on every update.
Compounding the issue:
- The distillation loop creates a fresh
DistillationGraphper anchor, so
each anchor'sepochs_runcounter reset to 1. The frontend received the
same epoch label (e.g.epoch=1) from multiple anchors and treated each
one as a new data point. - The main-graph
calculate_metrics_node(used by both Algorithm and
Brainstorming modes) was broadcasting{"epoch": ..., "perplexity": ...}
as a bare JSON, but the frontend SSE filter only routeddistillation_update
events to the chart, so algorithm/brainstorm perplexity was silently dropped. - The chart code itself was a
destroy()+new Chart(...)anti-pattern
that flickered on every update, and the labels variable was misspelled
(allLbelsData) — a footgun for future fixes.
Fix
-
Backend (
app.py):calculate_metrics_nodenow broadcasts a typed
{"type": "perplexity_update", "source": "graph", "session_id": ..., "epoch": ..., "perplexity": ...}
event so algorithm and brainstorm runs feed the chart.- The distillation loop now tracks a
cumulative_stepcounter that
strictly increases across both epochs and anchors, and includes it in
thedistillation_updatepayload asstep.
-
Frontend (
index.html):- Chart state rewritten from parallel arrays (
allLbelsData/allPerplexityValues)
to a singleMapkeyed by step, with values stored as{value, label}. updatePerplexityChart(step, value, label)now replaces an existing
entry instead of appending a duplicate.renderPerplexityChartuses Chart.js v4's idiomatic
chart.data.datasets[0].data = ...; chart.update('none')for in-place
updates instead of destroying and recreating the chart.resetPerplexityChartresets state and clears the chart on every new
algorithm or distillation run.- SSE handler now recognizes the new
perplexity_updateevent type in
addition todistillation_update. - The misspelled
allLbelsDatais gone.
- Chart state rewritten from parallel arrays (
-
Tests (
tests/phase11_regression.py):- New BUG-12a regression: directly invokes the metrics node and asserts
the broadcast JSON includestype: "perplexity_update",source: "graph",
session_id, and a numericperplexity. - New BUG-12b regression: source-checks the distillation loop for the
cumulative_stepcounter and"step":field in the broadcast. - New BUG-12c regression: source-checks
index.htmlfor the dedup-by-step
contract (no legacyallLbelsData/allPerplexityValues, presence of
perplexityByStep/resetPerplexityChart/SSE listener for
perplexity_update) and asserts the dedup invariant against a Python
mirror of the JS algorithm.
- New BUG-12a regression: directly invokes the metrics node and asserts
Verification
All previously-passing tests still pass (158/158 across phases 1–9). The
4 unrelated pre-existing failures in phase 10/11 are due to a stale
local-deepthink path in the test file and are out of scope for this
release.
Release Notes — 0.1.0
Tag: 0.1.0
Date: 2026-06-06
Tagline: "Official release out of beta"
This marks the first official non-beta release of open-deepthink. The core QNN engine, Mirror Descent loops, three operating modes, export/import, and full test suite are considered stable.
See the new "Future Directions" section in the README for thoughts on integrating QNN-style evolutionary exploration into practical coding agent workflows (e.g. a /qnn command for large-scale structured brainstorming on sticky problems).
Release Notes — beta-0.0.3
Tag: beta-0.0.3
Date: 2026-06-05
Tagline: "The hard-fought quality release — 11 bugs fixed, 195/195 tests passing"
"A week of debugging is better than a month of 'works on my machine'."
This release is the result of a complete, exhaustive test suite of the entire
codebase (11 phases × 195 checks). Every previously-known failure path was
either fixed or pinned with a regression test. No known malfunctions remain.
🐛 Bug Fixes
Critical (broke core flows)
-
DistillationMockLLMhad stale prompt patterns (app.py)
The chains indistillation_chains.pyhad been rewritten ("Socratic Task
Master…", "Seed Creator (The Dialectic Synthesizer)", "deepening our
inquiry in a new Epoch") but the mock LLM still matched the OLD text.
In debug mode, every distillation epoch silently failed to evolve
topics or generate new questions. Fixed by re-aligning the patterns. -
CoderMockLLMhardcoded 4 sub-problems (app.py)
The mock decomposer returned the same static 4-item list regardless of
the requested count, soreframe_and_decomposealways failed for
non-4-agent QNNs. Fixed by reading the requested count from the prompt. -
Missing
grandalfdependency (requirements.txt)
graph.get_graph().draw_ascii()requiresgrandalf; without it, the
entire/build_and_run_graphendpoint crashed with a confusing error.
Addedgrandalftorequirements.txt. -
synthesis_nodereturned "no inputs" in brainstorm mode (app.py)
The empty-agent_outputscheck fired before the brainstorm branch,
but brainstorm synthesis reads frommemory, notagent_outputs.
Reordered the checks so brainstorm mode can synthesize.
Medium (data/UX quality)
-
Duplicate
get_opinion_synthesizer_chain(chains/init.py)
Two modules defined functions with the same name; the import order
silently shadowed the synthesis version with the brainstorm version.
Renamed the brainstorm one toget_brainstorming_opinion_synthesizer_chain. -
app.GraphStatemissing brainstorm fields (app.py)
app.GraphStatewas missingbrainstorm_document_context,
brainstorm_prior_conversation, andbrainstorm_problem_summarythat
the code accesses. Runtime worked because ofstate.get(...), but
the type was lying. Added the fields. -
clean_and_parse_jsoncouldn't repair Windows backslash paths (utils.py)
Strings like{"path": "C:\\Users\\foo"}(single backslashes, as an
LLM would write) were returned asNone. Fixed the regex to not
double-escape already-escaped backslash pairs (needed non-capturing
group(?:\\)to make the lookbehind work in Python'sremodule).
Low (hygiene)
-
Stray
print()statements inTokenUsageTracker,
RAPTOR._cluster_nodes, and both chat endpoints — all converted to
log_stream.put(...)so logs flow through the SSE broadcast. -
Typo "Sesion" in
/chatand/diagnostic_chatprint statements —
fixed to "Session" and routed throughlog_stream. -
.gitignoremissedvenv/,tests/,distillation_output/,
test_results/. Updated. -
No
__version__orpyproject.toml— release tracking was
impossible. Added__version__ = "0.0.3-beta",__release_name__,
__release_tag__, and apyproject.tomlwith project metadata- all dependencies.
✨ Improvements
deepthink/__init__.pynow exposes__version__,__release_name__,
__release_tag__for runtime introspection.pyproject.tomlenablespip install -e .workflows and standard
packaging. It pinsgrandalf(alongside all other deps).tests/directory contains 11 numbered test phases covering: imports,
utilities, chain factories, state types, FastAPI routes, distillation,
mock LLM patterns, graph nodes, end-to-end HTTP, static analysis,
and regression tests for every bug fixed in this release.
🧪 Test Suite
The release ships with a 195-check, 11-phase test suite. To run:
# Phase 1-8, 10, 11 (pure unit tests, no network)
venv/Scripts/python.exe tests/phase1_imports.py
venv/Scripts/python.exe tests/phase2_utils.py
...
venv/Scripts/python.exe tests/phase11_regression.py
# Phase 9 (requires a real FastAPI test client; ~60s)
venv/Scripts/python.exe tests/phase9_e2e.pyFinal tally:
| Phase | Subject | Result |
|---|---|---|
| 1 | Module imports & structure | 7/7 ✅ |
| 2 | utils.py (JSON repair, sandbox) | 15/15 ✅ |
| 3 | All 30 chain factories construct | 34/34 ✅ |
| 4 | state.py GraphState consistency | 5/5 ✅ |
| 5 | FastAPI endpoints surface | 18/18 ✅ |
| 6 | DistillationGraph end-to-end | 20/20 ✅ |
| 7 | Mock LLM prompt patterns | 21/21 ✅ |
| 8 | LangGraph nodes | 18/18 ✅ |
| 9 | Live HTTP API via TestClient | 20/20 ✅ |
| 10 | Static analysis, packaging | 23/23 ✅ |
| 11 | Regression tests (this release) | 14/14 ✅ |
| Total | 195/195 ✅ |
📦 Install
pip install -r requirements.txt # adds the new grandalf dep
# or, with the new pyproject.toml:
pip install -e .
python app.py
# → http://localhost:8000🔬 For Contributors
- Read
tests/phase11_regression.pybefore merging — every bug fixed in
this release has a regression test there. Add new tests next to the
relevant one. - All new code should be importable from
deepthink(the library) and
uselog_stream.put(...)(notprint) for runtime logging. - Avoid redefining factories with the same name across multiple
deepthink/chains/*.pymodules. If you must, give them a module-
specific prefix (e.g.get_brainstorming_*).
👥 Acknowledgments
This release exists because we did the boring work: enumerate every
feature, write a test for it, fix what broke, and pin it. The codebase
is now measurably more robust than it was a week ago.
— the open-deepthink maintainers