Skip to content

Commit 413dbcd

Browse files
authored
feat: AI model transparency for Query Insights panel (#690)
2 parents 1199e68 + 9acb245 commit 413dbcd

16 files changed

Lines changed: 1198 additions & 100 deletions

File tree

docs/ai-and-plans/PRs/690-ai-model-transparency.md

Lines changed: 312 additions & 0 deletions
Large diffs are not rendered by default.

docs/index.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@ The User Manual provides guidance on using DocumentDB for VS Code. It contains d
6969
- [Interactive Shell](./user-manual/interactive-shell)
7070
- [How It Works Behind the Scenes](./user-manual/query-runtime)
7171

72+
### AI Features
73+
74+
- [AI Performance Insights: Model and Billing](./user-manual/ai-utility-model)
75+
7276
## Release Notes
7377

7478
Explore the history of updates and improvements to the DocumentDB for VS Code extension. Each release brings new features, enhancements, and fixes to improve your experience.
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
> **User Manual** - [Back to User Manual](../index#user-manual)
2+
3+
---
4+
5+
# AI Features: Utility Model and Pricing
6+
7+
The AI-assisted features in this extension, such as AI Performance Insights in the Query Insights panel, use GitHub Copilot to analyse your queries and return optimization recommendations. All of these features are designed to be **cost-neutral for most GitHub Copilot subscribers**: they exclusively use utility (included) models that do not consume your monthly premium request allowance.
8+
9+
**Table of Contents**
10+
11+
- [Utility Model Pricing](#utility-model-pricing)
12+
- [Which model does the extension use?](#which-model-does-the-extension-use)
13+
- [Which model was actually used?](#which-model-was-actually-used)
14+
- [Further reading](#further-reading)
15+
16+
---
17+
18+
## Utility Model Pricing
19+
20+
The extension targets utility models specifically because they are **included in all paid GitHub Copilot plans at no extra charge**.
21+
22+
### What GitHub documents about utility model pricing
23+
24+
GitHub designates a set of models as **included models** with a request multiplier of **0x**. Requests to these models do not consume your monthly premium request allowance. As of mid-2026, GPT-4o, GPT-4.1, and GPT-5 mini are all listed as 0x multiplier models.
25+
26+
> **Source**: [Requests in GitHub Copilot - Model multipliers](https://docs.github.com/en/copilot/concepts/billing/copilot-requests#model-multipliers)
27+
28+
Under the usage-based billing model that GitHub began rolling out in June 2026, included models continue to have a 0x per-token rate, effectively free to paid subscribers, as they were under the earlier request model.
29+
30+
> **Source**: [Usage-based billing for individuals](https://docs.github.com/en/copilot/concepts/billing/usage-based-billing-for-individuals)
31+
32+
### What this means for each plan
33+
34+
| Plan | Cost of AI features |
35+
| ------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
36+
| **Copilot Pro, Pro+, Business, Enterprise** | No additional cost; all preferred models are 0x multiplier |
37+
| **Copilot Free** | Counts against your 50 monthly premium requests; the extension tries to use 0x models, but Copilot Free may route some requests differently |
38+
| **Enterprise / custom agreements** | Follows your organization's Copilot billing policy; check with your Copilot administrator if unsure |
39+
40+
### The disclosure label in the extension
41+
42+
The cost-neutral disclosure row that appears in AI results panels ("No additional cost for most GitHub Copilot subscribers") reflects the 0x multiplier designation described above. We say "most" rather than "all" because enterprise agreements, educational licences, and reseller-managed accounts may have different terms.
43+
44+
### A note on billing changes
45+
46+
GitHub's billing model is evolving. If GitHub changes the pricing tier for any of the models in the preference chain, we will update both the extension and this page. Follow the [Further reading](#further-reading) links below for the latest GitHub documentation.
47+
48+
---
49+
50+
## Which model does the extension use?
51+
52+
The extension always targets **utility (included) models**: the tier of GitHub Copilot models that are covered by a standard subscription and do not consume your monthly premium request allowance. These models are fast, efficient, and well-suited to structured, bounded tasks like query analysis.
53+
54+
Rather than hard-coding a single model, the extension tries to pick the best utility model available in your environment. It works through a preference chain, stopping at the first match:
55+
56+
| Priority | Model family | Notes |
57+
| -------- | ----------------- | -------------------------------------------------------------------- |
58+
| 1 | `gpt-4.1` | Preferred; strong reasoning, 0x multiplier on paid plans |
59+
| 2 | `gpt-4o` | Fallback; also a 0x multiplier model on paid plans |
60+
| 3 | `copilot-utility` | Last resort; the generic utility alias exposed by the VS Code LM API |
61+
62+
All AI-assisted features in the extension are optimized and tested against the preferred model (`gpt-4.1`). If a fallback is used, quality may vary slightly. If the preferred model family is not available, the extension automatically steps down to the next entry in the chain without showing a popup; if a fallback fires, it is recorded in the extension's output channel (under **DocumentDB** in the Output panel) for diagnostics.
63+
64+
If none of these families is available in your environment (for example, GitHub Copilot is not signed in, or your organization has disabled LM API access for third-party extensions), the AI features will not activate.
65+
66+
---
67+
68+
## Which model was actually used?
69+
70+
After a successful AI analysis, a small **"Powered by"** byline appears at the bottom of the results panel:
71+
72+
> _No additional cost for most GitHub Copilot subscribers. [Learn more about the utility model used.](https://aka.ms/vscode-documentdb-copilot-utility-model)_
73+
> _Powered by GPT-4o via GitHub Copilot_
74+
75+
The name shown is the human-readable display name of the model that actually produced the response, not a pre-invocation guess. The stable internal identifier (e.g. `copilot-gpt-4o`) is captured in the extension's output channel and telemetry for diagnostics.
76+
77+
If the byline reads `copilot-utility` or shows an unfamiliar name, the extension used the generic utility fallback rather than one of the preferred families. This typically means the preferred models were not available at the time of the request.
78+
79+
---
80+
81+
## Further reading
82+
83+
- [Requests in GitHub Copilot](https://docs.github.com/en/copilot/concepts/billing/copilot-requests): GitHub's authoritative reference for request types, model multipliers, and plan allowances
84+
- [Plans for GitHub Copilot](https://docs.github.com/en/copilot/get-started/plans): Compare what is included in each plan
85+
- [Usage-based billing for individuals](https://docs.github.com/en/copilot/concepts/billing/usage-based-billing-for-individuals): How AI Credits work under the June 2026 billing model
86+
- [Usage-based billing for organizations and enterprises](https://docs.github.com/en/copilot/concepts/billing/usage-based-billing-for-organizations-and-enterprises): The same for Business and Enterprise plans
87+
- [VS Code Language Model API](https://code.visualstudio.com/api/extension-guides/language-model): The stable API this extension uses to talk to Copilot

l10n/bundle.l10n.json

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,20 @@
1414
"[BatchSizeAdapter] Success: Growing batch size {0} → {1} (mode: {2}, growth: {3}%)": "[BatchSizeAdapter] Success: Growing batch size {0} → {1} (mode: {2}, growth: {3}%)",
1515
"[BatchSizeAdapter] Throttle with no progress: Halving batch size {0} → {1}": "[BatchSizeAdapter] Throttle with no progress: Halving batch size {0} → {1}",
1616
"[BatchSizeAdapter] Throttle: Adjusting batch size {0} → {1} (proven capacity: {2})": "[BatchSizeAdapter] Throttle: Adjusting batch size {0} → {1} (proven capacity: {2})",
17+
"[Copilot] Available models from VS Code: {0}": "[Copilot] Available models from VS Code: {0}",
18+
"[Copilot] Call cancelled during streaming": "[Copilot] Call cancelled during streaming",
19+
"[Copilot] Could not enumerate model own properties: {0}": "[Copilot] Could not enumerate model own properties: {0}",
20+
"[Copilot] countTokens failed; usage metric will be omitted: {0}": "[Copilot] countTokens failed; usage metric will be omitted: {0}",
21+
"[Copilot] Model family preference chain: {0}": "[Copilot] Model family preference chain: {0}",
22+
"[Copilot] No family preferences supplied; using first available: {0}": "[Copilot] No family preferences supplied; using first available: {0}",
23+
"[Copilot] No language models available from vendor \"copilot\". Aborting selection.": "[Copilot] No language models available from vendor \"copilot\". Aborting selection.",
24+
"[Copilot] No preferred family matched; falling back to first available: {0}": "[Copilot] No preferred family matched; falling back to first available: {0}",
25+
"[Copilot] Requested family \"{0}\" → accepted (matched id: {1})": "[Copilot] Requested family \"{0}\" → accepted (matched id: {1})",
26+
"[Copilot] Requested family \"{0}\" → rejected (no available model in this family)": "[Copilot] Requested family \"{0}\" → rejected (no available model in this family)",
27+
"[Copilot] Selected model metadata: {0}": "[Copilot] Selected model metadata: {0}",
28+
"[Copilot] Selected model own enumerable properties: {0}": "[Copilot] Selected model own enumerable properties: {0}",
29+
"[Copilot] Selected model: {0}": "[Copilot] Selected model: {0}",
30+
"[Copilot] Tokens: prompt={0}, response={1}, total={2}, context={3}, utilization={4}%": "[Copilot] Tokens: prompt={0}, response={1}, total={2}, context={3}, utilization={4}%",
1731
"[CopyPasteTask] onProgress: {0}% ({1}/{2} docs) - {3}": "[CopyPasteTask] onProgress: {0}% ({1}/{2} docs) - {3}",
1832
"[DocumentDbStreamingWriter/Abort Strategy] Conflict for document with _id: {0}. {1}": "[DocumentDbStreamingWriter/Abort Strategy] Conflict for document with _id: {0}. {1}",
1933
"[DocumentDbStreamingWriter/Abort Strategy] Operation aborted due to {0} duplicate key conflict(s)": "[DocumentDbStreamingWriter/Abort Strategy] Operation aborted due to {0} duplicate key conflict(s)",
@@ -25,10 +39,11 @@
2539
"[KeepAlive] Background read: count={0}, buffer length={1}": "[KeepAlive] Background read: count={0}, buffer length={1}",
2640
"[KeepAlive] Read from buffer, remaining: {0} documents": "[KeepAlive] Read from buffer, remaining: {0} documents",
2741
"[KeepAlive] Skipped: only {0}s since last read (interval: {1}s)": "[KeepAlive] Skipped: only {0}s since last read (interval: {1}s)",
28-
"[Query Generation] Calling Copilot (model: {model})...": "[Query Generation] Calling Copilot (model: {model})...",
42+
"[Query Generation] Calling Copilot (family: {family})...": "[Query Generation] Calling Copilot (family: {family})...",
2943
"[Query Generation] Completed successfully": "[Query Generation] Completed successfully",
3044
"[Query Generation] Copilot response received in {ms}ms (model: {model})": "[Query Generation] Copilot response received in {ms}ms (model: {model})",
3145
"[Query Generation] listCollections completed in {ms}ms ({count} collections)": "[Query Generation] listCollections completed in {ms}ms ({count} collections)",
46+
"[Query Generation] Preferred model family \"{preferredFamily}\" was not available; used \"{actualModel}\" (family: {actualFamily}) instead. Results may vary.": "[Query Generation] Preferred model family \"{preferredFamily}\" was not available; used \"{actualModel}\" (family: {actualFamily}) instead. Results may vary.",
3247
"[Query Generation] Schema sampling completed in {ms}ms": "[Query Generation] Schema sampling completed in {ms}ms",
3348
"[Query Generation] Schema sampling for {collection} completed in {ms}ms": "[Query Generation] Schema sampling for {collection} completed in {ms}ms",
3449
"[Query Generation] Started: type={type}, targetQueryType={targetQueryType}": "[Query Generation] Started: type={type}, targetQueryType={targetQueryType}",
@@ -49,20 +64,20 @@
4964
"[Query Insights Action] Modify index action error: {error}": "[Query Insights Action] Modify index action error: {error}",
5065
"[Query Insights Action] Modify index action failed: {error}": "[Query Insights Action] Modify index action failed: {error}",
5166
"[Query Insights Action] Session ID is required": "[Query Insights Action] Session ID is required",
52-
"[Query Insights AI] Calling Copilot (model: {model})...": "[Query Insights AI] Calling Copilot (model: {model})...",
67+
"[Query Insights AI] Calling Copilot (family: {family})...": "[Query Insights AI] Calling Copilot (family: {family})...",
5368
"[Query Insights AI] Cancelled after getCollectionStats": "[Query Insights AI] Cancelled after getCollectionStats",
5469
"[Query Insights AI] Cancelled after listIndexes": "[Query Insights AI] Cancelled after listIndexes",
5570
"[Query Insights AI] Cancelled before calling Copilot": "[Query Insights AI] Cancelled before calling Copilot",
5671
"[Query Insights AI] Cancelled before fetching stats": "[Query Insights AI] Cancelled before fetching stats",
5772
"[Query Insights AI] Cancelled before running explain queries": "[Query Insights AI] Cancelled before running explain queries",
5873
"[Query Insights AI] Cancelled before starting optimization": "[Query Insights AI] Cancelled before starting optimization",
59-
"[Query Insights AI] Copilot call cancelled during streaming": "[Query Insights AI] Copilot call cancelled during streaming",
6074
"[Query Insights AI] Copilot response received in {ms}ms (model: {model})": "[Query Insights AI] Copilot response received in {ms}ms (model: {model})",
6175
"[Query Insights AI] explain({commandType}) completed in {ms}ms": "[Query Insights AI] explain({commandType}) completed in {ms}ms",
6276
"[Query Insights AI] Failed to retrieve collection/index stats (non-critical): {message}": "[Query Insights AI] Failed to retrieve collection/index stats (non-critical): {message}",
6377
"[Query Insights AI] getCollectionStats completed in {ms}ms": "[Query Insights AI] getCollectionStats completed in {ms}ms",
6478
"[Query Insights AI] getIndexStats completed in {ms}ms": "[Query Insights AI] getIndexStats completed in {ms}ms",
6579
"[Query Insights AI] listIndexes completed in {ms}ms": "[Query Insights AI] listIndexes completed in {ms}ms",
80+
"[Query Insights AI] Preferred model family \"{preferredFamily}\" was not available; used \"{actualModel}\" (family: {actualFamily}) instead. Recommendations may be less optimal.": "[Query Insights AI] Preferred model family \"{preferredFamily}\" was not available; used \"{actualModel}\" (family: {actualFamily}) instead. Recommendations may be less optimal.",
6681
"[Query Insights AI] Using preloaded collection stats": "[Query Insights AI] Using preloaded collection stats",
6782
"[Query Insights AI] Using preloaded execution plan": "[Query Insights AI] Using preloaded execution plan",
6883
"[Query Insights AI] Using preloaded index stats": "[Query Insights AI] Using preloaded index stats",
@@ -650,7 +665,6 @@
650665
"Index key covers {0}% of the collection per bucket": "Index key covers {0}% of the collection per bucket",
651666
"Index modification cancelled": "Index modification cancelled",
652667
"Index Name": "Index Name",
653-
"Index optimization is using model \"{actualModel}\" instead of preferred \"{preferredModel}\". Recommendations may be less optimal.": "Index optimization is using model \"{actualModel}\" instead of preferred \"{preferredModel}\". Recommendations may be less optimal.",
654668
"Index Options": "Index Options",
655669
"Index used": "Index used",
656670
"Index Used": "Index Used",
@@ -708,6 +722,7 @@
708722
"Learn more about integrating your cloud provider.": "Learn more about integrating your cloud provider.",
709723
"Learn more about integrating your cloud providers.": "Learn more about integrating your cloud providers.",
710724
"Learn more about local connections.": "Learn more about local connections.",
725+
"Learn more about the utility model used.": "Learn more about the utility model used.",
711726
"Learn more…": "Learn more…",
712727
"Length must be greater than 1": "Length must be greater than 1",
713728
"Level up": "Level up",
@@ -772,6 +787,7 @@
772787
"Next tip": "Next tip",
773788
"No": "No",
774789
"No Action": "No Action",
790+
"No additional cost for most GitHub Copilot subscribers.": "No additional cost for most GitHub Copilot subscribers.",
775791
"No authenticated tenants found. Use \"Manage Azure Accounts\" in the Discovery View to sign in to tenants.": "No authenticated tenants found. Use \"Manage Azure Accounts\" in the Discovery View to sign in to tenants.",
776792
"No authentication method selected.": "No authentication method selected.",
777793
"No authentication methods available for \"{cluster}\".": "No authentication methods available for \"{cluster}\".",
@@ -807,7 +823,7 @@
807823
"No sorting required": "No sorting required",
808824
"No subscriptions found": "No subscriptions found",
809825
"No subscriptions found for the selected tenants. Please adjust your tenant selection or check your Azure permissions.": "No subscriptions found for the selected tenants. Please adjust your tenant selection or check your Azure permissions.",
810-
"No suitable language model found. Please ensure GitHub Copilot is installed and you have an active subscription.": "No suitable language model found. Please ensure GitHub Copilot is installed and you have an active subscription.",
826+
"No suitable language model is available. Please ensure GitHub Copilot is installed and signed in with an active subscription, and that you accepted the language-model access consent prompt the first time this feature was used (you can re-trigger it by running the feature again).": "No suitable language model is available. Please ensure GitHub Copilot is installed and signed in with an active subscription, and that you accepted the language-model access consent prompt the first time this feature was used (you can re-trigger it by running the feature again).",
811827
"No target node selected.": "No target node selected.",
812828
"No tenants available": "No tenants available",
813829
"No tenants available for this account": "No tenants available for this account",
@@ -872,6 +888,7 @@
872888
"Port number is required": "Port number is required",
873889
"Port number must be a number": "Port number must be a number",
874890
"Port number must be between 1 and 65535": "Port number must be between 1 and 65535",
891+
"Powered by {0} via GitHub Copilot": "Powered by {0} via GitHub Copilot",
875892
"Press Escape to exit editor": "Press Escape to exit editor",
876893
"Previous tip": "Previous tip",
877894
"Privacy Statement": "Privacy Statement",
@@ -893,7 +910,6 @@
893910
"Query filters on a boolean field, which has only two distinct values": "Query filters on a boolean field, which has only two distinct values",
894911
"Query generation failed": "Query generation failed",
895912
"Query generation failed with the error: {0}": "Query generation failed with the error: {0}",
896-
"Query generation is using model \"{actualModel}\" instead of preferred \"{preferredModel}\". Results may vary.": "Query generation is using model \"{actualModel}\" instead of preferred \"{preferredModel}\". Results may vary.",
897913
"query insights": "query insights",
898914
"Query Insights APIs not initialized. Client may not be properly connected.": "Query Insights APIs not initialized. Client may not be properly connected.",
899915
"Query Insights feature is in preview": "Query Insights feature is in preview",

0 commit comments

Comments
 (0)