Skip to content

Commit 728d7c8

Browse files
Enable middle-out transform for OpenRouter to improve long conversation handling
Enabled the middle-out transform in OpenRouter configuration to better manage context window limitations by preserving beginning and end of conversations while removing less critical middle content. 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
1 parent b748a06 commit 728d7c8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

backend/src/llm-apis/openrouter.ts

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

1818
export function openRouterLanguageModel(model: Model) {
1919
const extraBody: Record<string, any> = {
20-
// transforms: ['middle-out'],
20+
transforms: ['middle-out'],
2121
}
2222

2323
// Set allow_fallbacks based on whether model is explicitly defined

0 commit comments

Comments
 (0)