Context Limit Exceeded: Reduce Input Length or Max Tokens

Resolved 💬 1 comment Opened Feb 28, 2025 by revsmoke Closed Feb 28, 2025

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.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