Repository navigation
Offer Claude Sonnet 5.5 and default NEMAR to it - #524
Merged
Merged
Conversation
Sonnet 5.5 (claude-sonnet-5-5) costs the same as Sonnet 5. Earlier Sonnet ids keep resolving, now to the new model, so saved widget settings and community configs continue to work. Sonnet 5.5 rejects thinking type "disabled" with a 400, so thinking=None sends "between_tools" (its lowest setting) instead. The FAQ summarizer is the caller that turns thinking off. Unit tests pass. The live endpoint check (test_thinking_off_is_accepted) was not run: the platform key is not configured locally.
The NEMAR assistant answers noticeably better on Sonnet than on Haiku. Sonnet 5.5 costs about twice Haiku 4.5 per token ($2 / $10 versus $1 / $5 per 1M input / output tokens), so NEMAR requests get more expensive. Community config validation passes in the full suite.
Sonnet 5 onward bills a full-size image at up to about 4784 tokens, not the 1568 of the standard tier, so the flat 1600 under-counted every NEMAR figure by up to 3x and delayed trimming. Haiku's images are now over-counted, which only spends headroom. Image-budget tests pass; they use the constant, not its value.
Thinking blocks can arrive in a list-shaped reply even with extended thinking off, and .strip() on a list raises. The FAQ scorer and summarizer now take the text from the reply the way the rest of the code does.
The backend still resolves the retired id, but the settings dropdown lists only offered models, so a saved claude-sonnet-5 showed as a custom model. A drift test keeps the widget's map equal to the backend's aliases.
The payload for thinking=None on Sonnet 5.5 is asserted directly: between_tools, and none of the parameters the model rejects.
Contributor
Preview Deployment
This preview will be updated automatically when you push new commits. |
2 tasks
The API key was the first field, with no model to use it for; the model menu was below it. The model menu now comes first, and the model name and the API key appear only when Custom is chosen, since they exist for a model the community does not offer, paid for by the reader's own key. A key that is already saved stays in view so it can be seen and removed, a custom model cannot be saved without one, and a key the dialog is not showing is not saved. 26 checks in a happy-dom window (frontend/test-widget-settings.js, added to CI); the other widget suites still pass.
tests.yml gates branch protection and test.yml runs on main; the two copies of the frontend job must list the same steps, and tests/test_frontend_job_parity.py fails when they do not. The Settings suite was added to tests.yml alone.
12 tasks done
This was referenced Sep 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #522
What changed
claude-sonnet-5-5replacesclaude-sonnet-5inOFFERED_MODELS(same price, $2 / $10 per 1M tokens).claude-sonnet-5and the older Sonnet ids stay inMODEL_ALIASESand resolve to the new model, so saved widget settings and community configs keep working.thinking: {"type": "disabled"}with a 400.create_anthropic_llm(thinking=None)now sends{"type": "between_tools"}(the model's lowest setting; the API allows it at efforthighor below, and OSA never sets an effort)._validate_thinkingrejectsdisabledon Sonnet 5.5 with a message that says so. The FAQ summarizer is the only caller that turns thinking off.claude-sonnet-5-5,anthropic/claude-sonnet-5.5; the old entries stay so earlier request logs still price), the OpenRouter slug map, widget fallback list,FAQquality model, docs.default_modelis nowclaude-sonnet-5-5.frontend/test-widget-settings.js(26 checks in a happy-dom window, added to CI); the other widget suites still pass.extract_text, a savedclaude-sonnet-5widget setting is moved to the new id (with a drift test against the backend aliases), and thethinking=Nonerequest payload is asserted directly.Audited and unchanged: nothing in
srcsends a forcedtool_choice(also a 400 on Sonnet 5.5) or a non-default sampling parameter.Testing
uv run pytest testson this branch: 3087 passed, 15 failed. The same 15 tests (tests/test_api/test_chat_resume_endpoint.py, 401 instead of the expected status) fail ondevelopin my local environment, so they are not caused by this change.A code review pass (correctness, dead literal comparisons, drift tests, langchain-anthropic behavior with
between_tools) found no blocking issue..github/workflows/test.ymlruns the Settings dialog suite too (tests.ymlgates branch protection andtest.ymlruns on main;tests/test_frontend_job_parity.pyfails when their frontend jobs differ).Not verified live (needs the platform key)
The Anthropic variables are not set in my local
.env, so nothing here ran against the Claude Platform on AWS endpoint. Please run before merging:uv run pytest tests/test_integration/test_anthropic_platform.py -m llm(includes the newtest_thinking_off_is_accepted)ChatSession.replace_historyscrubs an earlier tool-result image (scrub_stored_images), andtrim_messagesedits the front of the history. The documentation says the check is enforced for accounts created on or after 2026-08-31 on the Claude API and Amazon Bedrock and does not say whether it applies to the Claude Platform on AWS. If it reproduces, the fix isthinking.block_binding.prefix_mismatch_behavior: "drop_block"(beta headerthinking-binding-controls-2026-08-01, adaptive thinking only) or stripping thinking blocks from the edited turns.Cost
high), billed as output. NEMAR'sbudget(daily_limit_usd: 5.00,monthly_limit_usd: 50.00) was sized for Haiku; it is not changed here..env.examplestill saysclaude-sonnet-5in two comments; edits to that file are blocked in my session, so it needs a two-word change by hand.