Skip to content

Commit 809bb7f

Browse files
authored
feat: support gpt-5.2-chat-latest model (#667)
Signed-off-by: Bob Du <[email protected]>
1 parent f5f57b4 commit 809bb7f

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

service/src/chatgpt/index.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,8 +256,9 @@ search result: <search_result>${searchResultContent}</search_result>`,
256256
}
257257
}
258258

259-
// This model does not support setting reasoning effort, so set reasoning to empty object
260-
if (model === 'gpt-5.1-chat-latest') {
259+
// Models that start with 'gpt' and end with 'chat-latest' (e.g., gpt-5.1-chat-latest, gpt-5.2-chat-latest)
260+
// do not support setting reasoning effort, so set reasoning to empty object
261+
if (model.startsWith('gpt') && model.endsWith('chat-latest')) {
261262
reasoning = {}
262263
}
263264

service/src/storage/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ export async function getOriginConfig() {
9696
}
9797

9898
if (!isNotEmptyString(config.siteConfig.chatModels))
99-
config.siteConfig.chatModels = 'gpt-4.1,gpt-4.1-mini,gpt-4.1-nano'
99+
config.siteConfig.chatModels = 'gpt-5.2,gpt-5-mini,gpt-5-nano'
100100
return config
101101
}
102102

0 commit comments

Comments
 (0)