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 909e88f8a3
commit 9dadef6df3
3 changed files with 5 additions and 4 deletions

View File

@ -144,7 +144,8 @@ const visionAllowedModels = [
'pixtral', 'pixtral',
'gpt-4(?:-[\\w-]+)', 'gpt-4(?:-[\\w-]+)',
'gpt-4o(?:-[\\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+'] 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: { aihubmix: {
api: { api: {
url: 'https://aihubmix.com?aff=SJyh' url: 'https://aihubmix.com'
}, },
websites: { websites: {
official: 'https://aihubmix.com?aff=SJyh', 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 isOpenAIo1 = model.id.startsWith('o1')
const isSupportStreamOutput = () => { const isSupportStreamOutput = () => {
if (this.provider.id === 'github' && isOpenAIo1) { if (isOpenAIo1) {
return false return false
} }
return streamOutput return streamOutput
@ -251,7 +251,7 @@ export default class OpenAIProvider extends BaseProvider {
if (!onResponse) { if (!onResponse) {
return false return false
} }
if (this.provider.id === 'github' && isOpenAIo1) { if (isOpenAIo1) {
return false return false
} }
return true return true