Skip to content

anthropic sonnet 4.5 1million token #2886

Closed
anomalyco/models.dev
#262

Description

@luisrudge

not sure how to use that model specifically... I keep getting

AI_APICallError: prompt is too long: 201401 tokens > 200000 maximum

Activity

  1. github-actions commented on Oct 1, 2025

    @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. rekram1-node commented on Oct 1, 2025

    @rekram1-node
    Collaborator

    ill fix this

  3. self-assigned this
    on Oct 1, 2025
  4. seannetlife commented on Oct 1, 2025

    @seannetlife

    smashing me right now too

  5. rekram1-node commented on Oct 1, 2025

    @rekram1-node
    Collaborator

    i sent msg to team, not sure if there is a header that needs to be addrd or sometbing to enable the 1m context, otherwise we can just set it to 200k

    if not fixed tonight ill do it tmr

  6. luisrudge commented on Oct 1, 2025

    @luisrudge
    Author

    i sent msg to team, not sure if there is a header that needs to be addrd or sometbing to enable the 1m context, otherwise we can just set it to 200k

    if not fixed tonight ill do it tmr

    could it be the model name? anthropic says you have to add [1m] to the model id

    Image

    https://docs.claude.com/en/docs/claude-code/model-config#extended-context-with-%5B1m%5D

  7. rekram1-node commented on Oct 1, 2025

    @rekram1-node
    Collaborator

    yes you are correct, so we need to update models.dev

  8. maxandrews commented on Oct 1, 2025

    @maxandrews

    Is this confirmed to work yet? There's no indication in the model selector which version of 4.5 I'm using, nor is there a display of available context.
    Image
    Anthropic says in their docs you have to be a tier 4 API user to get access:

    Image
  9. rekram1-node commented on Oct 1, 2025

    @rekram1-node
    Collaborator

    @maxandrews thx for sharing that I will fix models.dev in meantime

  10. luisrudge commented on Oct 1, 2025

    @luisrudge
    Author

    I think it's worse than that because the regular sonnet 4.5 shows up as having 1mi token context for me, but it gives me the error I mentioned once I got above 200k

    Image
  11. luisrudge commented on Oct 1, 2025

    @luisrudge
    Author

    @rekram1-node sorry yeah, your fix would address the usage issue! thanks

  12. rekram1-node commented on Oct 1, 2025

    @rekram1-node
    Collaborator

    no prob

  13. rekram1-node commented on Oct 1, 2025

    @rekram1-node
    Collaborator

    for those having issues the models.dev should be updated shortly, once it is consider wiping your cache locally and restarting opencode.

    To wipe cache:

    rm ~/.cache/opencode/models.json

    This happens automatically but if u want changes to happen instantly just wipe cache :)

  14. luisrudge commented on Oct 1, 2025

    @luisrudge
    Author

    thanks! that'll fix the usage bar on the top right. any idea when we'll be able to use the 1mi model?

  15. rekram1-node commented on Oct 1, 2025

    @rekram1-node
    Collaborator

    So for that you need to be tier 4 are you tier 4 @luisrudge ?

  16. luisrudge commented on Oct 1, 2025

    @luisrudge
    Author

    oh sorry, I had no idea it required a different tier. I'm not cool enough for tier 4 😅

  17. seannetlife commented on Oct 3, 2025

    @seannetlife

    i'm on the claude max subscription. still seeing only 200k context available. is that expected @rekram1-node ?

  18. rekram1-node commented on Oct 3, 2025

    @rekram1-node
    Collaborator

    @seannetlife yes, p sure 1M is only available through api key last I checked

    and even if u have one you need tier 4 or custom usage limits from anthropic

  19. seannetlife commented on Oct 3, 2025

    @seannetlife

    savage. i have an api with tier 4, but paying 200$ p/m for my max subscription and seems wild to not have the 1m

  20. f0o commented on Feb 3, 2026

    @f0o

    SO how to use 1M Claude 4.5 Sonnet for us that are Tier4 or custom rate limit?

    Where can I ask opencode to add the context-1m-2025-08-07 beta header?

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