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
This commit is contained in:
kaitranntt
2026-01-21 14:27:46 -05:00
parent 2f584802bd
commit eec44d54e2
4 changed files with 152 additions and 19 deletions
+24 -2
View File
@@ -114,12 +114,34 @@ export const MODEL_CATALOGS: Record<string, ProviderCatalog> = {
codex: {
provider: 'codex',
displayName: 'Codex',
defaultModel: 'gpt-5.1-codex-max',
defaultModel: 'gpt-5.2-codex',
models: [
{
id: 'gpt-5.2-codex',
name: 'GPT-5.2 Codex',
description: 'Full reasoning support (xhigh)',
presetMapping: {
default: 'gpt-5.2-codex',
opus: 'gpt-5.2-codex',
sonnet: 'gpt-5.2-codex',
haiku: 'gpt-5-mini',
},
},
{
id: 'gpt-5-mini',
name: 'GPT-5 Mini',
description: 'Fast, capped at high reasoning (no xhigh)',
presetMapping: {
default: 'gpt-5-mini',
opus: 'gpt-5.2-codex',
sonnet: 'gpt-5-mini',
haiku: 'gpt-5-mini',
},
},
{
id: 'gpt-5.1-codex-max',
name: 'Codex Max (5.1)',
description: 'Most capable Codex model',
description: 'Legacy most capable Codex model',
presetMapping: {
default: 'gpt-5.1-codex-max',
opus: 'gpt-5.1-codex-max-high',