Skip to content

Gateway 500 (NoneType TypeError) = downstream model out of capacity — LiteLLM surfaces it as a crash, not a 429 #84

Description

@Julia-Lex

Root cause (confirmed)

This is a LiteLLM gateway bug triggered by downstream model capacity exhaustion: when the model behind litellm.local.lexmount.net has insufficient capacity under concurrent load, the gateway's limiter/accounting path crashes with

500 '>' not supported between instances of 'NoneType' and 'int'

instead of returning a clean 429/rate-limit response.

If you see this signature: the downstream model is out of capacity. It is not a bench bug, not an OpenClaw bug, and not worth client-side debugging — request more capacity for that model.

Status: the model hit in the 2026-07-03 runs (gpt-5.4) has since been scaled up and should no longer trip this. Other models on the same gateway can still hit it, so this issue stays open as the lookup entry for the signature.

How it presents

  • Tasks die on their first LLM call (steps=0, env_status=failed, "No result JSON from OpenClaw").
  • OpenClaw retries 6 times over ~33-40s, then surfaces FailoverError: 500 '>' not supported... in stderr.
  • Zero 429 / rate limit / too many requests strings anywhere — do not grep for rate-limit keywords, grep for NoneType.
  • Concurrent runs only; single-stream never trips it. Intermittent (2 of 3 c10 batches on 2026-07-03; an identical rerun 10 minutes later was clean).

Occurrences (2026-07-03/04, openclaw + lexmount + gpt-5.4)

Run Load Result
20260703_224231 first_n 20, c10 15/20 hit the 500
20260703_233910 first_n 10, c10 6/10 hit the 500
20260703_234909 (identical rerun) first_n 10, c10 0/10 — clean

When another model hits it

  1. Confirm the stderr signature (experiments/.../tasks/<id>/stderr.txt).
  2. Report it as model capacity shortage for that model — escalate to whoever owns the model deployment, with the time window and concurrency.
  3. Optionally ask the gateway admin to fix LiteLLM's limiter so exhaustion returns a proper 429 (which clients could back off on) instead of a 500 crash.

Reference stderr (task 5, run 20260703_233910):

[agent/embedded] embedded run agent end: runId=48e7ef34-... isError=true model=gpt-5.4 provider=bench error=LLM request failed. rawError=500 '>' not supported between instances of 'NoneType' and 'int'
[diagnostic] lane task error: lane=main durationMs=35381 error="FailoverError: 500 '>' not supported between instances of 'NoneType' and 'int'"

🤖 Generated with Claude Code

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions