Skip to content

Tighten token-cap completion-length budgets (#271)#283

Merged
FuJacob merged 1 commit into
mainfrom
fix/completion-length-token-budget
May 27, 2026
Merged

Tighten token-cap completion-length budgets (#271)#283
FuJacob merged 1 commit into
mainfrom
fix/completion-length-token-budget

Conversation

@FuJacob

@FuJacob FuJacob commented May 27, 2026

Copy link
Copy Markdown
Owner

Summary

Completion length runs past the user's word-count setting because, with the token-cap-only experiment (#251), suggestedPredictionTokenBudget is the sole governor of length on the local model — and that experiment also bumped it 50% (11/18/30 → 17/27/45). The looser cap lets the model emit ~12 words on a 3-7 setting and spill onto multiple lines (#271). This keeps the token-cap-only design (the in-prompt word-range cue stays removed on both engines) and just returns the caps to 11/18/30 (~1.5× the upper word bound) so the limit lands close to the selected range.

Validation

xcodebuild -project Cotabby.xcodeproj -scheme Cotabby -destination 'platform=macOS' build-for-testing
# ** TEST BUILD SUCCEEDED **

App-hosted test execution fails locally only on the known Team ID code-signing mismatch (CotabbyTests bundle won't load); the updated budget assertions compile under build-for-testing.

Linked issues

Fixes #271

Risk / rollout notes

@FuJacob FuJacob force-pushed the fix/completion-length-token-budget branch from 38d0a93 to a516ece Compare May 27, 2026 01:10
@FuJacob FuJacob changed the title Fix completion length ignoring word-count setting (#271) Tighten token-cap completion-length budgets (#271) May 27, 2026
Completion length is governed solely by suggestedPredictionTokenBudget on
the local model (the in-prompt word-range cue stays removed). The 50% bump
to 17/27/45 let completions overrun the user's word-count setting — ~12
words on the 3-7 preset, often spilling multi-line (#271). Return the caps
to 11/18/30 (~1.5x the upper word bound) so the token limit lands close to
the selected range.
@FuJacob FuJacob force-pushed the fix/completion-length-token-budget branch from a516ece to e2c78a9 Compare May 27, 2026 01:15
@FuJacob FuJacob merged commit 71d6ceb into main May 27, 2026
3 checks passed
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.

[Bug] Length of cotabby generation doesn't seem to follow setting

1 participant