-
Notifications
You must be signed in to change notification settings - Fork 2
[Feature]: Add model info and limits display with plan-based calculations and default model grouping #57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…ation Co-authored-by: rajbos <6085745+rajbos@users.noreply.github.com>
src/lib/utils.ts
Outdated
export const DEFAULT_MODELS = ['gpt-4o-2024-11-20', 'gpt-4.1-2025-04-14']; | ||
|
||
// Cost per excess request (in USD) for premium requests | ||
export const EXCESS_REQUEST_COST = 0.15; // $0.15 per excess request |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That needs to be 0.04 per excess request
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated EXCESS_REQUEST_COST from $0.15 to $0.04 per excess request as requested (commit 7fa9eb4).
// O-series models (higher multipliers) | ||
'o3-mini-2025-01-31': 1, | ||
'o4-mini-2025-04-16': 1, | ||
// Add other models as needed - fallback to 1x for unknown models |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is the table to use:
Model | Multiplier for paid plans | Multiplier for Copilot Free -- | -- | -- GPT-4.1 | 0 | 1 GPT-4o | 0 | 1 GPT-4.5 | 50 | Not applicable Claude Sonnet 3.5 | 1 | 1 Claude Sonnet 3.7 | 1 | Not applicable Claude Sonnet 3.7 Thinking | 1.25 | Not applicable Claude Sonnet 4 | 1 | Not applicable Claude Opus 4 | 10 | Not applicable Gemini 2.0 Flash | 0.25 | 1 Gemini 2.5 Pro | 1 | Not applicable o1 | 10 | Not applicable o3 | 1 | Not applicable o3-mini | 0.33 | 1 o4-mini | 0.33 | Not applicableThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated MODEL_MULTIPLIERS using the provided table with all the correct multipliers for paid plans (commit 7fa9eb4).
src/test/model-info-limits.test.ts
Outdated
|
||
if (defaultGroup) { | ||
expect(defaultGroup.multiplier).toBe(1); | ||
expect(defaultGroup.individualPlanLimit).toBe(150); // 150 / 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is 50 a month
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated Individual plan limit from 150 to 50 requests per month (commit 7fa9eb4).
src/test/model-info-limits.test.ts
Outdated
if (defaultGroup) { | ||
expect(defaultGroup.multiplier).toBe(1); | ||
expect(defaultGroup.individualPlanLimit).toBe(150); // 150 / 1 | ||
expect(defaultGroup.businessPlanLimit).toBe(500); // 500 / 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is 300 a month
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated Business plan limit from 500 to 300 requests per month (commit 7fa9eb4).
src/test/model-info-limits.test.ts
Outdated
expect(defaultGroup.multiplier).toBe(1); | ||
expect(defaultGroup.individualPlanLimit).toBe(150); // 150 / 1 | ||
expect(defaultGroup.businessPlanLimit).toBe(500); // 500 / 1 | ||
expect(defaultGroup.enterprisePlanLimit).toBe(500); // 500 / 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is 1000 a month
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated Enterprise plan limit from 500 to 1000 requests per month (commit 7fa9eb4).
…on feedback Co-authored-by: rajbos <6085745+rajbos@users.noreply.github.com>
Change the display of the newly added columns on the different license types into a dropdown for the user to select. Use the Copilot Business type as the default. |
Co-authored-by: rajbos <6085745+rajbos@users.noreply.github.com>
Implemented plan selection dropdown with Business as default. The table now shows a single "Plan Limit" column that dynamically updates based on the selected plan type. Models with 0x multiplier display "Unlimited" for better clarity (commit 018139a). |
Plan limit now shows the end of a calculation, where it should just be the number / user / month. |
…results Co-authored-by: rajbos <6085745+rajbos@users.noreply.github.com>
Fixed the plan limit display to show constant plan values (50, 300, 1000 requests/month) instead of calculated results. The Plan Limit column now displays the base monthly limit per user regardless of model multiplier (commit a90de0a). |
Build fails after fixing the merge conflict: ✓ 3 modules transformed. The character "}" is not valid inside a JSX element Expected "}" but found ";"
Updated 1 path from the index |
This PR implements comprehensive model information and limits display as requested in the issue, adding plan-based request limits, model multipliers, cost calculations, and default model grouping.
✅ Features Implemented
1. Plan-Based Request Limits
Shows monthly request limits for each Copilot plan based on model multipliers:
plan_limit / model_multiplier
2. Model Multipliers
Displays multipliers for each model based on GitHub's documentation:
3. Default Model Grouping
GPT-4o and GPT-4.1 models are now grouped together as "Default (GPT-4o, GPT-4.1)" with combined statistics as requested:
4. Excess Cost Calculation
Calculates and displays costs for exceeding requests:
exceeding_requests × model_multiplier × $0.15
🔧 Technical Implementation
Enhanced Table Display
The "Requests per Model" table now includes 8 columns:
Code Changes
ModelUsageSummary
interface with new fields for multipliers, limits, and costsgetModelUsageSummary()
function to calculate plan limits and group default models🧪 Testing
Example Test Cases
📊 Example Output
Fixes #56.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.