Repository navigation
feat: model classes, Haiku 5.5 and Haiku for NWB, EEGLAB, BIDS, NEMAR - #604
Conversation
MODEL_CLASSES in anthropic_models.py is the one place a model generation is chosen. A class name works wherever a model is named; the ids a class used to be still resolve. Registry, levels, thinking, pricing, slugs, the FAQ models, the widget's copies and the tests key off the class's id, not a literal. Claude Haiku 5.5 thinks adaptively at an effort level (no token budget), turns thinking off with disabled, rejects temperature, and is priced by prompt length ($0.10/$0.50 to 100k tokens, $0.50/$2.50 above). The budget-thinking path is removed. The config endpoint reports the id a class resolves to. Communities name haiku, sonnet or luna; EEGLAB's FAQ agents lose their temperature lines. Tested: full suite (5172 passed; the 19 known test_chat_resume_endpoint failures are unchanged from develop), ruff, all widget tests with bun. Not run against the live Claude Platform.
Records the decision, the Haiku 5.5 behavior changes and what was not measured. Documentation only.
NWB, EEGLAB and BIDS named GPT-6 Luna on Amazon Bedrock, and NEMAR named Claude Sonnet 5.5. All four now name the haiku class, which is Claude Haiku 5.5 today. metabci is unchanged. The comments that described the old defaults are updated in the community configs, .env.example, the Dockerfile, the model pricing comment and the CHANGELOG. The Bedrock key is no longer needed for any shipped community's default, only for a reader who picks a Bedrock model from the menu. Tests: no shipped community defaults to Luna now, so the Luna routing test gives Luna to each community that sets high. The shipped-default parametrization names the new classes. Claude-Session: https://claude.ai/code/session_01QGLYRKyTuTjzGbVydofSCC Co-Authored-By: Claude <[email protected]>
The integration job ran on every push to main, and its only gate was ANTHROPIC_API_KEY. It never received the Bedrock key. It now runs only on workflow_dispatch, so the paid calls to the Claude Platform, OpenRouter and Amazon Bedrock stay out of regular CI. The network tests in the same job also run only when triggered by hand. The new model input takes "all" (the default) or a part of a model id such as haiku, sonnet or luna. It is passed to pytest -k. AWS_BEARER_TOKEN_BEDROCK is passed to the job, and each test module skips itself when its own credential is missing. Claude-Session: https://claude.ai/code/session_01QGLYRKyTuTjzGbVydofSCC Co-Authored-By: Claude <[email protected]>
No shipped community defaults to a Bedrock model now, so the tests of the Bedrock default give NWB GPT-6 Luna for their own run, through name_luna_as_the_default in tests/helpers/deployment.py. monkeypatch undoes it. The startup-check test names it before the app starts, and the NEMAR routing test pins a Claude model at high rather than the Sonnet id, since NEMAR now runs Haiku. Claude-Session: https://claude.ai/code/session_01QGLYRKyTuTjzGbVydofSCC Co-Authored-By: Claude <[email protected]>
The pull-request job ran every test that is not marked network, which included the llm-marked live OpenRouter test. It skips without its key today, but live model calls belong only to the manual live-model workflow. Claude-Session: https://claude.ai/code/session_01QGLYRKyTuTjzGbVydofSCC Co-Authored-By: Claude <[email protected]>
Routing: a request that names the community's default another way (a class, an offered id or a legacy alias) is the default, not a custom model, so it needs no key of the caller's own. A retired Claude slug default such as anthropic/claude-haiku-4.5 runs the model its class is today, as the config endpoint reports it, rather than the retired slug. Temperature: a model that refuses one (Haiku 5.5, Sonnet 5.5, Luna) is sent none on OpenRouter, as the Anthropic path already did. The FAQ fallback agents no longer set 0.0 and 0.1 on a model that refuses them, and their comments no longer claim a determinism that is not there. The sampling models keep it. Config: an unoffered DEFAULT_MODEL refuses startup, instead of silently changing the model family of the Bedrock fallback. A retired variable named only in .env is reported, as one in the environment already was. Tests: class names in a BYOK OpenRouter request, the same-model comparison, a retired slug default, a slug default reported as written, the shipped community defaults pinned by name, and the settings checks above. Claude-Session: https://claude.ai/code/session_01QGLYRKyTuTjzGbVydofSCC Co-Authored-By: Claude <[email protected]>
…torage failure loadUserSettings read fields of the parsed value, so a saved null threw a TypeError. The outer catch then reported "Cannot access browser storage", and the bad value stayed in storage to repeat on every load. A value that parses to a non-object is now removed and reported as corrupt, as unparseable JSON already was. The widget settings suite has a case for it, which fails on the previous widget. Claude-Session: https://claude.ai/code/session_01QGLYRKyTuTjzGbVydofSCC Co-Authored-By: Claude <[email protected]>
Preview Deployment
This preview will be updated automatically when you push new commits. |
PR review summary (commit 61cac45)Review of commit Code correctness
Also checked and clean: the model normalization and retired-id tables, the 100,000-token cost boundary, the thinking and effort paths on the Anthropic route, no mocks added, and CHANGELOG entries present. The import-order errors (ruff I001) one lens reported did not reproduce: Silent failures
Also checked: no silent Tests
No new mocks or patches were added. The new ResultFull CI unit selection: 5190 passed, 0 failed. Widget settings suite: 184 passed. |
Summary
Model classes (ADR 0016), and the first move under them: Claude Haiku 4.5 becomes Claude Haiku 5.5, and communities name a class instead of a version.
MODEL_CLASSESinsrc/core/services/anthropic_models.pynames each tier (haiku,sonnet,opus,fablefor Anthropic;luna,terra,sol,astrafor OpenAI) and the model it is today. A class is accepted wherever a model is named: a community'sdefault_model, an agent'smodel, a request, the CLI andDEFAULT_MODEL.haikuclass. They were GPT-6 Luna on Amazon Bedrock. NEMAR now defaults tohaiku; it was Claude Sonnet 5.5.test.ymlnow runs onworkflow_dispatchonly, with amodelinput (all,haiku,sonnet,luna) and the Bedrock key. It no longer runs on push tomain. The PR test job intests.ymlalso excludesllm-marked tests.Review
Three review lenses ran on
61cac45: code correctness, silent failures and test coverage. Fixed ine8e2e05and36b4884:anthropic/claude-haiku-4.5, runs the current model, as the config endpoint reports it.temperatureto a model that refuses it (Haiku 5.5, Sonnet 5.5, Luna). The sampling models keep it. The FAQ fallback agents no longer set 0.0 and 0.1 on Haiku 5.5, and their comments no longer claim the scoring is deterministic.DEFAULT_MODELnow stops startup. Before, a typo changed the model family of the Bedrock fallback without a word..envis reported, as one in the environment already was.Declined, with reasons:
contextlib.suppress(ValueError). It is there for OpenRouter slugs, and config load already warns about an id that is neither offered nor a slug.log=False). The request path logs the same fallback at ERROR.warnings.warn, because existing tests assertpytest.warns.Testing
-m "not integration and not llm and not network"): 5190 passed, 10 skipped, 0 failed.frontend/test-widget-settings.js): 184 passed. The new case for a non-object saved value fails on the previous widget.ruff check .andruff format --check .are clean.Before merging
AWS_BEARER_TOKEN_BEDROCK. The Anthropic and OpenRouter secrets are needed too, if those cases should run.DEFAULT_MODELthat is not an offered model now stops startup. Check the value before deploying.nemar_render_overviewas image blocks, which GPT-6 Luna cannot take, so NEMAR cannot move to Luna. Haiku 5.5's image handling is not verified against the live API here. Check NEMAR's figures after the deploy.