mirror of
https://github.com/val1813/kwcode.git
synced 2026-09-03 06:34:30 +08:00
Model tier detection now active (was orphaned code): - orchestrator.__init__: detect tier from generator.llm.ollama_model - ctx.model_tier written at run() start, flows to Generator - Generator._build_system(): SMALL gets strict format constraints (1 function, ≤10 lines, preserve indent, no explanation, ≤15 words between tools) LARGE gets minimal constraint; MEDIUM uses base rules as-is - _get_max_retries() respects model_strategy.max_retries Context window auto-detection (get_effective_ctx): - 4-layer probe: llama.cpp /props → vLLM /v1/models → Ollama modelinfo.llama.context_length → tier default - Passed to LLMBackend n_ctx in build_pipeline - SMALL=16K, MEDIUM=32K, LARGE=64K defaults; native ctx capped at 64K×0.8 501 tests green, 0 regression. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>