#<400> InternalError.Algo.InvalidParameter: Range of input length should be [1, 196608]

1 messages · Page 1 of 1 (latest)

reef marlin
#

<400> InternalError.Algo.InvalidParameter: Range of input length should be [1, 196608]

charred crescentBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution

pale spireBOT
#

That error is coming from the upstream model API: the request OpenClaw sent had an input length outside the allowed range [1 … 196608].

In practice it usually means one of these:

  • Too large: the combined payload (system prompt + conversation history + tool output like a big webpage/file/log) exceeded the model’s max context.
  • Empty: something ended up sending an empty string as the “input” (length 0).

Quick things to try

  1. Retry in a fresh thread / new session (to drop the accumulated history).
  2. If you pasted logs / huge JSON / huge HTML: split it into smaller chunks or upload as a file and only paste the relevant excerpt.
  3. If this happened right after the agent fetched a page/file: ask it to summarize with a smaller fetch (e.g. “re-fetch but only first ~5k chars / only main section”).

To pinpoint which case it is (and how to fix cleanly)

Can you paste:

  • openclaw --version
  • which provider/model you’re using (from your config or the gateway log line near the error)
  • ~20–30 lines of the gateway logs around the 400 (the request right before the error)