File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed
packages/opencode/src/session Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 11{
22 "$schema" : " https://opencode.ai/config.json" ,
33 "mcp" : {},
4- "provider" : {}
4+ "provider" : {
5+ "openrouter" : {
6+ "npm" : " @openrouter/ai-sdk-provider" ,
7+ "name" : " OpenRouter" ,
8+ "models" : {
9+ "anthropic/claude-sonnet-4" : {}
10+ }
11+ }
12+ }
513}
Original file line number Diff line number Diff line change @@ -210,8 +210,9 @@ export namespace Session {
210210 previous . metadata . assistant . tokens . cache . write +
211211 previous . metadata . assistant . tokens . output
212212 if (
213+ model . info . limit . context &&
213214 tokens >
214- ( model . info . limit . context - ( model . info . limit . output ?? 0 ) ) * 0.9
215+ ( model . info . limit . context - ( model . info . limit . output ?? 0 ) ) * 0.9
215216 ) {
216217 await summarize ( {
217218 sessionID : input . sessionID ,
You can’t perform that action at this time.
0 commit comments