Skip to content

Commit d4141d7

Browse files
committed
Add 'minimal' reasoning effort option and update Google provider reasoning logic
1 parent 2cdb600 commit d4141d7

4 files changed

Lines changed: 12 additions & 19 deletions

File tree

‎apps/editor/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "gemini-coder",
33
"displayName": "Code Web Chat",
44
"description": "Connect VS Code with chatbots (CWC)",
5-
"version": "1.777.0",
5+
"version": "1.778.0",
66
"scripts": {
77
"build": "npx vsce package --no-dependencies",
88
"vscode:prepublish": "rimraf out && npm run compile",

‎apps/editor/src/services/model-providers-manager.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export type CustomProvider = {
1717

1818
export type Provider = BuiltInProvider | CustomProvider
1919

20-
export type ReasoningEffort = 'none' | 'low' | 'medium' | 'high'
20+
export type ReasoningEffort = 'none' | 'minimal' | 'low' | 'medium' | 'high'
2121

2222
export type ToolConfig = {
2323
provider_type: string

‎apps/editor/src/utils/apply-reasoning-effort.ts‎

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12,27 +12,18 @@ export const apply_reasoning_effort = (
1212
} else {
1313
body.reasoning = { effort: reasoning_effort }
1414
}
15-
} else {
16-
body.reasoning = { effort: 'medium' }
1715
}
1816
} else if (provider.name == 'Google') {
19-
let thinking_budget: number | undefined = undefined
2017
if (reasoning_effort) {
21-
if (reasoning_effort == 'none') {
22-
thinking_budget = 0
23-
} else if (reasoning_effort == 'low') {
24-
thinking_budget = 1024
25-
} else if (reasoning_effort == 'medium') {
26-
thinking_budget = 8192
27-
} else if (reasoning_effort == 'high') {
28-
thinking_budget = 24576
29-
}
18+
body.reasoning_effort = reasoning_effort
3019
}
31-
body.extra_body = {
32-
google: {
33-
thinking_config: {
34-
include_thoughts: thinking_budget != 0 ? true : undefined,
35-
thinking_budget
20+
21+
if (reasoning_effort && reasoning_effort != 'none') {
22+
body.extra_body = {
23+
google: {
24+
thinking_config: {
25+
include_thoughts: true
26+
}
3627
}
3728
}
3829
}

‎apps/editor/src/views/utils/config-editing.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,8 @@ export const edit_temperature_for_config = async (
380380
export const edit_reasoning_effort_for_config = async () => {
381381
const effort_options: vscode.QuickPickItem[] = [
382382
{ label: 'Unset', description: 'Remove reasoning effort configuration' },
383+
{ label: 'none' },
384+
{ label: 'minimal' },
383385
{ label: 'low' },
384386
{ label: 'medium' },
385387
{ label: 'high' }

0 commit comments

Comments
 (0)