Skip to content

cortheon: count vision text in the page budget, and keep three text caps whole - #1677

Open
ppardus wants to merge 5 commits into
ashhart:mainfrom
ppardus:cortheon-page-budget
Open

ppardus wants to merge 5 commits into
ashhart:mainfrom
ppardus:cortheon-page-budget

Conversation

@ppardus

@ppardus ppardus commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

What this changes

A vision turn keeps its text beside the image, but the page budget only read a content string, so that text was treated as empty and a long turn still received a full page. The budget now counts those parts. Three smaller caps in the same path were wrong in the same way: a progress line and the utility-verb scan could split a character, and a fallback query whose first word did not fit was sent as an empty search.

Receipt

  • Environment, with the TensorFold commit, MLX or PyTorch version, machine and GPU, checkpoint and revision: host tests only, against 470d4e4. No model, GPU, or checkpoint.
  • Exactness, from tools/bench_concurrent.py --alone --serial or token_sha against "draft": false: n/a. This changes a text budget and three text caps, not sampled tokens.
  • Decode speed before and after, from tools/bench_openai.py: n/a. No decode path changes.
  • Prompt speed before and after: n/a. The change cannot reach prompt processing.
  • Tests run, with pass, fail and skip counts: zig test of zig/src/server/root.zig, Zig 0.17.0, filtered to each new case. Each new test fails before its commit and passes after. The planner-query test and the four Cortheon program tests pass with the utility change.
  • Not run, and why: no Metal or CUDA run. The changes are host text handling, covered by the scripted tests.

A vision turn keeps its text parts, and the page budget only read a content string, so that text was treated as empty. The budget now counts those parts.
A raw byte cap on a progress line could split a character. The line now ends on a character boundary.
The first 160 bytes of a transform ask could split a character onto the verb, so the ask was no longer recognized and Cortheon researched it. The scan now ends on a character boundary.
A goal whose first word was longer than 120 bytes became an empty search query. That line is now skipped, so no empty query is sent.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant