Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions packages/types/src/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ export type ModelParameter = z.infer<typeof modelParametersSchema>
export const isModelParameter = (value: string): value is ModelParameter =>
modelParameters.includes(value as ModelParameter)

import { editToolVariantSchema } from "./tool.js"

/**
* ModelInfo
*/
Expand Down Expand Up @@ -120,6 +122,9 @@ export const modelInfoSchema = z.object({
// These tools will be added if they belong to an allowed group in the current mode
// Cannot force-add tools from groups the mode doesn't allow
includedTools: z.array(z.string()).optional(),
// Edit tool variant - determines which edit tool schema is presented to the LLM
// Each variant has a schema optimized for different LLM families (defaults to "roo")
editToolVariant: editToolVariantSchema.optional(),
/**
* Service tiers with pricing information.
* Each tier can have a name (for OpenAI service tiers) and pricing overrides.
Expand Down
44 changes: 22 additions & 22 deletions packages/types/src/providers/gemini.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ export const geminiModels = {
supportsPromptCache: true,
supportsReasoningEffort: ["low", "high"],
reasoningEffort: "low",
includedTools: ["write_file", "edit_file"],
excludedTools: ["apply_diff"],
editToolVariant: "gemini",
includedTools: ["write_file"],
supportsTemperature: true,
defaultTemperature: 1,
inputPrice: 4.0,
Expand All @@ -43,8 +43,8 @@ export const geminiModels = {
supportsPromptCache: true,
supportsReasoningEffort: ["minimal", "low", "medium", "high"],
reasoningEffort: "medium",
includedTools: ["write_file", "edit_file"],
excludedTools: ["apply_diff"],
editToolVariant: "gemini",
includedTools: ["write_file"],
supportsTemperature: true,
defaultTemperature: 1,
inputPrice: 0.3,
Expand All @@ -60,8 +60,8 @@ export const geminiModels = {
supportsNativeTools: true,
defaultToolProtocol: "native",
supportsPromptCache: true,
includedTools: ["write_file", "edit_file"],
excludedTools: ["apply_diff"],
editToolVariant: "gemini",
includedTools: ["write_file"],
inputPrice: 2.5, // This is the pricing for prompts above 200k tokens.
outputPrice: 15,
cacheReadsPrice: 0.625,
Expand Down Expand Up @@ -91,8 +91,8 @@ export const geminiModels = {
supportsNativeTools: true,
defaultToolProtocol: "native",
supportsPromptCache: true,
includedTools: ["write_file", "edit_file"],
excludedTools: ["apply_diff"],
editToolVariant: "gemini",
includedTools: ["write_file"],
inputPrice: 2.5, // This is the pricing for prompts above 200k tokens.
outputPrice: 15,
cacheReadsPrice: 0.625,
Expand Down Expand Up @@ -121,8 +121,8 @@ export const geminiModels = {
supportsNativeTools: true,
defaultToolProtocol: "native",
supportsPromptCache: true,
includedTools: ["write_file", "edit_file"],
excludedTools: ["apply_diff"],
editToolVariant: "gemini",
includedTools: ["write_file"],
inputPrice: 2.5, // This is the pricing for prompts above 200k tokens.
outputPrice: 15,
cacheReadsPrice: 0.625,
Expand All @@ -149,8 +149,8 @@ export const geminiModels = {
supportsNativeTools: true,
defaultToolProtocol: "native",
supportsPromptCache: true,
includedTools: ["write_file", "edit_file"],
excludedTools: ["apply_diff"],
editToolVariant: "gemini",
includedTools: ["write_file"],
inputPrice: 2.5, // This is the pricing for prompts above 200k tokens.
outputPrice: 15,
cacheReadsPrice: 0.625,
Expand Down Expand Up @@ -181,8 +181,8 @@ export const geminiModels = {
supportsNativeTools: true,
defaultToolProtocol: "native",
supportsPromptCache: true,
includedTools: ["write_file", "edit_file"],
excludedTools: ["apply_diff"],
editToolVariant: "gemini",
includedTools: ["write_file"],
inputPrice: 0.3,
outputPrice: 2.5,
cacheReadsPrice: 0.075,
Expand All @@ -197,8 +197,8 @@ export const geminiModels = {
supportsNativeTools: true,
defaultToolProtocol: "native",
supportsPromptCache: true,
includedTools: ["write_file", "edit_file"],
excludedTools: ["apply_diff"],
editToolVariant: "gemini",
includedTools: ["write_file"],
inputPrice: 0.3,
outputPrice: 2.5,
cacheReadsPrice: 0.075,
Expand All @@ -213,8 +213,8 @@ export const geminiModels = {
supportsNativeTools: true,
defaultToolProtocol: "native",
supportsPromptCache: true,
includedTools: ["write_file", "edit_file"],
excludedTools: ["apply_diff"],
editToolVariant: "gemini",
includedTools: ["write_file"],
inputPrice: 0.3,
outputPrice: 2.5,
cacheReadsPrice: 0.075,
Expand All @@ -231,8 +231,8 @@ export const geminiModels = {
supportsNativeTools: true,
defaultToolProtocol: "native",
supportsPromptCache: true,
includedTools: ["write_file", "edit_file"],
excludedTools: ["apply_diff"],
editToolVariant: "gemini",
includedTools: ["write_file"],
inputPrice: 0.1,
outputPrice: 0.4,
cacheReadsPrice: 0.025,
Expand All @@ -247,8 +247,8 @@ export const geminiModels = {
supportsNativeTools: true,
defaultToolProtocol: "native",
supportsPromptCache: true,
includedTools: ["write_file", "edit_file"],
excludedTools: ["apply_diff"],
editToolVariant: "gemini",
includedTools: ["write_file"],
inputPrice: 0.1,
outputPrice: 0.4,
cacheReadsPrice: 0.025,
Expand Down
9 changes: 3 additions & 6 deletions packages/types/src/providers/minimax.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ export const minimaxModels = {
supportsPromptCache: true,
supportsNativeTools: true,
defaultToolProtocol: "native",
includedTools: ["search_and_replace"],
excludedTools: ["apply_diff"],
editToolVariant: "gemini",
preserveReasoning: true,
inputPrice: 0.3,
outputPrice: 1.2,
Expand All @@ -32,8 +31,7 @@ export const minimaxModels = {
supportsPromptCache: true,
supportsNativeTools: true,
defaultToolProtocol: "native",
includedTools: ["search_and_replace"],
excludedTools: ["apply_diff"],
editToolVariant: "gemini",
preserveReasoning: true,
inputPrice: 0.3,
outputPrice: 1.2,
Expand All @@ -49,8 +47,7 @@ export const minimaxModels = {
supportsPromptCache: true,
supportsNativeTools: true,
defaultToolProtocol: "native",
includedTools: ["search_and_replace"],
excludedTools: ["apply_diff"],
editToolVariant: "gemini",
preserveReasoning: true,
inputPrice: 0.3,
outputPrice: 1.2,
Expand Down
68 changes: 34 additions & 34 deletions packages/types/src/providers/openai.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ export const openAiNativeModels = {
contextWindow: 400000,
supportsNativeTools: true,
defaultToolProtocol: "native",
includedTools: ["apply_patch"],
excludedTools: ["apply_diff", "write_to_file"],
editToolVariant: "codex",
excludedTools: ["write_to_file"],
supportsImages: true,
supportsPromptCache: true,
promptCacheRetention: "24h",
Expand All @@ -31,8 +31,8 @@ export const openAiNativeModels = {
contextWindow: 400000,
supportsNativeTools: true,
defaultToolProtocol: "native",
includedTools: ["apply_patch"],
excludedTools: ["apply_diff", "write_to_file"],
editToolVariant: "codex",
excludedTools: ["write_to_file"],
supportsImages: true,
supportsPromptCache: true,
promptCacheRetention: "24h",
Expand All @@ -54,8 +54,8 @@ export const openAiNativeModels = {
contextWindow: 128_000,
supportsNativeTools: true,
defaultToolProtocol: "native",
includedTools: ["apply_patch"],
excludedTools: ["apply_diff", "write_to_file"],
editToolVariant: "codex",
excludedTools: ["write_to_file"],
supportsImages: true,
supportsPromptCache: true,
inputPrice: 1.75,
Expand All @@ -68,8 +68,8 @@ export const openAiNativeModels = {
contextWindow: 400000,
supportsNativeTools: true,
defaultToolProtocol: "native",
includedTools: ["apply_patch"],
excludedTools: ["apply_diff", "write_to_file"],
editToolVariant: "codex",
excludedTools: ["write_to_file"],
supportsImages: true,
supportsPromptCache: true,
promptCacheRetention: "24h",
Expand All @@ -91,8 +91,8 @@ export const openAiNativeModels = {
contextWindow: 400000,
supportsNativeTools: true,
defaultToolProtocol: "native",
includedTools: ["apply_patch"],
excludedTools: ["apply_diff", "write_to_file"],
editToolVariant: "codex",
excludedTools: ["write_to_file"],
supportsImages: true,
supportsPromptCache: true,
promptCacheRetention: "24h",
Expand All @@ -110,8 +110,8 @@ export const openAiNativeModels = {
contextWindow: 400000,
supportsNativeTools: true,
defaultToolProtocol: "native",
includedTools: ["apply_patch"],
excludedTools: ["apply_diff", "write_to_file"],
editToolVariant: "codex",
excludedTools: ["write_to_file"],
supportsImages: true,
supportsPromptCache: true,
promptCacheRetention: "24h",
Expand All @@ -128,8 +128,8 @@ export const openAiNativeModels = {
contextWindow: 400000,
supportsNativeTools: true,
defaultToolProtocol: "native",
includedTools: ["apply_patch"],
excludedTools: ["apply_diff", "write_to_file"],
editToolVariant: "codex",
excludedTools: ["write_to_file"],
supportsImages: true,
supportsPromptCache: true,
supportsReasoningEffort: ["minimal", "low", "medium", "high"],
Expand All @@ -150,8 +150,8 @@ export const openAiNativeModels = {
contextWindow: 400000,
supportsNativeTools: true,
defaultToolProtocol: "native",
includedTools: ["apply_patch"],
excludedTools: ["apply_diff", "write_to_file"],
editToolVariant: "codex",
excludedTools: ["write_to_file"],
supportsImages: true,
supportsPromptCache: true,
supportsReasoningEffort: ["minimal", "low", "medium", "high"],
Expand All @@ -172,8 +172,8 @@ export const openAiNativeModels = {
contextWindow: 400000,
supportsNativeTools: true,
defaultToolProtocol: "native",
includedTools: ["apply_patch"],
excludedTools: ["apply_diff", "write_to_file"],
editToolVariant: "codex",
excludedTools: ["write_to_file"],
supportsImages: true,
supportsPromptCache: true,
supportsReasoningEffort: ["low", "medium", "high"],
Expand All @@ -190,8 +190,8 @@ export const openAiNativeModels = {
contextWindow: 400000,
supportsNativeTools: true,
defaultToolProtocol: "native",
includedTools: ["apply_patch"],
excludedTools: ["apply_diff", "write_to_file"],
editToolVariant: "codex",
excludedTools: ["write_to_file"],
supportsImages: true,
supportsPromptCache: true,
supportsReasoningEffort: ["minimal", "low", "medium", "high"],
Expand All @@ -209,8 +209,8 @@ export const openAiNativeModels = {
contextWindow: 400000,
supportsNativeTools: true,
defaultToolProtocol: "native",
includedTools: ["apply_patch"],
excludedTools: ["apply_diff", "write_to_file"],
editToolVariant: "codex",
excludedTools: ["write_to_file"],
supportsImages: true,
supportsPromptCache: true,
inputPrice: 1.25,
Expand All @@ -223,8 +223,8 @@ export const openAiNativeModels = {
contextWindow: 1_047_576,
supportsNativeTools: true,
defaultToolProtocol: "native",
includedTools: ["apply_patch"],
excludedTools: ["apply_diff", "write_to_file"],
editToolVariant: "codex",
excludedTools: ["write_to_file"],
supportsImages: true,
supportsPromptCache: true,
inputPrice: 2,
Expand All @@ -240,8 +240,8 @@ export const openAiNativeModels = {
contextWindow: 1_047_576,
supportsNativeTools: true,
defaultToolProtocol: "native",
includedTools: ["apply_patch"],
excludedTools: ["apply_diff", "write_to_file"],
editToolVariant: "codex",
excludedTools: ["write_to_file"],
supportsImages: true,
supportsPromptCache: true,
inputPrice: 0.4,
Expand All @@ -257,8 +257,8 @@ export const openAiNativeModels = {
contextWindow: 1_047_576,
supportsNativeTools: true,
defaultToolProtocol: "native",
includedTools: ["apply_patch"],
excludedTools: ["apply_diff", "write_to_file"],
editToolVariant: "codex",
excludedTools: ["write_to_file"],
supportsImages: true,
supportsPromptCache: true,
inputPrice: 0.1,
Expand Down Expand Up @@ -483,8 +483,8 @@ export const openAiNativeModels = {
contextWindow: 400000,
supportsNativeTools: true,
defaultToolProtocol: "native",
includedTools: ["apply_patch"],
excludedTools: ["apply_diff", "write_to_file"],
editToolVariant: "codex",
excludedTools: ["write_to_file"],
supportsImages: true,
supportsPromptCache: true,
supportsReasoningEffort: ["minimal", "low", "medium", "high"],
Expand All @@ -505,8 +505,8 @@ export const openAiNativeModels = {
contextWindow: 400000,
supportsNativeTools: true,
defaultToolProtocol: "native",
includedTools: ["apply_patch"],
excludedTools: ["apply_diff", "write_to_file"],
editToolVariant: "codex",
excludedTools: ["write_to_file"],
supportsImages: true,
supportsPromptCache: true,
supportsReasoningEffort: ["minimal", "low", "medium", "high"],
Expand All @@ -527,8 +527,8 @@ export const openAiNativeModels = {
contextWindow: 400000,
supportsNativeTools: true,
defaultToolProtocol: "native",
includedTools: ["apply_patch"],
excludedTools: ["apply_diff", "write_to_file"],
editToolVariant: "codex",
excludedTools: ["write_to_file"],
supportsImages: true,
supportsPromptCache: true,
supportsReasoningEffort: ["minimal", "low", "medium", "high"],
Expand Down
Loading
Loading