Skip to content

Release 0.8.18: Claude Haiku 5.5 and model classes, HED on Haiku, a failed model names one to try - #606

Merged
neuromechanist merged 26 commits into
mainfrom
develop
Oct 11, 2026
Merged

neuromechanist merged 26 commits into
mainfrom
develop

Conversation

@neuromechanist

@neuromechanist neuromechanist commented Oct 10, 2026 •

Copy link
Copy Markdown
Member

Promotes develop to main: Claude Haiku 5.5 replaces Haiku 4.5 and becomes the default of every community, models are named by class, a failed request names a model to try, and the HED tag lookup works in the image.
Nine merged pull requests (#586, #592, #594, #599, #600, #601, #602, #604, #605), the fixes from this release's review (four commits, listed below), plus CI-owned version bumps.

What reaches production

Other communities

Community default_model on main After this merge
HED openai.gpt-6-luna haiku (Claude Haiku 5.5), reasoning_effort: high
EEGLAB openai.gpt-6-luna haiku, reasoning_effort: high
BIDS openai.gpt-6-luna haiku, reasoning_effort: high
NWB openai.gpt-6-luna haiku, reasoning_effort: high
NEMAR claude-sonnet-5-5 haiku, reasoning_effort: high
FieldTrip, MNE, MetaBCI, OpenNeuroPET claude-haiku-4-5 haiku (now 5.5), effort high when unset
  • Not measured: the HED and NEMAR answers on Haiku 5.5. NEMAR's figures from nemar_render_overview and browser-run code are image blocks, which Luna cannot take, so NEMAR had to stay a Claude model; whether Haiku 5.5 reads them as well as Sonnet 5.5 did is open.
  • Haiku 5.5 costs about what Luna does per token, so HED's budget alerts ($5 a day, $50 a month) no longer fire at a ninth of the traffic. A prompt above 100,000 tokens is billed at five times the rate, and the conversation budget (80,000 estimated tokens plus the system prompt) may reach that line on a long conversation.
  • No community needs the Bedrock key any more; it matters only for a reader who picks Luna, Qwen3 Next or gpt-oss-120b from the widget's model menu. ANTHROPIC_API_KEY is now required for every community's default.

Compatibility

  • The error text of a failed request changes, and suggested_model is a new optional field. A client that matches the old string "Please choose another model." needs updating.
  • The widget's bytes change (frontend/osa-chat-widget.js), so its integrity hash changes. A page that pins the widget by hash (nemar.org) keeps the old widget, which works, but does not get the idle timer, the model button or the host-style fix until it is re-pinned.
  • ANTHROPIC_THINKING_BUDGET_TOKENS is ignored, and get_settings logs a warning naming reasoning_effort when it is still set.
  • DEFAULT_MODEL is now validated at startup (src/api/config.py, new in this release): a value that is not an offered model or class, such as an OpenRouter slug like openai/gpt-oss-120b, stops the server from starting. The changelog says so.
  • The image build now clones hed-standard/hed-lsp and runs pnpm install in a Node 22 stage, so a build needs GitHub and npm to be reachable.

Review

The six pr-review-toolkit agents (code-reviewer, run twice for backend and for the widget, silent-failure-hunter, pr-test-analyzer, comment-analyzer, type-design-analyzer, code-simplifier) reviewed the full main...develop diff at 2655af1, each started with the sonnet model alias at high effort. No reviewer found a critical defect.
The code-simplifier ran advisory only. I checked the findings below against the code before acting on them; the suggestions are as the reviewers reported them.

Important: fixed on develop

  1. The long-prompt rate was applied to token totals summed over a whole reply, not to one prompt (8e6fee1). estimate_cost switched to $0.50 / $2.50 once its input passed 100,000, but the callers passed the sum of every model call in the reply, and the FAQ estimator passed corpus totals. A tool loop of five calls with 25,000-token prompts has a sum of 125,000 and no prompt near the line, and the whole reply was priced at five times the rate: on the usage line the reader sees, in the request log, and in the budget alerts.
    estimate_cost now takes the largest single prompt (longest_prompt_tokens) and decides the tier on it. The two streams track it per model call, the non-streamed path takes it from the largest model message, and the FAQ estimator passes its longest thread. A caller that passes nothing still prices one call. When one call of several is over the line, the whole reply is priced at the long rate, which can overstate the calls that were not; that is documented on estimate_cost.
    New tests script replies of three runs of 40,000 tokens (sum 120,000) and of runs of 10,000 and 100,002 through the real graph and streams, streamed and not, and check the usage line and the logged request row against prices written out by hand. Run against the old src, the three base-rate tests fail and the long-rate ones pass.
  2. The release notes named classes that are refused (b8e1bae, 617d640): CHANGELOG.md and ADR 0016 now say that haiku, sonnet and luna are accepted and the other five are refused until offered.
  3. A live-test run with no keys passed with every test skipped (204454e): the credential step fails the job when none of the three keys is set (tried with none, one, and a base URL without a workspace ID). .rules/testing.md, .rules/ci_cd.md and the comment in notebook-site-check.yml now say the job runs by hand and fails without a key.
  4. Prose that the move to Haiku 5.5 made wrong (b8e1bae): ADR 0014, 0015 and 0016 (update notes in the ADRs' existing style), .context/yaml_registry.md, .env.example (the Bedrock models are priced at or below $1 / $5, not "at or below Claude Haiku"), the NWB and NEMAR reasoning comments, and the HED prompt's "valid tags" (now "candidate tags", as the tool's own description says).
  5. Changelog gaps (617d640): [Unreleased] is retitled [0.8.18] - 2026-10-10, with entries for fix: build hed-suggest into the image so suggest_hed_tags works #599, fix: HED prompt asks for one validated annotation per event #600, fix: keep host page styles off code, lists and text in widget replies #601 and ci: run the OpenRouter live tests with the testing key only #605. docs: documentation-only changes skip CI [skip ci] #586 changed AGENTS.md only, and has none.
  6. The DEFAULT_MODEL startup check (617d640): a changelog entry says it, with the OpenRouter slug example. The servers' own .env files are not in the repository; see the checklist.

The full unit suite as CI runs it (pytest --ignore=tests/test_integration -m "not network and not llm") passed locally on the fixed code: 5165 passed, 15 skipped. ruff check and ruff format --check pass.

Still open (suggestions, not done)

  • Tests: assert suggested_model on the Anthropic-unavailable and both OpenRouter failure tests; add a no-BYOK refusal test for a class name or retired id of a different offered model against a Haiku default (_same_model decides who skips the key); test_the_constants_are_the_classes_ids, test_the_two_models_really_differ and test_strategy_estimate_uses_the_shared_pricing_table cannot fail; about 36 Python and 21 JS literals of claude-sonnet-5-5 will break when the sonnet class moves; frontend/test-widget-paced-streaming.js:1939 uses a 200 ms limit with 100 ms gaps and may flake on a loaded runner.
  • Behavior and errors: the error banner names the server's model, but the widget replaces it with its own pick when the server's is not in the menu or not allowed for the reader's key, and shows no button after partial output or on the non-streamed step-limit error; retryable: true on the step-limit error means "only on another model" where it means "the same call can work" for every other kind; suggest_hed_tags returns [] for a refused term, the same as no match; an old model id in a config runs the current model with no log line; a blank DEFAULT_MODEL passes validation; default_model: opus loads with only a warning; the widget's cleanup has two empty catch {}.
  • Types: moving a class to a new id carries the old generation's price, reasoning levels and thinking-off value forward with nothing failing at import; suggested_model is an untyped dict built from an anonymous tuple; LongPromptRate is not validated at import.
  • Simplifications: the temperature branch in create_anthropic_llm cannot run, because SAMPLING_MODELS holds only Bedrock models and that function refuses them; _current_slug_for_retired duplicates _to_openrouter_model_via_canonical; suggest_another_model has a three-step cascade where two steps do; the widget's "Stream timeout" branch and one idle.touch() are redundant; the FAQ summarizer builds two identical clients; ModelRate(2.00, 10.00) is written four times.
  • Widget timing: the old stall check could not fire, so the effective limit was 120 s from the request; the new one enforces 60 s of real silence, including before the first word. A high-effort reply that is quiet for 60 to 120 s used to succeed and now times out. Worth checking against Haiku 5.5's real latencies.

Reported but not confirmed

  • The widget reviewer's only 80-confidence finding was that all: revert on .osa-tool-code code changes the code card's font. In Chromium the <code> element computes font-family: monospace with and without the rule, because the browser's own stylesheet sets it, and main has no widget rule that made it inherit the card's stack. I did not count it. This was a plain page on Linux, not a real host page.

Found sound

Class resolution and previous-generation aliasing; request shapes on the Anthropic, Bedrock and OpenRouter paths; step-limit handling (not replayed, logged at WARNING); the fetcher and markdown cleaner changes; the hed-suggest environment restriction; the Dockerfile gate and the CI smoke test; the idle timer (stopped on every exit path traced), no double send from the retry button, no new unescaped HTML; and the new tests, which use real clients and wire shapes and no mocks. ADR 0016's numbers check out.

Version

src/version.py carries the .devN suffix. ensure-stable-version.yml strips it on main; it is not hand-bumped.

Before merge

  • CI is green on the head of develop
  • The live model tests are run once from Actions > Tests > Run workflow, with haiku and then sonnet (paid calls). The new request shapes (Haiku thinking: {"type": "disabled"}, Sonnet between_tools, output_config.effort) are checked against the real API only there, and only Sonnet has a live thinking-off test.
  • The production and dev .env files are checked for a DEFAULT_MODEL that is not an offered model or class (the server will not start with one) and for ANTHROPIC_THINKING_BUDGET_TOKENS (a startup warning)

After merge

  • ensure-stable-version.yml sets 0.8.18 and tag-release.yml tags it
  • The v0.8.18 GitHub release is published, docker-build.yml moves latest (its hed-lsp stage and the suggest_hed_tags smoke test pass), and production pulls it hourly
  • https://api.osc.earth/osa/health reports 0.8.18 after the hourly pull, and ANTHROPIC_API_KEY is set on the production container
  • A HED question that needs tag suggestions answers in the production container, and the log has no hed-suggest error
  • A question to each of HED, EEGLAB, BIDS, NWB and NEMAR answers on Claude Haiku 5.5, and NEMAR's figures are read correctly
  • The widget on the sites that embed it (nemar.org pins the integrity hash) is re-pinned to v0.8.18 with the SRI hash in the release notes (or scripts/widget-sri.py v0.8.18)
  • Daily and monthly cost for HED, EEGLAB, BIDS, NWB and NEMAR are looked at after a day of traffic
  • sync-develop.yml opens its PR into develop; if it fails, follow the recovery notes at the top of that workflow

🤖 Generated with Claude Code

https://claude.ai/code/session_019MtQNfPzMpGxEJFUciXbTN

github-actions Bot and others added 19 commits October 7, 2026 04:44
…p-after-v0.8.17

chore: sync develop with main after v0.8.17
Writes the rule down: a change that touches only documentation carries [skip ci]
in its commit subject and its pull request title, and an admin merges it, since
the required checks never report on a skipped pull request. Never for code,
configuration, tests, workflows, src/ or frontend/, and never for a release.

Not code: AGENTS.md only.
* Run HED on Claude Haiku 4.5 (issue #591)

HED's annotation questions are a tag, validate and correct loop. On dev, 2 of 3 Luna
requests failed (a dropped stream and a stall past the read timeout, each on the model
call after a tool result), GPT-OSS hit the recursion limit, and Haiku answered all 3 in
12 to 24 s. Luna stays the default of NWB, EEGLAB and BIDS. The three tests that took HED
to be a Luna community now pick one from the registry, or name HED's new slug.

Tested: the full suite except the 19 known chat-resume 401s passes.

* Note that HED left Luna: changelog, two ADRs and two comments (issue #591)

Docs and comments only.

* Make the fallback test use a community that defaults to a Bedrock model (issue #591)

test_the_fallback_model_is_the_offered_one still used HED, whose default is now Haiku, so
no fallback happened and it would have stayed green without one. The selectors in the three
registry-driven tests now normalize the default, and the notes test asserts the default has
a note to follow.

Tested: the three test files, 209 pass.

* Drop HED from the lists of Luna communities in the env example and the Dockerfile (issue #591)

An operator reading them would think a missing Bedrock key degrades HED, which runs Haiku
either way. Also adds HED to ADR 0015's list of communities whose default is Haiku.

* State the evidence for HED's model as it is, and the budget decision (issue #591)

Luna answered 1 of 3 and GPT-OSS 1 of 2 on dev, which is not that Luna cannot finish the
loop; Haiku's price is nine times Luna's per token, not per request; the estimates are
before caching; HED's alert-only budget is unchanged. Comments and docs only.
…est by its silence (#594)

* Classify a run that used all its steps as a step_limit failure (issue #593)

langgraph's GraphRecursionError (a model that keeps calling tools until the step limit, as
GPT-OSS did on a HED annotation question) was unknown and came out as the generic error.
It is now kind step_limit, retryable (another model may finish), not worth an automatic
retry. Adds suggest_another_model: Claude Haiku 4.5 first, Sonnet 5.5 when Haiku is the
one that failed.

Tested: tests/test_core/test_model_errors.py; the kind check and the suggestion order each
fail a test when removed.

* Name the model to try in failure messages, and say when the steps ran out (issue #593)

"Please choose another model." now reads "Try Claude Haiku 4.5, or choose another model."
(Sonnet 5.5 when Haiku failed), a run that used all its steps says so and what to try, at
WARNING without a traceback, and the error event carries suggested_model {id, label} for a
client that can offer the switch. A key's throttle, a refused request and an unrecognized
failure carry none.

Tested: tests/test_api/test_stream_failures.py through the real graph, a real tool and the
real stream; six mutants of the new branches each fail a test.

* Bound a streamed request by its silence, and offer another model on a failed reply (issue #593)

The widget aborted every request 120 s after it was sent, however much the run had done,
and its 60 s stall timer could not fire (#564). A streamed request is now given up 60 s
after the last thing it did (any event, a tool starting or finishing, text), for the first
run of a reply and each later run alike; a request with no stream keeps its fixed 2
minutes. A failure a model could not finish (the server names a model in suggested_model, or
the widget timed out on silence) shows a button under the message, "Try Claude Haiku 4.5",
that sends the same question again on that model once, without changing the saved setting,
and the model also runs the later runs of that reply. The button is only for a reply that
showed nothing, whose question is back in the box, and never names the model that failed.

Tested: new blocks in frontend/test-widget-paced-streaming.js (325 checks) and the drift test;
eight mutants of the idle timer, the override and the button each fail a check.

* Document suggested_model and the idle bound in the changelog and the widget's event notes (issue #593)

Docs and comments only.

* Say in the changelog that the worker's 2 minute cap is silence-based now (issue #593)

Docs only.

* Answer a step-limit run on /ask and /chat with the model to try, and see through routing variants (issue #593)

- A run that used all its steps on a request with stream: false was the generic 500 and an
  ERROR with a traceback; it now carries the same message as the stream, at WARNING.
- Its log line says "A run used all its steps", not "Model call failed while streaming".
- suggest_another_model read an OpenRouter slug with a routing variant
  (anthropic/claude-haiku-4.5:nitro) as unknown and could suggest the model that failed.
- Docs: three WARNINGs, suggested_model in the event's returns, step_limit among the kinds,
  from_provider, Sonnet costs twice as much per token (not several times).

Tested: tests/test_api/test_stream_failures.py through the real graph and a real tool; three
mutants of the new branches each fail a test.

* Review fixes for the idle timer and the model button (issue #593)

- An error response whose body never finishes no longer hangs the send: the timer is stopped
  after the body is read, not before (sendMessage and postResume).
- A reply that is JSON, not a stream, gets 2 minutes from the moment it began, as documented.
- A server tool that is running gets a longer allowance (2 minutes) than a quiet model
  (60 s), so a tool at its own 60 s limit is not raced by the widget's timer.
- The button sends what is in the box (a question the reader narrowed), and is not offered
  when the request timed out before the server answered.
- An OpenRouter slug with a routing variant is read as the model it runs.

Tested: six new blocks in frontend/test-widget-paced-streaming.js (335 checks); six mutants
each fail one.

* Correct the comments, changelog and design note the review of #593 found wrong or stale

The worker is unchanged: a local workerd run showed that AbortSignal.timeout does not end
a body passed through unread, so the 120 s that cut long runs was the widget's. The
changelog now says what the widget does (60 s of silence, 2 minutes with a tool running),
which events count, the JSON fallback, /ask and /chat with streaming off, and the
models that send no thinking events; the design note's 120 s ceiling is updated; the widget,
test and server comments no longer say the banner lasts a few seconds or that the button
names the model the message names. Comments and docs only.

* Close the test gaps the review of #593 found (issue #593)

Widget: the button's model wins over the saved one, for the resend and a later run of the
reply; the failed model is read from the override and the community default; a /chat/resume
stream is touched per chunk, given up when quiet and its error body bounded; a network error
after the server answered, a request with streaming off, a blank box, a community that offers
neither or only one suggested model, and odd shapes of suggested_model. Server: the step-limit
log line is named for what it is, the non-streamed test proves the loop ran, and the messages
when no other model is left to suggest. Replaces a test that passed for the wrong reason.

Tested: 373 widget checks and 148 stream failure tests; the reviewer's 12 survivor mutants
each fail one.
Adds a hed-lsp build stage at a pinned commit, copies it and Node into the image and sets HED_LSP_PATH. The build gate and a Docker CI smoke step check the tool against HED 8.4.0. The tool drops option-like terms and runs the program with PATH only. Fixes #595.
One validated annotation per kind of event (at most four), word cap on prose only, and a tool-use example built from tags HED 8.4.0 defines. Refs #596.
…onverted pages (#602)

Tags are stripped only from .md, .markdown and .mdx sources, and there only when the name is an HTML element outside code. HTML detection handles a BOM, XML prolog and comments, script and style text is dropped, and fetch() is tested over a real local HTTP server. Refs #514.
…#601)

Reply and code-card elements declare the properties a docs theme sets on bare elements, with values that leave a page without host styles unchanged. New happy-dom test registered in test.yml and tests.yml. Part of #597.
…#604)

Name models by class (ADR 0016) and move Haiku to 5.5. NWB, EEGLAB, BIDS and NEMAR run the haiku class. The live-model tests run only from a manual workflow run, with a model input and the Bedrock key. Review fixes cover request routing for the community default, retired slug defaults, the temperature rule on OpenRouter, an unoffered DEFAULT_MODEL refused at startup, retired variables in .env, and the widget's corrupt saved settings.
* ci: run the OpenRouter live tests with the testing key only

The manual live-model job passed the production OpenRouter key. It now passes
OPENROUTER_API_KEY_FOR_TESTING, and test_llm.py reads only that key, so no live
test can spend the production credit.

The job starts with a presence check. It names each live key that is missing,
and it fails when ANTHROPIC_BASE_URL is set without ANTHROPIC_WORKSPACE_ID.
Entering openrouter as the model input limits a manual run to the OpenRouter
route.

Claude-Session: https://claude.ai/code/session_01QGLYRKyTuTjzGbVydofSCC
Co-Authored-By: Claude <[email protected]>

* test: read the answer text of live OpenRouter replies

The two live caching tests read response.content as a string. On the
OpenRouter route the reply arrived as a block list in CI, so the assertion
raised AttributeError. extract_text returns the answer text and drops
reasoning blocks, so the tests still check what the model said.

Claude-Session: https://claude.ai/code/session_01QGLYRKyTuTjzGbVydofSCC
Co-Authored-By: Claude <[email protected]>

---------

Co-authored-by: Claude <[email protected]>
@github-actions

github-actions Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Preview Deployment

Name Link
Preview URL https://develop-demo.osc.earth
Branch develop
Commit 9317e90

This preview will be updated automatically when you push new commits.

claude and others added 5 commits October 10, 2026 17:51
…ly's total

Claude Haiku 5.5 is billed at $0.50 / $2.50 only for a prompt over 100,000
tokens. estimate_cost compared that line with the reply's summed input, but a
tool loop sends the conversation again with every call, so a reply of several
calls adds up past 100,000 while no prompt is near it. The whole reply was
priced at five times the rate: on the usage line the reader sees, in the
request log, and so in the budget alerts. Haiku is every community's default.

estimate_cost takes the largest single prompt (longest_prompt_tokens) and
decides the tier on it. The streams track it per model call, the non-streamed
path takes it from the largest AIMessage, and the FAQ estimator passes its
longest thread. A caller that passes nothing still prices one call.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_019MtQNfPzMpGxEJFUciXbTN
The integration-tests job runs by hand only since #605. Its credential step
warned about a missing key but passed, and each test module skips itself
without its key, so a run with no key set was green with every live test
skipped. It now fails in that case.

The rules files and the notebook-site-check comment still described the job
as running after a merge and skipping gracefully; they now say it is started
by hand and fails without a credential.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_019MtQNfPzMpGxEJFUciXbTN
The ADRs, the example environment and three community configs still described
Haiku 4.5's thinking budget, Luna as the default of HED, EEGLAB, BIDS and NWB,
and Haiku as the cheapest model (Luna is $0.11 / $0.55 against Haiku 5.5's
$0.10 / $0.50, so the ceiling is $1 / $5).

ADR 0016 said five classes that are refused (opus, fable, terra, sol, astra)
are accepted; it now names the three that are offered. ADR 0014 and 0015 get
update notes in their existing style. The HED prompt calls suggest_hed_tags
results candidates, as the tool's own description does.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_019MtQNfPzMpGxEJFUciXbTN
Retitles [Unreleased] to [0.8.18], as for earlier releases. Adds the entries
that were missing for #599 (hed-suggest in the image), #600 (HED prompt),
#601 (widget host styles) and #605 (live tests by hand), and one for the
DEFAULT_MODEL check at startup. Names the three classes that are accepted
(the other five are refused), and fixes a reference that pointed the wrong way.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_019MtQNfPzMpGxEJFUciXbTN
@neuromechanist
neuromechanist merged commit 6818c5a into main Oct 11, 2026
29 checks passed

This branch was previously deployed

1 inactive deployment
testpypi — 909ee2c5 Deployed Oct 10, 2026 by neuromechanist via Publish to TestPyPI #164
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants