You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Add an optional property `openAiContextWindowOverride?: number;` to the relevant settings interface (likely `ProviderSettings` or a derived type). This field will store the user-selected token value (e.g., 8192, 32768) or `undefined` if the default is chosen.
* Retrieve the base `ModelInfo` (from `openAiCustomModelInfo` or `openAiModelInfoSaneDefaults`).
19
+
* If `this.options.openAiContextWindowOverride` is defined and valid, create a new `ModelInfo` object by copying the base info and setting `contextWindow` to the override value.
* Ensure the component displaying the context size during chat correctly uses the `contextWindow` property from the `ModelInfo` object provided by the backend. No changes are expected if it already does this.
* Confirm that components like the sliding window manager consume the `contextWindow` value from the provider's `getModel().info` result. The override should propagate automatically.
42
+
43
+
6.**Internationalization (i18n):**
44
+
* Add new keys to `webview-ui/src/i18n/locales/en/settings.json` for the label ("Context Window Override") and the dynamic display text.
45
+
* Add placeholders or translations to other locale files as needed.
46
+
47
+
## Context Limit Usage
48
+
49
+
***Verification Result:** Analysis of `src/core/sliding-window/index.ts` confirmed that the `contextWindow` value (including the override) is actively used by the `truncateConversationIfNeeded` function to determine when conversation history should be truncated before sending it to the API. It does not block requests but shortens the history based on the limit and buffer settings.
0 commit comments