fix(models): tighten audio capability + correct openai oauth content

This commit is contained in:
William Valentin
2026-02-14 00:43:48 -08:00
parent 4bb8c88fbe
commit 6212603821
3 changed files with 37 additions and 22 deletions
+2 -1
View File
@@ -96,9 +96,10 @@ export class OpenAIClient implements ModelClient {
.map((m) => {
const text = getMessageTextWithTools(m);
if (!text) {return null;}
const contentType = m.role === 'assistant' ? 'output_text' : 'input_text';
return {
role: m.role,
content: [{ type: 'input_text', text }],
content: [{ type: contentType, text }],
};
})
.filter((x): x is NonNullable<typeof x> => Boolean(x));