Files
pxpipe/docs
Danil Silantyev 028f6a7cd8 fix(vision): patch-based Anthropic image-token model + doc sync (#27)
Anthropic bills images by a 28-px patch grid (⌈w/28⌉×⌈h/28⌉ after tier downscale), not (w·h)/750 — the old fit overcharged large images ~4–5%.

- new src/core/anthropic-vision.ts: exact patch + downscale model matching
  Anthropic's reference (incl. extreme aspect ratios); wired into the unified
  visionTokensForModel router.
- gate counts real 28-px patches; 10% bias renamed ANTHROPIC_GATE_MARGIN, gate-only.
- removed ANTHROPIC_PIXELS_PER_TOKEN / IMAGE_COST_SAFETY_MARGIN; cols 313 → 312
  (slab = 1568 px cap).
- docs (README / RENDER_SIZING / TRANSFORM_INFO / audit) synced to shipped
  geometry (1568×728, 312 cols) and the patch billing model.
2026-07-18 19:55:30 -04:00
..