Discover Packages
github.com/dmmdea/offload-harness
internal
contextbudget
package
Version:
v0.6.0
Opens a new window with list of versions in this module.
Published: Jun 29, 2026
License: Apache-2.0
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
Package contextbudget trims oversized input before it reaches the local
model, keeping requests inside the model's context window.
IsTrivial reports whether input is too small/empty to bother offloading.
Trim caps input to maxChars. When it must cut, it keeps the head and tail
(where summaries/structure usually live) and inserts an elision marker.
Returns the possibly-trimmed text and whether trimming occurred.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.