feat: Implement legacy fallback for quota warnings and update messages before TBB#211
Merged
Conversation
…s for token-based billing
…s for token-based billing
…oft/copilot-for-eclipse into ethan/fallback-before-tbb
…oft/copilot-for-eclipse into ethan/fallback-before-tbb
…oft/copilot-for-eclipse into ethan/fallback-before-tbb
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds legacy pre-TBB quota fallback handling and extends the model picker/chat request flow to support selectable reasoning effort metadata.
Changes:
- Adds reasoning-effort protocol fields, preference persistence, picker/hover UI, and per-turn rendering/persistence.
- Updates chat requests to send
modelInfo.reasoningEffort. - Restores legacy 402 quota fallback messaging/replay behavior when token-based billing is not enabled.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/utils/ModelUtils.java |
Adds reasoning-effort helpers and updates model suffix formatting. |
com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/swt/ModelHoverContentProvider.java |
Adds interactive thinking-effort rows to model hover content. |
com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/swt/ItemController.java |
Extends row hover/focus behavior for reusable popup rows. |
com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/swt/IDropdownItemHoverProvider.java |
Adds a close callback for interactive hover content. |
com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/swt/DropdownPopup.java |
Keeps hover popups open for interaction and supports hover-triggered close. |
com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/swt/DropdownItem.java |
Adds optional selected button-face labels. |
com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/swt/DropdownButton.java |
Uses selected labels and updates width when items change. |
com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/i18n/messages.properties |
Adds localized reasoning-effort labels/descriptions. |
com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/i18n/Messages.java |
Adds NLS fields for new messages. |
com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/chat/services/ModelService.java |
Persists reasoning-effort choices and rebuilds model picker items. |
com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/chat/ModelPickerGroupsBuilder.java |
Includes effective reasoning effort in model item suffix/selected label. |
com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/chat/CopilotTurnWidget.java |
Renders reasoning effort in model footer text. |
com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/chat/ChatView.java |
Sends, renders, and persists per-turn reasoning effort. |
com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/chat/ChatContentViewer.java |
Adds legacy quota warning fallback and replay behavior. |
com.microsoft.copilot.eclipse.core/src/com/microsoft/copilot/eclipse/core/persistence/CopilotTurnData.java |
Persists reasoning effort in reply data. |
com.microsoft.copilot.eclipse.core/src/com/microsoft/copilot/eclipse/core/persistence/ConversationPersistenceManager.java |
Stores reasoning effort with model info. |
com.microsoft.copilot.eclipse.core/src/com/microsoft/copilot/eclipse/core/lsp/protocol/ModelInfo.java |
Adds model metadata payload for chat protocol requests. |
com.microsoft.copilot.eclipse.core/src/com/microsoft/copilot/eclipse/core/lsp/protocol/CopilotModel.java |
Adds reasoning-effort capability metadata and model key helper. |
com.microsoft.copilot.eclipse.core/src/com/microsoft/copilot/eclipse/core/lsp/protocol/ConversationTurnParams.java |
Adds modelInfo to turn params. |
com.microsoft.copilot.eclipse.core/src/com/microsoft/copilot/eclipse/core/lsp/protocol/ConversationCreateParams.java |
Adds modelInfo to create params. |
com.microsoft.copilot.eclipse.core/src/com/microsoft/copilot/eclipse/core/lsp/CopilotLanguageServerConnection.java |
Sends modelInfo.reasoningEffort on chat requests. |
com.microsoft.copilot.eclipse.core/src/com/microsoft/copilot/eclipse/core/chat/UserPreference.java |
Stores reasoning-effort selections per model. |
Comments suppressed due to low confidence (1)
com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/swt/ModelHoverContentProvider.java:174
- This hover section also ignores the new
supportsReasoningEffortLevel()gate and will render selectable effort rows whenever the raw list has more than one entry, even if the server says the model/endpoint does not support effort selection. Please base this onModelUtils.getSupportedReasoningEfforts(model)after that helper checks the support flag, or explicitly requiresupports.supportsReasoningEffortLevel()here.
sectionLayout.marginHeight = 0;
sectionLayout.verticalSpacing = 2;
((GridData) section.getLayoutData()).verticalIndent = SECTION_SPACING;
jdneo
approved these changes
May 15, 2026
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.
This PR is a fallback of: #186
Test: