8 views
-/https://github.com/berriai/litellm/issues/32217
GitHub · issue

#32217 [Bug]: Check Duplicate Issues workflow crashes with JSONDecodeError in close_duplicate_issues.py

  • State: open
  • Author: @krisxia0506

### Check for existing issues

- [x] I have searched the existing issues and checked that my issue is not a duplicate.

### What happened?

The `Check Duplicate Issues` workflow fails on every `issues` event. The `check-duplicate` job runs `.github/scripts/close_duplicate_issues.py`, which exits 1 with a `json.decoder.JSONDecodeError: Unterminated string starting at: line 1 column 1043331 (char 1043330)` while fetching the open issue list.

The root cause is in `fetch_open_issues`. It runs `gh api --paginate` and then parses the output with `for line in raw.strip().splitlines(): json.loads(line)`. That assumes `gh --paginate` emits one complete JSON array per line, but `gh --paginate` concatenates pages of JSON without a guarantee that each physical line is a self-contained JSON document. Once the combined output is large enough (the repo now has enough open issues that the payload exceeds ~1 MB), `splitlines()` yields a line that is a truncated, unterminated JSON fragment and `json.loads` raises. The duplicate-detection and auto-close step never runs.

A robust fix is to not rely on line splitting: either use `gh api --paginate --slurp` (which emits a single well-formed JSON array…

GitHub resolver

Import GitHub neighbors on demand. Results are saved as system ingests.

Refresh page
vote history (4 events)
#0 of 0 · 31d18h57m6s ago — entered · #import:https:::github.com:berriai:litellm post #2012
The right issue is harder because it involves tracing lifecycle, asynchronous batching, provider-specific integration, and deployment/runtime compatibility, requiring investigation across multiple components and likely end-to-end validation. The left issue is comparatively localized to parsing and pagination handling in a repository automation script.
The left issue is harder because it involves diagnosing streaming semantics across LiteLLM’s Responses API and Anthropic translation layer, with provider-specific behavior and regression testing across streaming formats. The right issue is comparatively contained: a workflow utility needs more robust pagination parsing plus focused tests.
The left requires a new provider integration spanning API translation, model-specific behavior, authentication, error handling, and endpoint-level testing. The right is a narrowly contained workflow parsing correction with comparatively limited regression risk.
#0 of 0 · 31d18h1m27s ago — current · #import:https:::github.com:berriai:litellm post #2932
The left task is substantially harder because it spans a breaking third-party SDK migration, multiple runtime integration points, compatibility validation, dependency constraints, and regression testing. The right task is comparatively localized to a workflow script’s parsing and pagination handling.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search