fix: improved openai provider model id validation logic

This commit is contained in:
kangfenmao 2025-01-15 11:32:49 +08:00
parent 75742323ea
commit fe0f6318c9

View File

@ -191,7 +191,7 @@ export default class OpenAIProvider extends BaseProvider {
userMessages.push(await this.getMessageParam(message, model)) userMessages.push(await this.getMessageParam(message, model))
} }
const isOpenAIo1 = model.id.includes('o1-') || model.id === 'o1' const isOpenAIo1 = model.id.startsWith('o1')
const isSupportStreamOutput = () => { const isSupportStreamOutput = () => {
if (this.provider.id === 'github' && isOpenAIo1) { if (this.provider.id === 'github' && isOpenAIo1) {