Deferred review finding: quick/laneb/runner/proxy.ts:67 — The byte bound is not an upper bound for image and document bl

Open
#32 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
38/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
typescript
Domain
backend

Research direction

Start with quick/laneb/runner/proxy.ts:67 and trace how the byte bound reserves tokens for OpenRouter requests and how image and document blocks are represented. Compare refusing those blocks with adding per-image and per-page token floors, including the batch cap. Done means OpenRouter media cannot exceed the reserve; check settlement's over_reserve flag for affected sessions.

Written by the indexing model from the issue text.

Description

Filed by /ship's pre-landing review of PR #25 (head 3b67e5fe5898). The finding is in code that PR did not change, so it was deferred here instead of being fixed there (review scope frozen after pass 1).

  • Severity: CRITICAL
  • Where: quick/laneb/runner/proxy.ts:67
  • Finding: The byte bound is not an upper bound for image and document blocks: compressed PDFs and low-entropy images cost far more tokens than their base64 bytes. Per the Captain's option C, #25 closes the Anthropic path (an uncounted request with media answers a retryable 529, count_failed_media). Still open: every OpenRouter request uses the byte bound, so a DeepSeek session that sends media can pass its cap, and the batch cap by the same overage.
  • Suggested fix: OpenRouter route: refuse image and document blocks, or add per-image and per-page token floors to the byte bound, at the next preregistration. Until then the settle's over_reserve flag shows any session that passed its reserve.
  • Found by: outside-voice
Dominant language
TypeScript
Stars
5
Forks
1
Avg merge
3h 9m
Merged PRs (30d)
407

Getting set up

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.

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.