Skip to content

Commit 7d8037c

Browse files
committed
feat: add gpt-5.1 and gpt-5.2 models to modelCapabilities.ts
Signed-off-by: Takuma IMAMURA <209989118+hyperfinitism@users.noreply.github.com>
1 parent 1ee8980 commit 7d8037c

File tree

1 file changed

+98
-13
lines changed

1 file changed

+98
-13
lines changed

src/vs/workbench/contrib/void/common/modelCapabilities.ts

Lines changed: 98 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,9 @@ export const defaultProviderSettings = {
7272

7373

7474
export const defaultModelsOfProvider = {
75-
openAI: [ // https://platform.openai.com/docs/models/gp
75+
openAI: [ // https://platform.openai.com/docs/models
76+
'gpt-5.2',
77+
'gpt-5.1',
7678
'gpt-4.1',
7779
'gpt-4.1-mini',
7880
'gpt-4.1-nano',
@@ -450,9 +452,11 @@ const extensiveModelOptionsFallback: VoidStaticProviderInfo['modelOptionsFallbac
450452

451453
if (lower.includes('quasar') || lower.includes('quaser')) return toFallback(openSourceModelOptions_assumingOAICompat, 'quasar')
452454

453-
if (lower.includes('gpt') && lower.includes('mini') && (lower.includes('4.1') || lower.includes('4-1'))) return toFallback(openAIModelOptions, 'gpt-4.1-mini')
454-
if (lower.includes('gpt') && lower.includes('nano') && (lower.includes('4.1') || lower.includes('4-1'))) return toFallback(openAIModelOptions, 'gpt-4.1-nano')
455+
if (lower.includes('gpt') && (lower.includes('4.1') || lower.includes('4-1')) && lower.includes('mini')) return toFallback(openAIModelOptions, 'gpt-4.1-mini')
456+
if (lower.includes('gpt') && (lower.includes('4.1') || lower.includes('4-1')) && lower.includes('nano')) return toFallback(openAIModelOptions, 'gpt-4.1-nano')
455457
if (lower.includes('gpt') && (lower.includes('4.1') || lower.includes('4-1'))) return toFallback(openAIModelOptions, 'gpt-4.1')
458+
if (lower.includes('gpt') && (lower.includes('5.1') || lower.includes('5-1'))) return toFallback(openAIModelOptions, 'gpt-5.1')
459+
if (lower.includes('gpt') && (lower.includes('5.2') || lower.includes('5-2'))) return toFallback(openAIModelOptions, 'gpt-5.2')
456460

457461
if (lower.includes('4o') && lower.includes('mini')) return toFallback(openAIModelOptions, 'gpt-4o-mini')
458462
if (lower.includes('4o')) return toFallback(openAIModelOptions, 'gpt-4o')
@@ -603,30 +607,84 @@ const anthropicSettings: VoidStaticProviderInfo = {
603607

604608
// ---------------- OPENAI ----------------
605609
const openAIModelOptions = { // https://platform.openai.com/docs/pricing
610+
'gpt-5.2': {
611+
contextWindow: 400_000,
612+
reservedOutputTokenSpace: 128_000,
613+
cost: { input: 1.75, cache_read: 0.175, output: 14.00 },
614+
downloadable: false,
615+
supportsFIM: false,
616+
supportsSystemMessage: 'developer-role',
617+
reasoningCapabilities: {
618+
supportsReasoning: true,
619+
canTurnOffReasoning: false,
620+
canIOReasoning: false,
621+
reasoningSlider: {
622+
type: 'effort_slider',
623+
values: ['none', 'low', 'medium', 'high', 'xhigh'],
624+
default: 'low'
625+
}
626+
},
627+
},
628+
'gpt-5.1': {
629+
contextWindow: 400_000,
630+
reservedOutputTokenSpace: 128_000,
631+
cost: { input: 1.25, cache_read: 0.125, output: 10.00 },
632+
downloadable: false,
633+
supportsFIM: false,
634+
supportsSystemMessage: 'developer-role',
635+
reasoningCapabilities: {
636+
supportsReasoning: true,
637+
canTurnOffReasoning: false,
638+
canIOReasoning: false,
639+
reasoningSlider: {
640+
type: 'effort_slider',
641+
values: ['none', 'low', 'medium', 'high'],
642+
default: 'low'
643+
}
644+
},
645+
},
606646
'o3': {
607647
contextWindow: 1_047_576,
608648
reservedOutputTokenSpace: 32_768,
609-
cost: { input: 10.00, output: 40.00, cache_read: 2.50 },
649+
cost: { input: 2.00, cache_read: 0.50, output: 8.00 },
610650
downloadable: false,
611651
supportsFIM: false,
612652
specialToolFormat: 'openai-style',
613653
supportsSystemMessage: 'developer-role',
614-
reasoningCapabilities: { supportsReasoning: true, canTurnOffReasoning: false, canIOReasoning: false, reasoningSlider: { type: 'effort_slider', values: ['low', 'medium', 'high'], default: 'low' } },
654+
reasoningCapabilities: {
655+
supportsReasoning: true,
656+
canTurnOffReasoning: false,
657+
canIOReasoning: false,
658+
reasoningSlider: {
659+
type: 'effort_slider',
660+
values: ['low', 'medium', 'high'],
661+
default: 'low'
662+
}
663+
},
615664
},
616665
'o4-mini': {
617666
contextWindow: 1_047_576,
618667
reservedOutputTokenSpace: 32_768,
619-
cost: { input: 1.10, output: 4.40, cache_read: 0.275 },
668+
cost: { input: 1.10, cache_read: 0.275, output: 4.40 },
620669
downloadable: false,
621670
supportsFIM: false,
622671
specialToolFormat: 'openai-style',
623672
supportsSystemMessage: 'developer-role',
624-
reasoningCapabilities: { supportsReasoning: true, canTurnOffReasoning: false, canIOReasoning: false, reasoningSlider: { type: 'effort_slider', values: ['low', 'medium', 'high'], default: 'low' } },
673+
reasoningCapabilities: {
674+
supportsReasoning: true,
675+
canTurnOffReasoning: false,
676+
canIOReasoning: false,
677+
reasoningSlider: {
678+
type: 'effort_slider',
679+
values: ['low', 'medium', 'high'],
680+
default: 'low'
681+
}
682+
},
625683
},
626684
'gpt-4.1': {
627685
contextWindow: 1_047_576,
628686
reservedOutputTokenSpace: 32_768,
629-
cost: { input: 2.00, output: 8.00, cache_read: 0.50 },
687+
cost: { input: 2.00, cache_read: 0.50, output: 8.00 },
630688
downloadable: false,
631689
supportsFIM: false,
632690
specialToolFormat: 'openai-style',
@@ -636,7 +694,7 @@ const openAIModelOptions = { // https://platform.openai.com/docs/pricing
636694
'gpt-4.1-mini': {
637695
contextWindow: 1_047_576,
638696
reservedOutputTokenSpace: 32_768,
639-
cost: { input: 0.40, output: 1.60, cache_read: 0.10 },
697+
cost: { input: 0.40, cache_read: 0.10, output: 1.60 },
640698
downloadable: false,
641699
supportsFIM: false,
642700
specialToolFormat: 'openai-style',
@@ -646,7 +704,7 @@ const openAIModelOptions = { // https://platform.openai.com/docs/pricing
646704
'gpt-4.1-nano': {
647705
contextWindow: 1_047_576,
648706
reservedOutputTokenSpace: 32_768,
649-
cost: { input: 0.10, output: 0.40, cache_read: 0.03 },
707+
cost: { input: 0.10, cache_read: 0.025, output: 0.40 },
650708
downloadable: false,
651709
supportsFIM: false,
652710
specialToolFormat: 'openai-style',
@@ -660,7 +718,16 @@ const openAIModelOptions = { // https://platform.openai.com/docs/pricing
660718
downloadable: false,
661719
supportsFIM: false,
662720
supportsSystemMessage: 'developer-role',
663-
reasoningCapabilities: { supportsReasoning: true, canTurnOffReasoning: false, canIOReasoning: false, reasoningSlider: { type: 'effort_slider', values: ['low', 'medium', 'high'], default: 'low' } },
721+
reasoningCapabilities: {
722+
supportsReasoning: true,
723+
canTurnOffReasoning: false,
724+
canIOReasoning: false,
725+
reasoningSlider: {
726+
type: 'effort_slider',
727+
values: ['low', 'medium', 'high'],
728+
default: 'low'
729+
}
730+
},
664731
},
665732
'o3-mini': {
666733
contextWindow: 200_000,
@@ -669,7 +736,16 @@ const openAIModelOptions = { // https://platform.openai.com/docs/pricing
669736
downloadable: false,
670737
supportsFIM: false,
671738
supportsSystemMessage: 'developer-role',
672-
reasoningCapabilities: { supportsReasoning: true, canTurnOffReasoning: false, canIOReasoning: false, reasoningSlider: { type: 'effort_slider', values: ['low', 'medium', 'high'], default: 'low' } },
739+
reasoningCapabilities: {
740+
supportsReasoning: true,
741+
canTurnOffReasoning: false,
742+
canIOReasoning: false,
743+
reasoningSlider: {
744+
type: 'effort_slider',
745+
values: ['low', 'medium', 'high'],
746+
default: 'low'
747+
}
748+
},
673749
},
674750
'gpt-4o': {
675751
contextWindow: 128_000,
@@ -688,7 +764,16 @@ const openAIModelOptions = { // https://platform.openai.com/docs/pricing
688764
downloadable: false,
689765
supportsFIM: false,
690766
supportsSystemMessage: false, // does not support any system
691-
reasoningCapabilities: { supportsReasoning: true, canTurnOffReasoning: false, canIOReasoning: false, reasoningSlider: { type: 'effort_slider', values: ['low', 'medium', 'high'], default: 'low' } },
767+
reasoningCapabilities: {
768+
supportsReasoning: true,
769+
canTurnOffReasoning: false,
770+
canIOReasoning: false,
771+
reasoningSlider: {
772+
type: 'effort_slider',
773+
values: ['low', 'medium', 'high'],
774+
default: 'low'
775+
}
776+
},
692777
},
693778
'gpt-4o-mini': {
694779
contextWindow: 128_000,

0 commit comments

Comments
 (0)