Update error

This commit is contained in:
Sean Goedecke
2025-08-05 02:52:11 +00:00
parent 18367df745
commit 009d5e6e28
3 changed files with 3 additions and 5 deletions
+1 -2
View File
@@ -111,8 +111,7 @@ export async function mcpInference(
const response = await client.chat.completions.create(chatCompletionRequest)
if (!('choices' in response)) {
core.error('Unexpected response format from OpenAI API')
return null
throw new Error(`Unexpected response format from API: ${JSON.stringify(response)}`)
}
const assistantMessage = response.choices[0]?.message