mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
feat: add gpt-5.2 model to openai-native provider (#10024)
This commit is contained in:
parent
87317091ee
commit
51dbccf2e6
2 changed files with 38 additions and 3 deletions
|
|
@ -3,7 +3,7 @@ import type { ModelInfo } from "../model.js"
|
|||
// https://openai.com/api/pricing/
|
||||
export type OpenAiNativeModelId = keyof typeof openAiNativeModels
|
||||
|
||||
export const openAiNativeDefaultModelId: OpenAiNativeModelId = "gpt-5.1"
|
||||
export const openAiNativeDefaultModelId: OpenAiNativeModelId = "gpt-5.1-codex-max"
|
||||
|
||||
export const openAiNativeModels = {
|
||||
"gpt-5.1-codex-max": {
|
||||
|
|
@ -16,7 +16,7 @@ export const openAiNativeModels = {
|
|||
supportsPromptCache: true,
|
||||
promptCacheRetention: "24h",
|
||||
supportsReasoningEffort: ["low", "medium", "high", "xhigh"],
|
||||
reasoningEffort: "medium",
|
||||
reasoningEffort: "xhigh",
|
||||
inputPrice: 1.25,
|
||||
outputPrice: 10.0,
|
||||
cacheReadsPrice: 0.125,
|
||||
|
|
@ -25,6 +25,41 @@ export const openAiNativeModels = {
|
|||
description:
|
||||
"GPT-5.1 Codex Max: Our most intelligent coding model optimized for long-horizon, agentic coding tasks",
|
||||
},
|
||||
"gpt-5.2": {
|
||||
maxTokens: 128000,
|
||||
contextWindow: 400000,
|
||||
supportsNativeTools: true,
|
||||
includedTools: ["apply_patch"],
|
||||
excludedTools: ["apply_diff", "write_to_file"],
|
||||
supportsImages: true,
|
||||
supportsPromptCache: true,
|
||||
promptCacheRetention: "24h",
|
||||
supportsReasoningEffort: ["none", "low", "medium", "high", "xhigh"],
|
||||
reasoningEffort: "medium",
|
||||
inputPrice: 1.75,
|
||||
outputPrice: 14.0,
|
||||
cacheReadsPrice: 0.175,
|
||||
supportsVerbosity: true,
|
||||
supportsTemperature: false,
|
||||
tiers: [
|
||||
{ name: "flex", contextWindow: 400000, inputPrice: 0.875, outputPrice: 7.0, cacheReadsPrice: 0.0875 },
|
||||
{ name: "priority", contextWindow: 400000, inputPrice: 3.5, outputPrice: 28.0, cacheReadsPrice: 0.35 },
|
||||
],
|
||||
description: "GPT-5.2: Our flagship model for coding and agentic tasks across industries",
|
||||
},
|
||||
"gpt-5.2-chat-latest": {
|
||||
maxTokens: 16_384,
|
||||
contextWindow: 128_000,
|
||||
supportsNativeTools: true,
|
||||
includedTools: ["apply_patch"],
|
||||
excludedTools: ["apply_diff", "write_to_file"],
|
||||
supportsImages: true,
|
||||
supportsPromptCache: true,
|
||||
inputPrice: 1.75,
|
||||
outputPrice: 14.0,
|
||||
cacheReadsPrice: 0.175,
|
||||
description: "GPT-5.2 Chat: Optimized for conversational AI and chat use cases",
|
||||
},
|
||||
"gpt-5.1": {
|
||||
maxTokens: 128000,
|
||||
contextWindow: 400000,
|
||||
|
|
|
|||
|
|
@ -205,7 +205,7 @@ describe("OpenAiNativeHandler", () => {
|
|||
openAiNativeApiKey: "test-api-key",
|
||||
})
|
||||
const modelInfo = handlerWithoutModel.getModel()
|
||||
expect(modelInfo.id).toBe("gpt-5.1") // Default model
|
||||
expect(modelInfo.id).toBe("gpt-5.1-codex-max") // Default model
|
||||
expect(modelInfo.info).toBeDefined()
|
||||
})
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue