Skip to content

bug(chat): thinking preferences are dropped for chats served by hosted Claude #20922

Open

Description

@mrveiss

Summary

A user who turns thinking on for a chat served by hosted Claude gets a plain reply with no thinking, and nothing tells them. The preference is captured and turned into request kwargs, then never reaches the Anthropic SDK request.

Found while reviewing #20912.

Trace (verified against origin/main)

  1. Capture: autobot-backend/api/chat.py:1514-1519 reads thinking_mode_enabled and thinking_budget_tokens from the request into context.
  2. Compute: autobot-backend/chat_workflow/manager.py:2394 calls build_reasoning_api_kwargs(ctx.context, ctx.selected_model). That function (autobot-backend/chat_workflow/reasoning_kwargs.py:60) returns _thinking_kwargs(budget) when thinking_mode_enabled is set and "claude" is in the model name.
  3. Local payload: autobot-backend/chat_workflow/manager.py:1991 runs payload.update(api_kwargs). The payload is built at manager.py:2092 and posted to the local Ollama-style endpoint, not to the Anthropic SDK.
  4. Failover: autobot-backend/chat_workflow/llm_failover.py:25 documents that api_kwargs is not carried to the backup request.
  5. Hosted route: the trace found no route into the Anthropic SDK other than LLMRequest.metadata["api_kwargs"]. At autobot-backend/api/chat.py:613-614, that metadata is set to {"reasoning_effort": ...} only. The thinking fields are not added there. (api/chat.py:602 is the docstring that mentions the mechanism; the assignment is at 614.)

Net effect: the thinking kwargs are built, then dropped before any hosted-Claude request.

Impact

  • A user who enables thinking for a hosted-Claude chat gets a non-thinking reply.
  • Nothing reports the drop. The [#8993] Thinking mode enabled log in reasoning_kwargs.py fires when the kwargs are built, before the drop, so the logs say thinking is on.

Acceptance criteria

  • The thinking preferences reach the Anthropic SDK request, decided through the single SSOT thinking predicate autobot_shared/ssot_claude_models.requires_adaptive_thinking: 5.x models get adaptive thinking, pre-4.6 models get a budget. Note: on origin/main this symbol and module do not exist (0 matches for requires_adaptive_thinking and ssot_claude_models), so this criterion also requires creating the predicate in autobot_shared/.
  • The failover path carries the thinking preferences too, or llm_failover.py documents why not.
  • A test asserts the final SDK kwargs for a chat with thinking on.

Related

Parent

None. No fitting umbrella found among open issues.

Activity

  1. added
    bugSomething isn't working
    area: config-ssotWave 0 · cluster R — Config, paths & SSOT
    phase:M1.3One model map and the Local / Hybrid / Cloud resolver
    on Nov 6, 2026
  2. added
    needs-structureMissing goal milestone, matching phase label or native parent (#19522)
    on Nov 6, 2026
  3. github-actions commented on Nov 6, 2026

    @github-actions
    Contributor

    needs-structure cleared: goal milestone, matching phase label and native parent (or sub-issues) are all present (#19522).

  4. added
    phase:M1.4Wizard and SLM: choose a mode, apply it, default models work
    and removed
    phase:M1.3One model map and the Local / Hybrid / Cloud resolver
    needs-structureMissing goal milestone, matching phase label or native parent (#19522)
    on Nov 6, 2026
  5. mrveiss commented on Nov 6, 2026

    @mrveiss
    OwnerAuthor

    Structure set per maintainer decision (2026-11-06): milestone M1, phase:M1.4, parent #19739.

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

    area: config-ssotWave 0 · cluster R — Config, paths & SSOTbackendbugSomething isn't workingphase:M1.4Wizard and SLM: choose a mode, apply it, default models workpriority: high

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions