feat(openai): per-tool MaxContextTokens prompt budget #3
No reviewers
Labels
No labels
area/engine
clarity/clear
enhancement
security
size/M
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
basepeak-ai/gptscript!3
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/max-context-tokens"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Plumbs a new budget-only field
MaxContextTokensthrough types/completion/engine/parser and makes the prompt-trim budget prefer it: precedenceMaxContextTokens > MaxTokens (legacy) > GPTSCRIPT_DEFAULT_MAX_TOKENS env > 400k.request.MaxTokens(output limit) andisContextLengthErrorare untouched. Lets bpai set a per-model context window without conflating it with the output max_tokens.\n\nCommits: plumb field (+parser round-trip test); prefer it in getBudget/dropMessagesOverCount/decreaseTenPercent.