Skip to content

Change max token of Opus 4.1 from 8K to 32K #9045

@kaveh-deriv

Description

@kaveh-deriv

Problem (one or two sentences)

Max token for Opus 4.1 is set incorrectly for Anthropic provider. It is set as 8K

Context (who is affected and when)

Based on Athropic docs, opus 4.1 has the same max token as 4 (32K).
It is set to 8k in the code: https://github.com/RooCodeInc/Roo-Code/blob/main/packages/types/src/providers/anthropic.ts#L52

Desired behavior (conceptual, not technical)

I have use cases for larger context if we can increase the number.

Constraints / preferences (optional)

No response

Request checklist

  • I've searched existing Issues and Discussions for duplicates
  • This describes a specific problem with clear context and impact

Roo Code Task Links (optional)

No response

Acceptance criteria (optional)

No response

Proposed approach (optional)

No response

Trade-offs / risks (optional)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue/PR - TriageNew issue. Needs quick review to confirm validity and assign labels.bugSomething isn't workingenhancementNew feature or request

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions