Skip to content

[Bug]: Guard Anthropic reasoning fields by model support #3030

@amitksingh1490

Description

@amitksingh1490

Bug Description

Some Anthropic models support reasoning (thinking) but do not support effort-style reasoning parameters. In those cases, Forge can send an unsupported effort field and trigger upstream 400 errors.

The clearest example is Claude Haiku 4.5: it supports thinking budgets but rejects effort-style fields.

Steps to Reproduce

  1. Configure Forge with a Claude Haiku 4.5 model (for example claude-haiku-4-5-20251001).
  2. Enable reasoning and set an effort level.
  3. Send a chat request through Anthropic-compatible provider paths.
  4. Observe upstream 400 failures such as:
400 Bad Request: {"type":"error","error":{"type":"invalid_request_error","message":"This model does not support the effort parameter."}}

Expected Behavior

Forge should keep reasoning/thinking where supported, but remove only unsupported effort fields for models like Claude Haiku 4.5.

Actual Behavior

Effort-style reasoning fields can still be emitted for Anthropic-compatible routes, causing request rejection.

Forge Version

forge 0.1.0-dev

Operating System & Version

macOS 15.3.2

AI Provider

Other (Anthropic-compatible providers: Anthropic, Vertex AI Anthropic, Bedrock, OpenRouter/Requesty/GitHub Copilot proxy paths)

Model

claude-haiku-4-5-20251001

Installation Method

Built from source

Configuration

model: anthropic/claude-haiku-4-5-20251001
reasoning:
  enabled: true
  effort: high

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bugSomething isn't working.work: complicatedThe situation is complicated, good practices used.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions