MCPcopy Create free account
hub / github.com/codehamr/codehamr / Budget

Function Budget

internal/ctx/ctx.go:395–401  ·  view source on GitHub ↗

Budget subtracts the fixed reservations from the total context size, then leaves a headroom margin (see budgetHeadroomDivisor) so a char/4 undercount can't push the real prompt past the declared window.

(ctxSize int)

Source from the content-addressed store, hash-verified

393 break
394 }
395 }
396 if dangling {
397 continue
398 }
399 }
400 out = append(out, m)
401 }
402 return out
403}
404

Callers 1

TestBudgetFunction · 0.85

Calls 1

ResponseReserveFunction · 0.85

Tested by 1

TestBudgetFunction · 0.68