openclaw - 💡(How to fix) Fix Vertex beta INVALID_ARGUMENT can wedge long Enterprise sessions without actionable recovery

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

OpenClaw Enterprise can leave a long-running session stuck or repeatedly failing when the active LiteLLM Vertex beta route returns a generic 400 INVALID_ARGUMENT response after a large conversation/context buildup.

Observed provider error:

litellm.BadRequestError: Vertex_ai_betaException BadRequestError - b'{
  "error": {
    "code": 400,
    "message": "Request contains an invalid argument.",
    "status": "INVALID_ARGUMENT"
  }
}'

User-facing error:

Something went wrong while processing your request. Please try again, or use /new to start a fresh session.

After this happens, the session can appear dead: messages may receive no response, briefly recover, then fail again with the same generic error.

Error Message

litellm.BadRequestError: Vertex_ai_betaException BadRequestError - b'{ "error": { "code": 400, "message": "Request contains an invalid argument.", "status": "INVALID_ARGUMENT" } }'

Root Cause

OpenClaw Enterprise can leave a long-running session stuck or repeatedly failing when the active LiteLLM Vertex beta route returns a generic 400 INVALID_ARGUMENT response after a large conversation/context buildup.

Observed provider error:

litellm.BadRequestError: Vertex_ai_betaException BadRequestError - b'{
  "error": {
    "code": 400,
    "message": "Request contains an invalid argument.",
    "status": "INVALID_ARGUMENT"
  }
}'

User-facing error:

Something went wrong while processing your request. Please try again, or use /new to start a fresh session.

After this happens, the session can appear dead: messages may receive no response, briefly recover, then fail again with the same generic error.

Code Example

litellm.BadRequestError: Vertex_ai_betaException BadRequestError - b'{
  "error": {
    "code": 400,
    "message": "Request contains an invalid argument.",
    "status": "INVALID_ARGUMENT"
  }
}'

---

Something went wrong while processing your request. Please try again, or use /new to start a fresh session.
RAW_BUFFERClick to expand / collapse

Summary

OpenClaw Enterprise can leave a long-running session stuck or repeatedly failing when the active LiteLLM Vertex beta route returns a generic 400 INVALID_ARGUMENT response after a large conversation/context buildup.

Observed provider error:

litellm.BadRequestError: Vertex_ai_betaException BadRequestError - b'{
  "error": {
    "code": 400,
    "message": "Request contains an invalid argument.",
    "status": "INVALID_ARGUMENT"
  }
}'

User-facing error:

Something went wrong while processing your request. Please try again, or use /new to start a fresh session.

After this happens, the session can appear dead: messages may receive no response, briefly recover, then fail again with the same generic error.

Why this is not a duplicate

This is related to existing session/context recovery work, but it is not fully covered by the current open issues/PRs:

  • Related: #84536, #84602 - preemptive context overflow can silently kill embedded sessions.
  • Related: #82754 - context overflow should fall back to larger-context models.
  • Related: #76806 - irreducible overflow should not loop forever.
  • Related: #74822 - recurring generic "Something went wrong" gateway failures.
  • Related historical PR: #14314 - Gemini INVALID_ARGUMENT recovery attempt, closed without landing.
  • Related merged PR: #58856 - provider error normalization, but it does not appear to cover this Vertex beta failure mode.

The observed failure is specifically a provider-side Vertex beta/LiteLLM INVALID_ARGUMENT response that is surfaced as a generic failure and does not leave the Enterprise session in a clearly recoverable state.

Expected behavior

OpenClaw should classify this as a recoverable provider/session request-shape error instead of leaving the session wedged:

  • Detect Vertex/LiteLLM INVALID_ARGUMENT responses from the beta route.
  • Preserve the useful provider details in structured logs with sensitive fields redacted.
  • Surface a user-actionable message instead of only the generic /new fallback.
  • Mark the failed turn/session lane as cleanly failed so later messages are not stuck behind the bad turn.
  • Where possible, attempt a safer recovery path: compaction, smaller request shape, non-beta route, or configured fallback model.

Actual behavior

  • The provider returns INVALID_ARGUMENT.
  • The UI shows only a generic "Something went wrong" message.
  • The user cannot tell whether this is a context limit, provider request-shape bug, model routing issue, or local gateway problem.
  • The same session can remain unreliable until a fresh session is started.

Notes

This was observed during normal OpenClaw Enterprise use in a long session suspected to be near a large context window. It should be handled separately from Feishu upload permissions and duplicate-message behavior; those are channel/config symptoms, while this issue is at the model provider and session recovery boundary.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

OpenClaw should classify this as a recoverable provider/session request-shape error instead of leaving the session wedged:

  • Detect Vertex/LiteLLM INVALID_ARGUMENT responses from the beta route.
  • Preserve the useful provider details in structured logs with sensitive fields redacted.
  • Surface a user-actionable message instead of only the generic /new fallback.
  • Mark the failed turn/session lane as cleanly failed so later messages are not stuck behind the bad turn.
  • Where possible, attempt a safer recovery path: compaction, smaller request shape, non-beta route, or configured fallback model.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix Vertex beta INVALID_ARGUMENT can wedge long Enterprise sessions without actionable recovery