okami.mom/strata
git clone https://git.nkp.pet/okami.mom/strata
aff3a132f
main
1"""The conversation context a model starts with: 128K on every card, unless the person picks another (owner, 2026-11-01). 2 3One rule for the app (apps/host/src/lib/default-context.ts says the same), the Terminal (`strata launch`, `setup`) and the MCP tools: 128K, or the 4largest size the model offers when that is under 128K. The VRAM tiers that used to lower it on small 5cards are gone; a card that 128K leaves little room on gets a warning, never a lower number (the engine says plainly if it cannot start). 6A Mac keeps its unified-memory rule (strata_control/mac_fit.py), which the owner has not changed. 7""" 8from __future__import annotations 9 10from typing import Iterable 11 12DEFAULT_CONTEXT = 131072 13 14 15def pick (sizes :Iterable [int ]| None = None )-> int : 16"""128K, or the largest of `sizes` under it, or (when every size is longer) the smallest.""" 17have = sorted (int (s )for s in (sizes or ())if int (s )> 0 ) 18under = [s for s in have if s <= DEFAULT_CONTEXT ] 19return under [- 1 ]if under else (have [0 ]if have else DEFAULT_CONTEXT )