Skip to content

Context Limit Exceeded: Reduce Input Length or Max Tokens #228

Closed as duplicate

Description

@revsmoke

Bug Description
API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"input length and max_tokens exceed context limit: 184915 +
20000 > 204648, decrease input length or max_tokens and try again"}}

Environment Info

  • Platform: macos
  • Terminal: ghostty
  • Version: 0.2.27
  • Feedback ID: 7dfd7a4e-beb9-427f-bbb2-395d1c3aa57c

Interesting note - it was working on the following code at the moment this error occurred:

<cfset grokResponse = aiProxy.sendMessage(
85 message = "Hello, please give me a very short greeting.",
86 modelProvider = "grok"
85 message = "Hello! My name is Grok User. Please give me a very short greeting.",
86 modelProvider = "grok",
87 maxTokens = 100,
88 temperature = 0.7
89 )>
90

Just in case that somehow when claude was submitting the code to the it's own api, maybe it is seeing the "maxTokens" in my code and it is confusing it. I doubt it and it is probably a coincidence but just in case.

Activity

  1. github-actions commented on Aug 9, 2025

    @github-actions

    This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

  2. locked as resolved and limited conversation to collaborators on Aug 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions