Skip to content

Gate Dictation on Copilot entitlement - #329222

Merged
meganrogge merged 2 commits into
mainfrom
megrogge/dictation-sku-gating
Aug 5, 2026
Merged

Gate Dictation on Copilot entitlement#329222
meganrogge merged 2 commits into
mainfrom
megrogge/dictation-sku-gating

Conversation

@meganrogge

Copy link
Copy Markdown
Collaborator

Summary

  • expose built-in Dictation only for paid Copilot plans
  • keep local Dictation available for eligible Enterprise users, but disable the MAI backend for external Enterprise accounts
  • preserve MAI access for internal Enterprise users through the existing internal-organization entitlement signal
  • reject direct ineligible starts, cancel active sessions when entitlement is lost, and refresh the segmented input control when entitlement changes

This is client-side product gating only; MAI must continue to authenticate requests and enforce entitlement server-side.

Testing

  • npm run transpile-client
  • ESLint on changed files
  • Dictation, speech-to-text action, Voice input mode, and Dictation session unit tests (19 passing)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 97983c12-eefc-4d1b-a8d2-7fd5a6d64ed9
Copilot AI balanced review requested due to automatic review settings August 5, 2026 17:37
@meganrogge meganrogge self-assigned this Aug 5, 2026
@meganrogge meganrogge added this to the 1.133.0 milestone Aug 5, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds Copilot entitlement gating to built-in Dictation.

Changes:

  • Restricts Dictation and MAI by plan and organization.
  • Refreshes UI availability and cancels sessions on entitlement changes.
  • Adds entitlement tests.
Show a summary per file
File Description
chatSpeechToTextService.ts Implements entitlement gating and cancellation.
voiceInputMode.ts Refreshes Dictation availability.
chatSpeechToTextService.test.ts Tests plan/backend eligibility.

Review details

Suppressed comments (2)

src/vs/workbench/contrib/chat/browser/speechToText/chatSpeechToTextService.ts:517

  • isConfigured evaluates the currently selected dictation.model, not the backend used by the in-progress session. If an MAI session starts, the setting is switched to local, and entitlement then changes to external Enterprise, this remains true and the cloud session is not cancelled. Evaluate entitlement against _activeBackend for active sessions.
			if (!this.isConfigured && this._state !== ChatSpeechToTextState.Idle) {
				this.cancel();
			}

src/vs/workbench/contrib/chat/browser/speechToText/chatSpeechToTextService.ts:658

  • This eligibility check can become stale while start() awaits microphone permission and backend/capture setup. The service remains Idle until recording begins, so the entitlement listener skips cancellation; an entitlement loss during those awaits can therefore still end in Recording. Track/cancel an in-flight start (or revalidate with teardown before entering Recording).
		if (!isDictationEntitled(this._chatEntitlementService.entitlement, this._chatEntitlementService.isInternal, backend === 'mai')) {
  • Files reviewed: 3/3 changed files
  • Comments generated: 1
  • Review effort level: Balanced

Comment thread src/vs/workbench/contrib/chat/browser/speechToText/chatSpeechToTextService.ts Outdated
@meganrogge

Copy link
Copy Markdown
Collaborator Author

cc @cwebster-99

@meganrogge
meganrogge enabled auto-merge (squash) August 5, 2026 17:43
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 97983c12-eefc-4d1b-a8d2-7fd5a6d64ed9
@meganrogge
meganrogge merged commit 4e7703b into main Aug 5, 2026
29 checks passed
@meganrogge
meganrogge deleted the megrogge/dictation-sku-gating branch August 5, 2026 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants