Commit Graph
6 Commits
Author SHA1 Message Date
Tam Nhu Tran 92e2ec111d fix(thinking): harden codex reasoning controls across cli and dashboard 2026-02-19 14:13:41 +07:00
kaitranntt ca490a9f4e fix(cliproxy): handle edge cases in thinking validation
- model-catalog: add null guard and trim for modelId lookup
- thinking-validator: add 100 char length limit, accept "8192.0" format
- cliproxy-executor: error on empty --thinking= value
- use-thinking-config: handle HTML error pages, return cleanup fn
2026-01-21 17:52:16 -05:00
kaitranntt 299d96c011 fix(api): add type guard for tier_defaults and extract tiers constant
- Add defensive type guard in misc-routes.ts to prevent runtime crash
  if malformed tier_defaults object is passed to PUT /api/thinking
- Extract VALID_THINKING_TIERS constant to thinking-validator.ts
  to eliminate duplication across validation code
- Export constant from cliproxy barrel file

Addresses P2/P3 items from PR #351 review
2026-01-21 17:39:54 -05:00
kaitranntt eec44d54e2 feat(cliproxy): add model-specific reasoning effort caps
Add maxLevel field to ThinkingSupport interface to cap reasoning
effort at model's maximum supported level. This fixes Issue #344
where gpt-5-mini fails with xhigh reasoning (only supports high).

- Add Codex provider to model catalog with gpt-5.2-codex and gpt-5-mini
- Add capLevelAtMax() and capEffortAtModelMax() for runtime capping
- Update UI presets with new Codex models and tier mappings
2026-01-21 14:27:46 -05:00
kaitranntt 5f8d23c60b fix(cliproxy): add NaN/Infinity and empty string validation
- Add Number.isFinite() check to reject NaN/Infinity budgets
- Add explicit empty string handling before level validation
2026-01-08 15:48:39 -05:00
kaitranntt 82ef6804bb feat(cliproxy): add thinking budget validator module
- validate user-provided thinking values against model capabilities

- clamp out-of-range budgets, map invalid levels to closest valid

- export constants for budget bounds (MIN=0, MAX=100000)

- support off/auto/level names and numeric budgets

Refs #307
2026-01-08 15:18:29 -05:00