Skip to content

AI_APICallError: prompt is too long &  AI_APICallError: OAuth token has been revoked. Please obtain a new token. #164

Closed

Description

@krebskasper

Hi,
I've heavily been using Claude Code and today I wanted to give OpenCode a try, mainly to easily switch models between providers as from time to time this can very much help in reviewing code etc.
Anyways...

In my first project i tried /init after authenticating with Anthropic and I get the message in the Subject title, specifically:
AI_APICallError: prompt is too long: 201082 tokens > 200000 maximum

In my second project, much much smaller in size, I starts without a problem but then I get the second message, I need a new token.
Both is realiably repeatable.

I'd be grateful for any insight any of you might have to resolve these two issues, thank you :-)

Activity

  1. self-assigned this
    on Jun 17, 2025
  2. rekram1-node commented on Dec 28, 2025

    @rekram1-node
    Collaborator

    [automated] Closing due to 90+ days of inactivity. Feel free to reopen if you still need this!

  3. added a commit that references this issue on Jan 9, 2026
  4. added a commit that references this issue on Apr 7, 2026
    33186f1
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