Skip to content

Commit

Permalink
Add the o1 model (cline#1246)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrubens authored Jan 14, 2025
1 parent 0f09307 commit a025b5c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/api/providers/openai-native.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export class OpenAiNativeHandler implements ApiHandler {

async *createMessage(systemPrompt: string, messages: Anthropic.Messages.MessageParam[]): ApiStream {
switch (this.getModel().id) {
case "o1":
case "o1-preview":
case "o1-mini": {
// o1 doesnt support streaming, non-1 temp, or system prompt
Expand Down
8 changes: 8 additions & 0 deletions src/shared/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,14 @@ export type OpenAiNativeModelId = keyof typeof openAiNativeModels
export const openAiNativeDefaultModelId: OpenAiNativeModelId = "gpt-4o"
export const openAiNativeModels = {
// don't support tool use yet
o1: {
maxTokens: 100_000,
contextWindow: 200_000,
supportsImages: true,
supportsPromptCache: false,
inputPrice: 15,
outputPrice: 60,
},
"o1-preview": {
maxTokens: 32_768,
contextWindow: 128_000,
Expand Down

0 comments on commit a025b5c

Please sign in to comment.