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
11 changes: 7 additions & 4 deletions src/utils/effort.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@ export function modelSupportsMaxEffort(model: string): boolean {
if (supported3P !== undefined) {
return supported3P
}
if (model.toLowerCase().includes('deepseek')) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or just ['deepseek', ...].includes(model.toLowerCase())

return true
}
if (model.toLowerCase().includes('opus-4-7')) {
return true
}
if (model.toLowerCase().includes('opus-4-6')) {
return true
}
Expand Down Expand Up @@ -95,10 +101,7 @@ export function parseEffortValue(value: unknown): EffortValue | undefined {
export function toPersistableEffort(
value: EffortValue | undefined,
): EffortLevel | undefined {
if (value === 'low' || value === 'medium' || value === 'high') {
return value
}
if (value === 'max' && process.env.USER_TYPE === 'ant') {
if (value === 'low' || value === 'medium' || value === 'high' || value === 'max') {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alternatively use string array includes value

return value
}
return undefined
Expand Down
6 changes: 1 addition & 5 deletions src/utils/settings/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -720,11 +720,7 @@ export const SettingsSchema = lazySchema(() =>
'enabled automatically for supported models.',
),
effortLevel: z
.enum(
process.env.USER_TYPE === 'ant'
? ['low', 'medium', 'high', 'max']
: ['low', 'medium', 'high'],
)
.enum(['low', 'medium', 'high', 'max'])
.optional()
.catch(undefined)
.describe('Persisted effort level for supported models.'),
Expand Down
Loading