Skip to content

Commit 2b2bc50

Browse files
authored
fix: gpt5 models (#154)
1 parent a19f1d1 commit 2b2bc50

File tree

1 file changed

+22
-11
lines changed

1 file changed

+22
-11
lines changed

modules/model/provider/openai.ts

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,35 +9,44 @@ const models: ProviderConfigType = {
99
maxContext: 400000,
1010
maxTokens: 128000,
1111
quoteMaxToken: 400000,
12-
maxTemperature: 1.2,
13-
responseFormatList: ['text', 'json_object', 'json_schema'],
12+
maxTemperature: null,
13+
responseFormatList: ['text', 'json_schema'],
1414
vision: true,
1515
reasoning: false,
16-
toolChoice: true
16+
toolChoice: true,
17+
fieldMap: {
18+
max_tokens: 'max_completion_tokens'
19+
}
1720
},
1821
{
1922
type: ModelTypeEnum.llm,
2023
model: 'gpt-5-mini',
2124
maxContext: 400000,
2225
maxTokens: 128000,
2326
quoteMaxToken: 400000,
24-
maxTemperature: 1.2,
25-
responseFormatList: ['text', 'json_object', 'json_schema'],
27+
maxTemperature: null,
28+
responseFormatList: ['text', 'json_schema'],
2629
vision: true,
2730
reasoning: false,
28-
toolChoice: true
31+
toolChoice: true,
32+
fieldMap: {
33+
max_tokens: 'max_completion_tokens'
34+
}
2935
},
3036
{
3137
type: ModelTypeEnum.llm,
3238
model: 'gpt-5-nano',
3339
maxContext: 400000,
3440
maxTokens: 128000,
3541
quoteMaxToken: 400000,
36-
maxTemperature: 1.2,
37-
responseFormatList: ['text', 'json_object', 'json_schema'],
42+
maxTemperature: null,
43+
responseFormatList: ['text', 'json_schema'],
3844
vision: true,
3945
reasoning: false,
40-
toolChoice: true
46+
toolChoice: true,
47+
fieldMap: {
48+
max_tokens: 'max_completion_tokens'
49+
}
4150
},
4251
{
4352
type: ModelTypeEnum.llm,
@@ -46,10 +55,12 @@ const models: ProviderConfigType = {
4655
maxTokens: 128000,
4756
quoteMaxToken: 400000,
4857
maxTemperature: 1.2,
49-
responseFormatList: ['text', 'json_object', 'json_schema'],
5058
vision: true,
5159
reasoning: false,
52-
toolChoice: true
60+
toolChoice: true,
61+
fieldMap: {
62+
max_tokens: 'max_completion_tokens'
63+
}
5364
},
5465

5566
{

0 commit comments

Comments
 (0)