Repository navigation
[eng-2213] Write context window and max tokens into Pi's models.json on configure - #40
Merged
Merged
Conversation
…on configure 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 27, 2026 13:08
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-27T13:10Z · last 30 days · data from Requesty |
lavicosa
requested changes
Oct 27, 2026
Co-Authored-By: john <john@requesty.ai>
lavicosa
self-requested a review
October 27, 2026 13:11
lavicosa
approved these changes
Oct 27, 2026
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
Replaces #37 so the branch name matches the ticket. The code is the same, squashed into one commit.
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 plainpiauto-compacted a 1M-context model at 128k.The shared
modelpickeralready holds the fullclient.Modelfrom/v1/modelsand/v1/models/managed.modelpicker.ChosenMsgnow carries thatModelinstead of just the ID. The integrations wizard copies itsContextWindowandMaxOutputTokensintoConfigureOptions. Both Pi configure paths (merge and overwrite) build the entry withpiCatalogModelFrom, the same function therequesty pilaunch catalog uses:{"id": "anthropic/claude-sonnet-5-5", "contextWindow": 1000000, "maxTokens": 128000}If the model list has no value for one of these fields, the launch default is written instead (
piCatalogContextWindow200k,piCatalogMaxTokens8192). Other harnesses ignore the new options.These values are fixed when you run configure. If the
pi-requestyextension is installed, it replaces them with live limits when Pi starts.I tested this end to end on #37 with the real Requesty catalog: TUI configure, then plain Pi with
--no-extensions. The Pi footer showed/1.0M; results are in the #37 comments.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