Skip to content

Repository files navigation

Copilot Enterprise Spend Simulator

A static web app that simulates monthly GitHub Copilot spend for enterprises using Copilot Business and Copilot Enterprise seats — with a focus on multiple cost centers. Adjust a handful of smart-default sliders, add/remove cost centers, and read the day 1→30 burndown showing the shared included credit pool draining and metered (overage) cost growing until it hits your limits — with one-click scenario shortcuts and a shareable configuration URL.

Built with React + TypeScript + Vite. No backend — it runs entirely in the browser.

Why

GitHub moved Copilot to usage-based billing (AI credits) on June 1, 2026. Spend is now:

total bill = license fees (fixed)  +  metered usage (after the shared included pool drains)

This tool lets you quickly validate a few setups — "if we buy 100 seats at 70/30, cap people at $50, and split teams into cost centers, what will we actually pay, and who gets blocked?" — without spreadsheets.

How it maps to real GitHub billing

Concept in the app GitHub reality
1 credit = $0.01 Fixed AI-credit conversion
Business 1,900 cr / $19, Enterprise 3,900 cr / $39 per seat Included allowance per seat (promo 3,000 / 7,000 until Sep 1 2026)
Included pool Credits pooled at the enterprise level, funded by all seats
Universal ULB (universal user-level budget) User-level budget for normal users — caps a person's total (pool + metered) use, always hard-stops
Power-user override (number of power users + average power-user budget) Individual budget override — power users get a higher per-user budget that overrides the universal ULB (power-user override guidance)
Enterprise limit ($, max scales with users) Enterprise metered budget — caps overage on top of license fees (max bill = licenses + budget)
Cost center: per-user limit Cost-center user-level budget (multi_user_cost_center) — now in the billing UI (and REST API)
Cost center: metered budget Cost-center budget — caps metered spend for that CC
Cost center: included-usage cap (AI credit pool) Auto-sized cap limiting a CC to its own licenses' credits; per cost center, choose what happens at the cap — block further included usage, or continue as paid overage (if the enterprise allows overages) — managed in the billing UI
Stop-usage toggle Real-world default is OFF (alerts only); on here so you can model hard caps
Code completions / next-edit Not billed — excluded from the model

Billing facts are sourced from official GitHub documentation; see the research report that accompanies this project.

Inputs

Enterprise (global): total users with licenses (1–1000), Business/Enterprise ratio, % of seats that actually use Copilot, average developer monthly usage (credits, with $ caption), usage variation, universal ULB ($; default = avg usage, max = 10× avg usage), an individual budget override for power-users (number of power users 0–total, default 10%; average power-user budget $38–$760, default $190 — overrides the ULB), enterprise limit (absolute USD metered budget; max scales with total users), an "enterprise budget excludes cost-center usage" toggle, promo-allowances toggle, stop-usage toggle.

