From bd997352838cd6fa236a8cd941f5801af7b335c3 Mon Sep 17 00:00:00 2001 From: Denton Social Date: Thu, 24 Sep 2026 19:25:55 -0500 Subject: [PATCH] document item 2 findings: /api/show string parameters, relaxed budget defaults --- AGENTS.md | 34 +++++++++++++++++++++++++++------- 1 file changed, 27 insertions(+), 7 deletions(-) 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