Add reasoningEffort to provider settings schema (#2518)

This commit is contained in:
Chris Estreich 2025-04-11 22:45:14 -07:00 committed by GitHub
parent 6ab9aa9f15
commit df01e7948b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 36 additions and 14 deletions

View file

@ -20,18 +20,21 @@ export const rooCodeDefaults: RooCodeSettings = {
// thinking: false,
// },
modelTemperature: null,
// reasoningEffort: "high",
pinnedApiConfigs: {},
lastShownAnnouncementId: "mar-20-2025-3-10",
lastShownAnnouncementId: "apr-04-2025-boomerang",
autoApprovalEnabled: true,
alwaysAllowReadOnly: true,
alwaysAllowReadOnlyOutsideWorkspace: false,
alwaysAllowWrite: true,
alwaysAllowWriteOutsideWorkspace: false,
writeDelayMs: 200,
writeDelayMs: 1000,
alwaysAllowBrowser: true,
alwaysApproveResubmit: true,
requestDelaySeconds: 5,
requestDelaySeconds: 10,
alwaysAllowMcp: true,
alwaysAllowModeSwitch: true,
alwaysAllowSubtasks: true,
@ -40,8 +43,8 @@ export const rooCodeDefaults: RooCodeSettings = {
browserToolEnabled: false,
browserViewportSize: "900x600",
screenshotQuality: 38,
remoteBrowserEnabled: true,
screenshotQuality: 75,
remoteBrowserEnabled: false,
enableCheckpoints: false,
checkpointStorage: "task",

View file

@ -96,7 +96,7 @@ export type TelemetrySetting = z.infer<typeof telemetrySettingsSchema>
*/
export const modelInfoSchema = z.object({
maxTokens: z.number().optional(),
maxTokens: z.number().nullish(),
contextWindow: z.number(),
supportsImages: z.boolean().optional(),
supportsComputerUse: z.boolean().optional(),
@ -373,11 +373,14 @@ export const providerSettingsSchema = z.object({
requestyApiKey: z.string().optional(),
requestyModelId: z.string().optional(),
requestyModelInfo: modelInfoSchema.optional(),
// Generic
// Claude 3.7 Sonnet Thinking
modelMaxTokens: z.number().optional(), // Currently only used by Anthropic hybrid thinking models.
modelMaxThinkingTokens: z.number().optional(), // Currently only used by Anthropic hybrid thinking models.
modelTemperature: z.number().nullish(),
// Generic
includeMaxTokens: z.boolean().optional(),
modelTemperature: z.number().nullish(),
reasoningEffort: z.enum(["low", "medium", "high"]).optional(),
rateLimitSeconds: z.number().optional(),
// Fake AI
fakeAi: z.unknown().optional(),
})
@ -457,11 +460,13 @@ const providerSettingsRecord: ProviderSettingsRecord = {
requestyModelId: undefined,
requestyModelInfo: undefined,
// Claude 3.7 Sonnet Thinking
modelTemperature: undefined,
modelMaxTokens: undefined,
modelMaxThinkingTokens: undefined,
// Generic
includeMaxTokens: undefined,
modelTemperature: undefined,
reasoningEffort: undefined,
rateLimitSeconds: undefined,
// Fake AI
fakeAi: undefined,
}

View file

@ -175,10 +175,11 @@ type ProviderSettings = {
cachableFields?: string[] | undefined
} | null)
| undefined
modelTemperature?: (number | null) | undefined
modelMaxTokens?: number | undefined
modelMaxThinkingTokens?: number | undefined
includeMaxTokens?: boolean | undefined
modelTemperature?: (number | null) | undefined
reasoningEffort?: ("low" | "medium" | "high") | undefined
rateLimitSeconds?: number | undefined
fakeAi?: unknown | undefined
}

View file

@ -176,10 +176,11 @@ type ProviderSettings = {
cachableFields?: string[] | undefined
} | null)
| undefined
modelTemperature?: (number | null) | undefined
modelMaxTokens?: number | undefined
modelMaxThinkingTokens?: number | undefined
includeMaxTokens?: boolean | undefined
modelTemperature?: (number | null) | undefined
reasoningEffort?: ("low" | "medium" | "high") | undefined
rateLimitSeconds?: number | undefined
fakeAi?: unknown | undefined
}

View file

@ -95,6 +95,16 @@ export const telemetrySettingsSchema = z.enum(telemetrySettings)
export type TelemetrySetting = z.infer<typeof telemetrySettingsSchema>
/**
* ReasoningEffort
*/
export const reasoningEfforts = ["low", "medium", "high"] as const
export const reasoningEffortsSchema = z.enum(reasoningEfforts)
export type ReasoningEffort = z.infer<typeof reasoningEffortsSchema>
/**
* ModelInfo
*/
@ -110,7 +120,7 @@ export const modelInfoSchema = z.object({
cacheWritesPrice: z.number().optional(),
cacheReadsPrice: z.number().optional(),
description: z.string().optional(),
reasoningEffort: z.enum(["low", "medium", "high"]).optional(),
reasoningEffort: reasoningEffortsSchema.optional(),
thinking: z.boolean().optional(),
minTokensPerCachePoint: z.number().optional(),
maxCachePoints: z.number().optional(),
@ -383,11 +393,12 @@ export const providerSettingsSchema = z.object({
requestyModelId: z.string().optional(),
requestyModelInfo: modelInfoSchema.nullish(),
// Claude 3.7 Sonnet Thinking
modelTemperature: z.number().nullish(),
modelMaxTokens: z.number().optional(),
modelMaxThinkingTokens: z.number().optional(),
// Generic
includeMaxTokens: z.boolean().optional(),
modelTemperature: z.number().nullish(),
reasoningEffort: reasoningEffortsSchema.optional(),
rateLimitSeconds: z.number().optional(),
// Fake AI
fakeAi: z.unknown().optional(),
@ -470,11 +481,12 @@ const providerSettingsRecord: ProviderSettingsRecord = {
requestyModelId: undefined,
requestyModelInfo: undefined,
// Claude 3.7 Sonnet Thinking
modelTemperature: undefined,
modelMaxTokens: undefined,
modelMaxThinkingTokens: undefined,
// Generic
includeMaxTokens: undefined,
modelTemperature: undefined,
reasoningEffort: undefined,
rateLimitSeconds: undefined,
// Fake AI
fakeAi: undefined,