Per cost center (add/remove; one pre-created): members (seats), plan mix, per-user limit, metered budget, stop-usage, and an AI credit pool included-usage cap (on/off — limits the CC to its own licenses' credits; when on, a per-cost-center "stop usage at the cap" choice sets whether members are blocked at the cap or continue as paid overage if the enterprise allows overages — all managed in the billing UI).

Every non-USD slider shows its USD equivalent live.

"Usage variation" explained

How unevenly usage is spread across developers and days. 0% = everyone consumes about the same each day (smooth); higher = spiky/uneven, so some people and days spike well above average. Higher variation makes individual limits get hit sooner even when the average is unchanged. Modeled as the coefficient of variation of a per-user log-normal daily draw (seeded, so results are stable while you scrub the timeline — use Reshuffle usage to resample).

Quick scenarios & shareable links

Under the projected-bill meter, three scenario shortcuts load a preset of the existing controls in one click:

  • Two cost centers, high and low usage — the shipped default (balanced).
  • Heavy adoption, no guardrails — high usage with no hard stops, so metered spend runs past the budget and the projected bill exceeds the max.
  • Locked-down budgets — a low universal per-user budget, tight metered budgets with hard stops, and per-cost-center included-usage caps, so real demand is high but many users get blocked.

The active preset is highlighted as a chip (the others are dotted links); changing any control de-highlights it. Scenarios only move existing sliders/toggles — they introduce no new billing rule.

The full configuration is encoded in the URL (?c=…) and restored on load, so any setup is copy-to-share ready — the address bar always reflects the current inputs.

Getting started

npm install
npm run dev        # local dev server
npm run build      # typecheck + production build to dist/
npm run preview    # preview the production build
npm test           # run the engine unit tests (Vitest)

Deploy to GitHub Pages

A workflow is included at .github/workflows/deploy.yml:

  1. Push to main.
  2. In the repo: Settings → Pages → Build and deployment → Source = GitHub Actions.
  3. The workflow builds and publishes dist/.

vite.config.ts uses base: './', so the built SPA works on any Pages project subpath (https://<user>.github.io/<repo>/) without hardcoding the repo name.

Discovery & SEO (search + AI agents)

The site ships a full set of discovery metadata so it is well indexed by search engines and well understood by AI agents. Static assets live in public/ (Vite copies them verbatim to dist/ root); per-page metadata lives in index.html.

Asset Purpose
index.html <head> Title, description, canonical, robots/googlebot, Open Graph, Twitter card, and schema.org JSON-LD (WebSite + WebApplication + Person). Absolute URLs use the production origin; icon/manifest links are root paths that Vite rebases to the deployed base.
<noscript> fallback Meaningful content + links for no-JS crawlers/agents (this is a client-rendered SPA).
favicon.svg / favicon.ico / apple-touch-icon.png Scalable + legacy + iOS icons (the indigo→violet brand tile with the mark).
icon-192.png / icon-512.png / icon-maskable-512.png PWA icons, incl. a maskable variant with safe padding.
og-image.png (1200×630) Social share image, derived from the design system.
site.webmanifest PWA manifest (relative URLs → subpath-portable).
robots.txt Allows crawling, welcomes major AI agents by explicit group, and references sitemap.xml.
sitemap.xml The canonical URL with <lastmod>.
llms.txt / llms-full.txt llmstxt.org discovery: a curated link index and the full concatenated README + docs/ text for agents.
404.html / humans.txt Branded not-found page and site credits.

The canonical origin is https://webmaxru.github.io/finops-copilot/; update the absolute URLs in index.html, robots.txt, sitemap.xml, llms.txt, and the icon scripts if the site moves to a custom domain. Because this is a GitHub Pages project site, robots.txt/sitemap.xml ship at the project subpath (not the domain root) — the best available placement without a custom domain.

Raster images and the full-text file are pre-generated and committed (no build-time image toolchain). Regenerate them with:

python scripts/generate-icons.py     # favicons, PWA/app icons, og-image.png
python scripts/build-llms-full.py     # public/llms-full.txt from README + docs/

AI agents (WebMCP)

Beyond static discovery metadata, the app exposes live, callable tools to in-browser AI agents via WebMCP (the imperative document.modelContext API). Two tools are registered at startup:

  • get_spend_forecast (read-only) — runs the current configuration and returns the projected month-end bill, metered spend, blocked-user breakdown, pool exhaustion, and per-cost-center rollup.
  • configure_enterprise_plan (write) — sets the top-level enterprise inputs (licenses, Business/Enterprise split, active %, average usage, power users, enterprise budget, promo), clamped to the documented ranges, then returns the recomputed forecast.

Both declare a result (outputSchema) and return structured output. The integration lives in src/webmcp/ and is a pure interface over the existing engine — it introduces no new billing rule. Full contract and schema-to-formula mapping: docs/webmcp-tools.md.

Accuracy & caveats

  • A simulator for quick validation, not an invoice. Usage is entered as credits/$ per developer, not per-token; per-model token pricing is intentionally out of scope to keep the UI simple.
  • The cost-center included-usage cap (AI credit pool) is managed in the billing UI; at the cap you choose, per cost center, whether to block further included usage or continue as paid overage (2026-07-20) — surfaced in the UI as the "stop usage at the cap" toggle. The cost-center per-user budget is likewise available in the billing UI (and via REST).
  • Promo allowances expire Sep 1 2026; model/pricing figures are as of 2026-07.
  • Pricing constants live in src/model/defaults.ts for easy updates.

Project layout

src/
  model/      pricing constants, types, seeded RNG, formatters, simulation engine (+ tests)
  state/      Zustand store + useSimResult() hook (memoized recompute)
  webmcp/     in-browser WebMCP tools for AI agents (imperative API) (+ tests)
  components/ GlobalControls, CostCenterList/Card, Timeline, PlayControls,
              KpiCards, BurndownChart, CostCenterCharts, Warnings, AssumptionsFooter,
              Slider, Toggle
docs/         formal calculation reference (formulas, billing model, engine, citations)

The simulation engine (src/model/engine.ts) is a pure, deterministic function of the inputs; the whole 30-day month is computed once per input change and cached, so timeline scrubbing/animation is cheap.

Calculation documentation

Every formula and its interconnections are formally documented in docs/, with each billing rule cited to official GitHub documentation and each item tagged [Fact] (GitHub-documented), [Derived], or [Assumption] (simulator modeling choice):

Contributing: .github/copilot-instructions.md (and AGENTS.md) require that any calculation change and its docs/ update ship together, that website changes update the docs when relevant, and that every change is validated against official GitHub documentation.

About

Simulate monthly GitHub Copilot spend for enterprises (Business + Enterprise seats) across cost centers.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages