Repository navigation
feat(bedrock): add Claude Haiku 5.5 and a thinking display option for Claude 5 - #4112
Conversation
Add a `thinking_display` parameter (omitted / summarized) to the "Anthropic Claude 5" family. Claude 5 adaptive thinking defaults to `omitted`, so nothing is streamed while the model thinks. With `summarized`, reasoning summaries are streamed, which keeps the connection from going idle during long thinking. - Send `thinking.display = "summarized"` when selected; requests with `omitted` or no value are unchanged. - Allow `summarized` without Effort: send adaptive thinking only, with no output_config, and still drop sampling params. - Add tests, README notes, and bump the plugin version to 0.0.92.
Add Claude Haiku 5.5 (anthropic.claude-haiku-5-5) to the "Anthropic Claude 5" model family. - model_ids: register 'Haiku 5.5' and its geo profile prefixes (us/eu/au/global; the jp. profile is not wired up yet, as for Opus 5.5) - anthropic-claude-5.yaml: add the model option and update the cross-region help text - llm.py: map 'Haiku 5.5' to the new pricing file - model_configurations/claude-5-5-haiku.yaml: 1M context, Global rates of $0.10 / $0.50 per 1M tokens (prompts up to 100K tokens) - cache_config: enable explicit prompt caching (min 512 tokens, 4 checkpoints) - README (en / zh_Hans): document the model, profiles and pricing - tests: add Haiku 5.5 to the Claude 5 model id, cache and llm param tests, plus regression tests for custom (inference profile) models - bump plugin version to 0.0.92 Because Haiku 5.5 profile IDs are now recognised as Claude 5 profiles, custom models using them get the Claude 5 parameter rules (no temperature/top_p/top_k) instead of the legacy Claude ones. Fixes langgenius#4044
|
Hi @Arai-Y-SLC, thanks for adding Claude Haiku 5.5 and the thinking display option! Heads-up about Thanks again for your contribution! 🙏 |
…haiku55-thinking-display
main is now 0.0.92 (langgenius#4106, langgenius#4095), so bump to the next unused version. langgenius#4095 added a test that expected no Claude 5 response field paths for a Haiku 5.5 profile ID. With Haiku 5.5 registered as a Claude 5 model, profile IDs such as global.anthropic.claude-haiku-5-5 now request /stop_details like the other Claude 5 models; the application inference profile ARN case is unchanged. Also note in the README that Haiku 5.5 is now a predefined model.
|
Thanks @crazywoola. Merged the latest Re-ran the live checks on the merged branch (4dc7eb0:
Same behaviour as before the merge; the silence numbers vary run to run with the thinking length. |
Summary
Two Claude 5 changes in one PR, so they ship as a single version bump (0.0.92 → 0.0.93, rebased on
mainafter #4106 and #4095). Each is its own commit if you prefer to review them separately.Fixes #4044. Follow-up to #4059 (closed by #4097).
1. Thinking Display option (as offered in #4059 (comment))
Claude 5 models default to
thinking.display: "omitted", so the stream carries nothing while the model thinks. #4097 raised thebedrock-runtimeread timeout to 3600 s, so botocore no longer gives up, but the connection still sits idle for the whole thinking phase. Networks with a fixed idle timeout (VPC endpoints, NAT gateways and NLBs are 350 s, per AWS) can still drop it. This adds thethinking_displayoption the Anthropic plugin already has.omitted/summarized, defaultomitted) on the "Anthropic Claude 5" family, right after Effort.omittedor unset: the request is exactly what 0.0.92 sends today.summarized: adds"display": "summarized"to the adaptive thinking config. Reasoning summaries stream as<think>content, which the existing stream handler already renders. This also works with Effort unset (sends{"type": "adaptive", "display": "summarized"}with nooutput_config).2. Claude Haiku 5.5 (
anthropic.claude-haiku-5-5), following the pattern of #3926 and #4009CLAUDE5_PROFILE_PREFIXESus./eu./au./global. (the model card also lists jp., left unwired as for Opus 5.5), cache minimum 512 / 4 checkpoints (model card), pricing file at the Global rate of $0.10 / $0.50 per 1M tokens (prompts up to 100K; the long-context rate of $0.50 / $2.50 cannot be expressed in the flat schema, noted in a comment), README (en / zh)./stop_detailslike the other Claude 5 models, so one assertion in the fix(bedrock): avoid unsupported inference profile JSON prefill #4095 test is updated for that case (the application inference profile ARN case is unchanged), and its README note now mentions the predefined model.geographicprofile, stream unless noted)Haiku 5.5in the Claude 5 familyus.anthropic.claude-haiku-5-5, answers in stream and non-streamsummarizedomitted), 2,017 chars of summary, same answeromitted: unchanged /summarized: longest silence 3.1 s, 2,030 chars of summary, same answersummarizedsummarized, 2-round tool loop (stream / non-stream)tool_use→tool_use→end_turn,1173(both modes)omittedomitted, Claude 4.6 Sonnet, embeddings, rerankmain)The silence grows with the thinking time. In a knowledge-pipeline job on the same deployment, Sonnet 5.5 at the default effort was silent for 291 s before the first event, close to the 350 s limit; with
summarizedthe longest gap was 3.1 s.Release Notes
summarizedto stream reasoning summaries while the model thinks; this also keeps long-thinking requests from going idle behind proxies or VPC endpoints with an idle timeout. The default (omitted) leaves requests unchanged.Change Type
Screenshots / Videos
Haiku 5.5option; no Thinking Display, nothing streams until thinking endsHaiku 5.5in Bedrock Model; Thinking Display below Effort, and withsummarizedreasoning summaries appear while the model thinksLLM Plugin Checklist
Areas affected by this change (check all that apply)
Version
versioninmanifest.yaml(not the one undermeta): 0.0.92 → 0.0.93dify_plugin>=0.10.2,<0.11.0is declared inpyproject.tomland locked inuv.lock(unchanged)Testing
Local deployment — Dify version: 1.14.2
SaaS (cloud.dify.ai)
uv sync --all-groups --frozen, Python 3.12:322 passed(onmain+ this branch).tests/test_claude5_thinking_display.py(new, 15 tests): unchanged request with Effort and no display,omitted,summarizedwith and without Effort, sampling params dropped, legacyreasoning_typenot mixed in, no leak ofthinking_displayintoinferenceConfig, the YAML rule, and pass-through to the Claude 4.8 Opus refusal fallback.us./eu./au./global.Haiku 5.5 profiles ([Bedrock] Disable "Temperature" parameter by default for Claude Haiku 5.5 (same as Sonnet 5.5) #4044).mainand the new tests kept: 7 of the thinking-display tests, 22 of the Haiku 5.5 tests and the updated fix(bedrock): avoid unsupported inference profile JSON prefill #4095 assertion fail.Live rows above: the plugin installed in a self-hosted Dify 1.14.2, invoked through the plugin daemon the way workflow nodes call it. Both parameters appear in the model settings panel after the plugin update.
Notes: the Bedrock docs say a model may accept
summarizedand still return no thinking text, so it is a best-effort option. The summary adds to the output Dify shows (with the "separate" reasoning format it goes toreasoning_content, not the answer text).🤖 Generated with Claude Code