Skip to content

Commit

Permalink
💄 style: Add o1 model in openai and openrouter models (lobehub#5236)
Browse files Browse the repository at this point in the history
* Add o1 model in Openai models

* Add o1 model in Openrouter models

* Update openrouter.ts

* Update modelProvider.test.ts
  • Loading branch information
SpeedupMaster authored Dec 31, 2024
1 parent e420ab3 commit f733852
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/config/modelProviders/openai.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,21 @@ const OpenAI: ModelProviderCard = {
},
releasedAt: '2024-09-12',
},
{
contextWindowTokens: 200_000,
description:
'o1是OpenAI新的推理模型,支持图文输入并输出文本,适用于需要广泛通用知识的复杂任务。该模型具有200K上下文和2023年10月的知识截止日期。',
displayName: 'OpenAI o1',
enabled: true,
id: 'o1-2024-12-17',
maxOutput: 100_000,
pricing: {
input: 15,
output: 60,
},
vision: true,
releasedAt: '2024-12-17',
},
{
contextWindowTokens: 128_000,
description:
Expand Down
15 changes: 15 additions & 0 deletions src/config/modelProviders/openrouter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,21 @@ const OpenRouter: ModelProviderCard = {
},
releasedAt: '2024-09-12',
},
{
contextWindowTokens: 200_000,
description:
'o1是OpenAI新的推理模型,支持图文输入并输出文本,适用于需要广泛通用知识的复杂任务。该模型具有200K上下文和2023年10月的知识截止日期。',
displayName: 'OpenAI o1',
enabled: true,
id: 'openai/o1',
maxOutput: 100_000,
pricing: {
input: 15,
output: 60,
},
releasedAt: '2024-12-17',
vision: true,
},
{
contextWindowTokens: 128_000,
description:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ describe('modelProviderSelectors', () => {
const result = modelProviderSelectors.getDefaultEnabledModelsById('openai')(s);
expect(result).toEqual([
'o1-mini',
'o1-2024-12-17',
'o1-preview',
'gpt-4o-mini',
'gpt-4o-2024-11-20',
Expand Down

0 comments on commit f733852

Please sign in to comment.