Skip to content

Claude Opus 4.6 context window limits still 200k #12438

Closed

Description

@Davincible

I have manually updated the config for the model, but still get context window limits..

Image
     File: /Users/tyler/.config/opencode/opencode.json
   1 {
   2   "$schema": "https://opencode.ai/config.json",
   3   "autoupdate": false,
   4   "permission": {
   5     "bash": "allow",
   6     "doom_loop": "allow",
   7     "edit": "allow",
   8     "external_directory": "allow",
   9     "webfetch": "allow"
  10   },
  11   "plugin": [
  12     "opencode-antigravity-auth@beta",
  13     "@mohak34/opencode-notifier@latest",
  14     "opencode-anthropic-auth@0.0.13"
  15   ],
  16   "provider": {
  17     "anthropic": {
  18       "models": {
  19         "claude-opus-4-6": {
  20           "limit": {
  21             "context": 1000000,
  22             "output": 128000
  23           },
  24           "modalities": {
  25             "input": [
  26               "text",
  27               "image",
  28               "pdf"
  29             ],
  30             "output": [
  31               "text"
  32             ]
  33           },
  34           "name": "Claude Opus 4.6"
  35         }
  36       },
  37       "npm": "@ai-sdk/anthropic"
  38     },

Activity

  1. github-actions commented on Feb 6, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Feel free to ignore if none of these address your specific case.

  2. ItsWendell commented on Feb 16, 2026

    @ItsWendell
    Contributor

    Here's a workaround that worked for me: #12338 (comment)

  3. alexyaroshuk commented on Feb 17, 2026

    @alexyaroshuk
    Contributor

    While I support this issue, I think it should be closed as a dupe of #12338, @alexyaroshuk

    @tredondo i am not a maintainer, I can't close issues. If you want an issue closed, you may want to tag the issue's author or the assignee

  4. DusKing1 commented on Mar 7, 2026

    @DusKing1

    If you're hitting the 200k limit on Anthropic direct API (not Bedrock), I published a plugin that fixes this. It needs both the plugin and model limit overrides in your opencode.json:

    {
      "plugin": ["opencode-anthropic-context-1m"],
      "provider": {
        "anthropic": {
          "models": {
            "claude-opus-4-6":          { "limit": { "context": 1000000, "output": 128000 } },
            "claude-sonnet-4-6":        { "limit": { "context": 1000000, "output": 64000 } },
            "claude-sonnet-4-5":        { "limit": { "context": 1000000, "output": 64000 } },
            "claude-sonnet-4-20250514": { "limit": { "context": 1000000, "output": 64000 } }
          }
        }
      }
    }

    The plugin injects the context-1m-2025-08-07 beta header, and the model overrides fix auto-compaction (168K → 968K).

    https://github.com/DusKing1/opencode-anthropic-context-1m

  5. assigned and unassigned on Apr 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions