diff --git a/AGENTS.md b/AGENTS.md index b12b663..7d8ab71 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -258,21 +258,41 @@ WARN 100–200K, DUMB>200K), so limits are a total-context budget must raise while tokens still flow. - Verify: `python3 -m pytest tests/ -q --ignore=tests/integration`. -- [ ] **2. Auto-detect context window + layered token budget** (`codegen.py`, `cli.py`, `config.example.json`) - - `CodegenClient` lazily queries `GET /api/show {model}` → `parameters.num_ctx` +- [x] **2. Auto-detect context window + layered token budget** (`codegen.py`, `cli.py`, `config.example.json`) + - `CodegenClient` lazily queries `POST /api/show {model}` → `parameters.num_ctx` (fallback `model_info..context_length`, then `context_window` config, then default 100000). - Per request: `total_limit = min(smart_limit, window*max_fill_ratio)`; `output_limit = min(max_output, total_limit - prompt_est)`; `warn_point = min(warn_limit, window*warn_fill_ratio)`. - `max_output`: `>=1` = absolute tokens, `0