Skip to content

Commit 0aa5f1f

Browse files
committed
Add the o1 model
1 parent 537514d commit 0aa5f1f

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

src/api/providers/openai-native.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ export class OpenAiNativeHandler implements ApiHandler {
2424

2525
async *createMessage(systemPrompt: string, messages: Anthropic.Messages.MessageParam[]): ApiStream {
2626
switch (this.getModel().id) {
27+
case "o1":
2728
case "o1-preview":
2829
case "o1-mini": {
2930
// o1 doesnt support streaming, non-1 temp, or system prompt

src/shared/api.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -481,6 +481,14 @@ export type OpenAiNativeModelId = keyof typeof openAiNativeModels
481481
export const openAiNativeDefaultModelId: OpenAiNativeModelId = "gpt-4o"
482482
export const openAiNativeModels = {
483483
// don't support tool use yet
484+
"o1": {
485+
maxTokens: 100_000,
486+
contextWindow: 200_000,
487+
supportsImages: true,
488+
supportsPromptCache: false,
489+
inputPrice: 15,
490+
outputPrice: 60,
491+
},
484492
"o1-preview": {
485493
maxTokens: 32_768,
486494
contextWindow: 128_000,

0 commit comments

Comments
 (0)