Member Junction
    Preparing search index...
    • Decides which of the caller's sampling parameters the Anthropic request may carry for model, given whether this request thinks. Both the non-streaming and streaming paths go through here so they cannot drift.

      Rules, from the "Sampling parameters" section of the thinking docs:

      • Always-reject models (RejectsSamplingParams): a non-default temperature, top_p or top_k is a 400 on every request. temperature: 1 (the default) is accepted on its own — but "a request that includes both temperature and top_p, even at their defaults" is a 400, and the top_p default there is 0.99, so top_p is never sent to these models. Nor is top_k.
      • Older models while thinking is on: temperature and top_k are incompatible with thinking; top_p is allowed at values between 0.95 and 1. temperature: 1 is kept, as it was before.
      • Older models with thinking off: everything passes through.

      Keeping temperature: 1 relies on the SDK's pinned API version (anthropic-version: 2023-06-01, which the driver does not override). From API version 2026-10-21 any sampling parameter at any value is a 400 on every model, so a version bump must revisit this and drop the default too.

      Docs: https://platform.claude.com/docs/en/build-with-claude/thinking#limits-and-feature-compatibility ("Sampling parameters")

      Parameters

      Returns SamplingRequestFields