fix(llms): skip reasoning_effort patch for *-chat-latest models
normalizeModelName reduces gpt-5.2-chat-latest to gpt-52-chat-latest, which matches the gpt-52 prefix and gets reasoning_effort='none'. But chat-latest models don't support reasoning_effort, causing HTTP 400. Fix: check for 'chat-latest' before applying reasoning_effort patches. Fixes #563
This commit is contained in:
@@ -79,7 +79,10 @@ export function modelPatch(body: Record<string, any>) {
|
||||
debug('Applying GPT patch: set verbosity to low')
|
||||
body.verbosity = 'low'
|
||||
|
||||
if (modelName.startsWith('gpt-52')) {
|
||||
// *-chat-latest models don't support reasoning_effort — skip patches that set it
|
||||
if (modelName.includes('chat-latest')) {
|
||||
debug('Skipping reasoning_effort patch for chat-latest model')
|
||||
} else if (modelName.startsWith('gpt-52')) {
|
||||
debug('Applying GPT-52 patch: disable reasoning')
|
||||
body.reasoning_effort = 'none'
|
||||
} else if (modelName.startsWith('gpt-51')) {
|
||||
|
||||
Reference in New Issue
Block a user