Skip to content

Commit 82b6fe6

Browse files
authored
Merge pull request #1323 from RooVetGit/default_on_middle_out_compression
Default middle-out compression to on
2 parents a253a37 + 9b91ab2 commit 82b6fe6

File tree

4 files changed

+8
-2
lines changed

4 files changed

+8
-2
lines changed

.changeset/weak-cameras-hope.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"roo-cline": patch
3+
---
4+
5+
Default middle-out compression to on for OpenRouter

src/api/providers/openrouter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ export class OpenRouterHandler extends BaseProvider implements SingleCompletionH
114114
stream: true,
115115
include_reasoning: true,
116116
// This way, the transforms field will only be included in the parameters when openRouterUseMiddleOutTransform is true.
117-
...(this.options.openRouterUseMiddleOutTransform && { transforms: ["middle-out"] }),
117+
...((this.options.openRouterUseMiddleOutTransform ?? true) && { transforms: ["middle-out"] }),
118118
}
119119

120120
const stream = await this.client.chat.completions.create(completionParams)

src/core/webview/ClineProvider.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2430,6 +2430,7 @@ export class ClineProvider implements vscode.WebviewViewProvider {
24302430
autoApprovalEnabled: autoApprovalEnabled ?? false,
24312431
customModes,
24322432
maxOpenTabsContext: maxOpenTabsContext ?? 20,
2433+
openRouterUseMiddleOutTransform: openRouterUseMiddleOutTransform ?? true,
24332434
}
24342435
}
24352436

webview-ui/src/components/settings/ApiOptions.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ const ApiOptions = ({
498498
/>
499499
)}
500500
<Checkbox
501-
checked={apiConfiguration?.openRouterUseMiddleOutTransform || false}
501+
checked={apiConfiguration?.openRouterUseMiddleOutTransform ?? true}
502502
onChange={handleInputChange("openRouterUseMiddleOutTransform", noTransform)}>
503503
Compress prompts and message chains to the context size (
504504
<a href="https://openrouter.ai/docs/transforms">OpenRouter Transforms</a>)

0 commit comments

Comments
 (0)