Repository navigation
Default web/fetch max_chars to a tenth of the calling model's context window - #18
Open
sharmis-tp wants to merge 1 commit into
Open
sharmis-tp wants to merge 1 commit into
sharmis-tp wants to merge 1 commit into
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For #7.
When a call leaves
max_charsout,web/fetchnow takes the default from thecontextinToolCall::model: a tenth of the window at about four characters a token, socontext * 2 / 5, and never over the ceiling of 40,000.contextmax_charscontextA
max_charsthe call names still wins, up to the ceiling. The schema stays the same for every model. Itsmax_charsdescription gains one sentence about the default.Tests: unit tests cover the rule and unusable
contextvalues. A Pack test through the SDK's fake Host covers a small model, a large model, a script call, and a small model that namesmax_chars. It fails when the model is not passed through. All 182 tests, fmt, clippy and docs pass on Linux.Two questions:
max_chars, so a lower default makes it rarer. With an 8,000-token window, a short fragment of a page over 3,200 characters is kept, where before the whole page was returned. Should the fallback keep using the ceiling, or is the article the right choice for a small window?This leaves out the description-only render, as I suggested in #7. If you agree, this closes #7.