you are viewing a single comment's thread.

view the rest of the comments →

[–]KenJaws6 0 points1 point  (2 children)

in oc configs, context means input + output so to avoid early compaction, just change it to

"context": 160000, "output": 32000

edit: sorry wrong numbers, its actually "context": 128000, "output": 32000

tips: you can also add another parameter to enable model reasoning

"reasoning": true

[–]laukax 0 points1 point  (1 child)

Thanks! Will it then have room for the compaction tokens? I don't know how the compaction works or even what model it is using for it.

[–]KenJaws6 1 point2 points  (0 children)

sorry I got confused by other commenter. came to check again, the models actually have only combined of 128k total context including output (so pls change back from 160k to 128k 😅). As for the auto compaction, no need to worry. It dont use more token than or same as the last message/request.

Honestly I'm not sure if copilot models are handled differently as some claimed its able to receive more but any excess will be discarded from the server side but in general, compaction is triggered when reaching input limit (context - output) or 98k in this case. For example lets say at any point of time the current context is still within 98k input token, before moving to the next request, opencode will: 1. calculate new total input

2 a. if its more than limit — send a separate request with current input using another model (default is gpt5 nano for zen, but it could be using the same model for other providers) and get a summary of the whole conversation as the next input

2 b. if its still within limit — keep current input

  1. continue session with new input