Repository navigation
Add configurable xtab reasoning effort and completion token limits - #342204
Merged
Ulugbek Abdullaev (ulugbekna) merged 4 commits intoOct 21, 2026
Conversation
Support model configuration and ExP request arguments while preserving prediction token-limit behavior. Co-authored-by: Copilot <[email protected]>
Contributor
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: Ulugbek Abdullaev (@ulugbekna)Matched files:
|
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
Production proxy support is unavailable, and the final prediction-gating behavior lacks end-to-end validation.
No open issues 🎉
What changed in this PR
Adds optional reasoning-effort and completion-token controls to the existing xtab model configuration for next-edit suggestions.
Changes:
- Validates the new fields across local and experiment-driven configurations.
- Applies request arguments while preserving prediction behavior and existing defaults.
- Adds regression coverage and localized setting documentation.
| File | Description |
|---|---|
| extensions/copilot/src/platform/networking/common/fetch.ts | Adds optional request parameter types. |
| extensions/copilot/src/platform/inlineEdits/test/node/inlineEditsModelService.spec.ts | Tests configuration sources. |
| extensions/copilot/src/platform/inlineEdits/test/common/xtabPromptOptions.spec.ts | Tests field validation and defaults. |
| extensions/copilot/src/platform/inlineEdits/common/dataTypes/xtabPromptOptions.ts | Defines and validates configuration fields. |
| extensions/copilot/src/extension/xtab/test/node/xtabProvider.spec.ts | Tests request gating and fallback behavior. |
| extensions/copilot/src/extension/xtab/node/xtabProvider.ts | Applies configured request arguments. |
| extensions/copilot/src/extension/prompt/node/test/chatMLFetcherRetry.spec.ts | Tests serialized request parameters. |
| extensions/copilot/package.nls.json | Documents configuration behavior. |
| extensions/copilot/package.json | References the localized setting description. |
Review effort: Balanced
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Ulugbek Abdullaev (ulugbekna)
approved these changes
Oct 21, 2026
roblourens
approved these changes
Oct 21, 2026
Ulugbek Abdullaev (ulugbekna)
merged commit Oct 21, 2026
4279148
into
microsoft:main
59 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add optional
reasoningEffortandmaxCompletionTokensfields to the xtab model configuration, including the existing local setting and ExP-drivenmodelConfigurationString/defaultModelConfigurationStringpaths.Example model configuration:
maxCompletionTokenssetsmax_completion_tokens. It is the token limit setting for OpenAI reasoning models. If set,max_completion_tokenswill replacemax_tokens.useMaxTokens. IfuseMaxTokens == false,max_completion_tokensis unset.usePrediction. IfusePrediction == true,max_completion_tokensis unsetreasoningEffortsimply adds the reasoning effort to the LLM request.Detailed changes:
reasoning_effortonly when configured.useMaxTokensis enabled, send configuredmax_completion_tokensinstead ofmax_tokens.Validation
Commands were run from
extensions/copilot:npm run test:unit -- xtabPromptOptions.spec.ts inlineEditsModelService.spec.ts xtabProvider.spec.ts chatMLFetcherRetry.spec.ts— passed, 325 tests, before the final prediction-gating adjustment.npm run test:unit -- xtabProvider.spec.ts -t 'sends model request arguments|only adds configured model request arguments|applies useMaxTokens|retries with default model after NotFound'— passed, 13 focused tests, after the final adjustment..\node_modules\.bin\tsc.cmd --noEmit --project tsconfig.json --pretty false— passed after the final adjustment.npm run compile— passed after committing the final implementation.git diff --cached --check— passed before committing.Manual testing against a local
copilot-proxywas completed by the author.How to Test
reasoningEffort(for example,low) andmaxCompletionTokens(for example,8192) togithub.copilot.chat.inlineEdits.xtabProvider.modelConfiguration, retaining the model's other configuration fields.usePrediction=falseanduseMaxTokens=true, trigger a next-edit suggestion and verify the serialized body containsreasoning_effortandmax_completion_tokens, but nomax_tokens.useMaxTokens=false, verify neither token limit is sent.usePrediction=true, verify both token-limit controls are ignored and neither token limit is sent.No linked issue.