Skip to content

[Enhancement]: Support Claude Haiku 5.x thinking config (adaptive / disabled) #16911

Open

Description

@nealedj

What features would you like to see added?

Support Claude Haiku 5.x on the Bedrock endpoint with the thinking configuration that Haiku 5 requires. Today, selecting a Haiku 5 model with thinking enabled fails, and turning thinking off doesn't work either.

Specifically:

  • When thinking is enabled, LibreChat sends thinking: { type: "enabled", budget_tokens } for Haiku 5 models. Bedrock rejects this with "thinking.type.enabled" is not supported for this model. Use "thinking.type.adaptive" and "output_config.effort" to control thinking behavior.
  • When thinking is disabled, LibreChat omits the thinking field. Haiku 5 then thinks by default, with the thinking text returned empty.

Haiku 4.5 and earlier are unaffected and should keep the current behaviour.

More details

Haiku 5 is not covered by the model-name checks in packages/data-provider/src/bedrock.ts:

  • supportsAdaptiveThinking() covers Opus 4.6+, Sonnet 4.6+ and Mythos/Fable only. Haiku 5 falls through to the legacy enabled shape.
  • requiresExplicitThinkingDisabled() covers Sonnet 5+ and Opus 5+ only. Haiku 5 is left with the field omitted.

Direct Bedrock InvokeModel results, region eu-west-1, model eu.anthropic.claude-haiku-5-5:

  • thinking: {"type": "enabled", "budget_tokens": 1024}: rejected with ValidationException, "thinking.type.enabled" is not supported for this model.
  • thinking: {"type": "adaptive"} with output_config.effort: "low": succeeds. thinking_tokens: 0, which is expected for a one-sentence prompt at low effort.
  • Field omitted: succeeds. thinking_tokens: 107, with a thinking block whose text is empty and only a signature returned.
  • thinking: {"type": "disabled"}: succeeds. thinking_tokens: 0, no thinking block.

Proposed change:

  1. Treat Haiku 5+ as an adaptive-thinking model in supportsAdaptiveThinking(), so thinking: true sends {type: "adaptive"} with output_config.effort.
  2. Add Haiku 5+ to requiresExplicitThinkingDisabled(), so thinking: false sends {type: "disabled"}.
  3. Add spec cases for Haiku 5 (e.g. claude-haiku-5-5, eu.anthropic.claude-haiku-5-5) and confirm Haiku 4.5 still returns false.

Which components are impacted by your request?

Endpoints

Pictures

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Activity

  1. ivanbarboza commented on Oct 10, 2026

    @ivanbarboza

    Same failure on the direct Anthropic endpoint (not just Bedrock), v0.8.8 (ghcr.io/librechat-ai/librechat:v0.8.8), model claude-haiku-5-5 from the live Anthropic model list.

    With Thinking on, the request fails with 400 "thinking.type.enabled" is not supported for this model. configureReasoning() in packages/api/src/endpoints/anthropic only sends { type: "adaptive" } when supportsAdaptiveThinking(model) is true. That helper (Opus 4.6+, Sonnet 4.6+, Fable/Mythos) has no Haiku case, so Haiku 5.x falls through to the legacy /claude-(?:sonnet|opus|haiku)-[4-9]/ branch and gets type: "enabled". Turning Thinking off works around it.

    So the proposed change to supportsAdaptiveThinking() / requiresExplicitThinkingDisabled() would fix both endpoints, since they share those helpers.

  2. toarni commented on Oct 12, 2026

    @toarni

    Just for completeness:
    Context window also needs to be corrected. Right now, when using Haiku 5.5 via bedrock, LibreChat assumes 90K.
    But Haiku 5.5 supports up to 1M.

    So this could be implemented together with above fix as well, if possible.

  3. changed the title [-][Enhancement]: Support Claude Haiku 5.x thinking config on Bedrock (adaptive / disabled)[/-] [+][Enhancement]: Support Claude Haiku 5.x thinking config (adaptive / disabled)[/+] on Oct 12, 2026
  4. mforman commented on Oct 13, 2026

    @mforman
    Contributor

    PR #17062 fixes this, along with the context window from the comment above. It also fixes a second Haiku 5.5 failure on the direct Anthropic and custom provider: anthropic endpoints: Invalid signature in thinking block ... bound to a different conversation on follow-up turns, because Haiku 5.5 never got block_binding: drop_block. It's running in production on Foundry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ✨ enhancementNew feature or request🗺️ Backend Infracodegraph: the taxonomy area this belongs to (classifier, confidence ≥ 0.9)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions