Context budgets
Add budgets to a model in providers.json, then restart:
"my-model": { "contextWindow": 1000000, "contextWindows": [272000, 1000000]}/context cycles the sorted budgets. /context 272k, /context 1m, and /context 272000 select a declared value. Tab completes the current model’s choices.
Each model stores its choice in config.json.contextSelections, a nested {"provider": {"model": tokens}} map. A model with no saved valid choice starts at its lowest budget. Switching models restores that model’s choice. Finish the current turn or compaction before switching budgets.
--context selects one declared budget for the model chosen at launch, and only when that model has more than one. It applies to this process and is not written to contextSelections. A later /context still writes the operator’s choice.
The selected budget drives compaction, /status, and CTX percentages. Lowering it keeps the full archive and checks whether compaction is needed before the next model request. The default status bar shows Context 272K beside thinking. Custom lines can include context-window.
These are local budgets. They do not enable a provider’s long-context features, and they do not guarantee a billing threshold. Token estimates and large tool results can exceed the budget.