feat: add support for o1 models and update provider configurations

This commit is contained in:
kangfenmao 2025-02-05 16:14:35 +08:00
parent 02080954bc
commit 9024d48938
3 changed files with 5 additions and 4 deletions

View File

@ -144,7 +144,8 @@ const visionAllowedModels = [
'pixtral',
'gpt-4(?:-[\\w-]+)',
'gpt-4o(?:-[\\w-]+)?',
'chatgpt-4o(?:-[\\w-]+)?'
'chatgpt-4o(?:-[\\w-]+)?',
'o1(?:-[\\w-]+)?'
]
const visionExcludedModels = ['gpt-4-\\d+-preview', 'gpt-4-turbo-preview', 'gpt-4-32k', 'gpt-4-\\d+']

View File

@ -358,7 +358,7 @@ export const PROVIDER_CONFIG = {
},
aihubmix: {
api: {
url: 'https://aihubmix.com?aff=SJyh'
url: 'https://aihubmix.com'
},
websites: {
official: 'https://aihubmix.com?aff=SJyh',

View File

@ -165,7 +165,7 @@ export default class OpenAIProvider extends BaseProvider {
const isOpenAIo1 = model.id.startsWith('o1')
const isSupportStreamOutput = () => {
if (this.provider.id === 'github' && isOpenAIo1) {
if (isOpenAIo1) {
return false
}
return streamOutput
@ -251,7 +251,7 @@ export default class OpenAIProvider extends BaseProvider {
if (!onResponse) {
return false
}
if (this.provider.id === 'github' && isOpenAIo1) {
if (isOpenAIo1) {
return false
}
return true