RunanywhereAI / RunanywhereAI/wally

Keep JetBrains streaming overload errors out of assistant output

Open
#86 0 comments 0 reactions 1 assignee View on GitHub

@Siddhesh2377 is already working on this.

Since Sep 12, 2026.

bug P1 release-blocker
Dominant language
C++
Stars
1.5k
Forks
86
Avg merge
6h 53m
Merged PRs (30d)
50

Description

Overview

Impact: High under overload. Priority: P1. Estimated effort: Medium.

The JetBrains OpenAI proxy converts streaming upstream429/503 refusals into an ordinary successful assistant answer (finish_reason:"stop", [DONE], HTTP200). The editor cannot reliably recognize overload or respect Retry-After, and it may retain the failure text in conversation as a model answer.

Current state and reproduction

Audited main 093cd44806ec64b2c79b42b557b4856259d2ea58:

Hermetic loopback probe compiled unchanged openai_proxy.cpp and loopback_auth.cpp with pinned cpp-httplib0.46.1/nlohmann3.11.3. Only output and account/profile helpers were stubbed; no real credentials or API calls. Mock upstream /v1/chat/completions returned429 with Retry-After: 7 and {"error":{"message":"Too many parallel requests"}}. Authenticated request to real local proxy used stream:true.

Actual output:

JETBRAINS upstream429 -> status=200 retry_after= body=data: {"id":"chatcmpl-wally","object":"chat.completion.chunk","created":0,"model":"wally","choices":[{"index":0,"delta":{"role":"assistant","content":"{ error :{ message : Too many parallel requests }}"},"finish_reason":"stop"}]}

data: [DONE]

This proves transport/error rewriting. Exact retry/conversation behavior inside each supported JetBrains client remains to be qualified.

Proposed solution and implementation

  • Do not classify upstream failure as successful assistant completion.
  • Resolve upstream status/headers before committing downstream200 for pre-stream failures, preserving Retry-After and a compatible error body.
  • For a failure after output starts, use a typed failure contract accepted by the supported editor, with explicit incomplete-stream behavior; do not silently emit stop/DONE.
  • Add real loopback tests covering429/503 before tokens, refusal during streaming, auth refresh path, and normal stream success.
  • Qualify the supported JetBrains client's handling against the fake overload endpoint.

Success criteria

Overload remains distinguishable from a successful inference, delay metadata survives, no failure text is stored/executed as model output, and an incomplete stream does not turn into a normal stop. Public API testing is deferred until access is supplied.

Related: #83 is the Anthropic shim's analogous metadata loss, but that shim at least emits a typed error rather than assistant content. #80/#82 cover connection pooling in this same proxy. This issue adds no release-blocker label; release triage is deferred.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.