@miller-tech/uap 1.96.5 → 1.96.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@miller-tech/uap",
3
- "version": "1.96.5",
3
+ "version": "1.96.6",
4
4
  "description": "Autonomous AI agent memory system with CLAUDE.md protocol enforcement",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -4276,6 +4276,13 @@ def build_openai_request(
4276
4276
  # retries (observed Shannon: max_tokens=512 + tools=7 -> ~5 retries
4277
4277
  # per turn). Bump up to THINKING_MIN_FOR_TOOLS for these requests.
4278
4278
  THINKING_MIN_FOR_TOOLS = 2048
4279
+ # No-tool turns need thinking headroom too: evaluator calls (acceptance
4280
+ # judge, critic, ideation) request ~4096 max_tokens, Qwen spends all of
4281
+ # it inside <think>, the EMPTY-OUTPUT GUARD promotes truncated
4282
+ # reasoning as the body, and the caller gets an unparseable verdict —
4283
+ # observed live as every acceptance judgment failing. Bump small
4284
+ # no-tool budgets so the model can finish thinking AND answer.
4285
+ THINKING_MIN_NO_TOOLS = int(os.environ.get("PROXY_THINKING_MIN_NO_TOOLS", "8192"))
4279
4286
  if skip_floor:
4280
4287
  requested_max = requested_raw
4281
4288
  # Even when skipping the big floor, bump small tool-turn
@@ -4292,6 +4299,18 @@ def build_openai_request(
4292
4299
  requested_raw,
4293
4300
  requested_max,
4294
4301
  )
4302
+ elif (
4303
+ not has_tools
4304
+ and THINKING_MIN_NO_TOOLS > 0
4305
+ and requested_raw < THINKING_MIN_NO_TOOLS
4306
+ and requested_raw > 16 # leave true preflight alone
4307
+ ):
4308
+ requested_max = THINKING_MIN_NO_TOOLS
4309
+ logger.info(
4310
+ "MAX_TOKENS thinking-floor (no-tool): %d -> %d (Qwen mandatory thinking; evaluator verdicts need room after <think>)",
4311
+ requested_raw,
4312
+ requested_max,
4313
+ )
4295
4314
  elif requested_raw < PROXY_MAX_TOKENS_FLOOR and PROXY_MAX_TOKENS_FLOOR > 0:
4296
4315
  logger.info(
4297
4316
  "MAX_TOKENS floor skipped: has_tools=%s thinking_active=%s requested=%d floor=%d",