Repository navigation
Write context window and max tokens into Pi's models.json on configure - #37
Closed
devin-ai-integration[bot] wants to merge 3 commits into
Closed
devin-ai-integration[bot] wants to merge 3 commits into
devin-ai-integration[bot] wants to merge 3 commits into
Conversation
Co-Authored-By: john <john@requesty.ai>
devin-ai-integration
Bot
requested review from
lavicosa,
nickc128,
requesty-JohnCosta27 and
requesty-ditti
as code owners
October 7, 2026 11:02
Contributor
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
AI CostNo spend detected for branch Updated 2026-10-27T12:46Z · last 30 days · data from Requesty |
requesty-JohnCosta27
requested changes
Oct 7, 2026
Co-Authored-By: john <john@requesty.ai>
Co-Authored-By: john <john@requesty.ai>
Contributor
Author
|
Tested 70043b8 end to end with the real Requesty catalog, an isolated HOME, and plain Pi v1.4.0 with extensions disabled (
Not exercised: actual compaction near 1M tokens, and the 200k fallback for a model with no |
Contributor
Author
|
Replaced by #40 (branch renamed to fix/eng-2213-..., squashed). |
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.
Summary
Before this change,
requesty configurefor Pi wrote only{"id": "<model>"}into~/.pi/agent/models.json. Pi then used its custom-model defaults (contextWindow ?? 128000,maxTokens ?? 16384inmodelFromJson), so a 1M-context model run through plainpiauto-compacted at 128k.The shared
modelpickeralready holds the fullclient.Modelfrom/v1/models//v1/models/managed.modelpicker.ChosenMsgnow carries thatModelinstead of just the ID, and the integrations wizard copies itsContextWindowandMaxOutputTokensintoConfigureOptions. In both configure paths (merge and overwrite), Pi builds its entry from those withpiCatalogModelFrom, the same function therequesty pilaunch catalog uses:{"id": "anthropic/claude-sonnet-5-5", "contextWindow": 1000000, "maxTokens": 128000}If the list has no value for one of these, the launch defaults are written (
piCatalogContextWindow200k,piCatalogMaxTokens8192). Other harnesses ignore the new options.The values are a snapshot from configure time; the
pi-requestyextension, if installed, replaces them with live limits on startup.Link to Devin session: https://app.devin.ai/sessions/ed8e81b7f4e246f79baeef970ae8f691
Open in Devin Desktop: https://app.devin.ai/desktop/session/ed8e81b7f4e246f79baeef970ae8f691?variant=devin
Requested by: @requesty-JohnCosta27