Skip to content

Compress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.

feat: show the Headroom for Teams offer in the dashboard, docs, llms.txt and release notes (#3991)

Tejas Chopra1ad92f0cbc3d
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 9ef4b59ba..ccf799ddc 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -1062,6 +1062,26 @@ jobs:
gh release create "$TAG" --title "$TITLE" --notes-file .changelog.md
fi
+ # Appends once: a re-run finds this step's own marker and leaves the notes
+ # alone. Keyed on the marker, not the link, so a changelog entry that
+ # happens to mention the perks page does not suppress the footer.
+ # Release notes stay the changelog; this is one line under it.
+ - name: Add Headroom for Teams footer to release notes
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ run: |
+ TAG="v${{ needs.detect-version.outputs.version }}"
+ MARKER='<!-- headroom-teams-footer -->'
+ gh release view "$TAG" --json body --jq .body > release-notes.md
+ if ! grep -qF "$MARKER" release-notes.md; then
+ {
+ printf '\n%s\n\n---\n\n' "$MARKER"
+ printf '**Headroom for Teams:** 3 months of Headroom Enterprise free with a 12-month plan. '
+ printf '[Claim the perk →](https://headroom-perks.vercel.app/?source=github&utm_source=github&utm_medium=release-notes&utm_content=%s)\n' "$TAG"
+ } >> release-notes.md
+ gh release edit "$TAG" --notes-file release-notes.md
+ fi
+
- name: Publish ${{ env.PYPI_PACKAGE }} Python distributions to GitHub Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/docs/app/layout.tsx b/docs/app/layout.tsx
index 38a9cb587..c48b48b26 100644
--- a/docs/app/layout.tsx
+++ b/docs/app/layout.tsx
@@ -1,4 +1,5 @@
import { RootProvider } from 'fumadocs-ui/provider/next';
+import { Banner } from 'fumadocs-ui/components/banner';
import './global.css';
import { Inter } from 'next/font/google';
import type { Metadata } from 'next';
@@ -48,7 +49,18 @@ export default function Layout({ children }: LayoutProps<'/'>) {
return (
<html lang="en" className={inter.className} suppressHydrationWarning>
<body className="flex flex-col min-h-screen">
- <RootProvider>{children}</RootProvider>
+ <RootProvider>
+ {/* Dismissible; Fumadocs remembers the dismissal per id in localStorage. */}
+ <Banner id="teams-perk-2026">
+ <a
+ href="https://headroom-perks.vercel.app/?source=github&utm_source=docs&utm_medium=banner"
+ className="font-medium underline-offset-4 hover:underline"
+ >
+ Headroom for Teams: 3 months free with a 12-month plan →
+ </a>
+ </Banner>
+ {children}
+ </RootProvider>
</body>
</html>
);
diff --git a/docs/content/docs/meta.json b/docs/content/docs/meta.json
index aa0811660..ba7553294 100644
--- a/docs/content/docs/meta.json
+++ b/docs/content/docs/meta.json
@@ -6,6 +6,7 @@
"installation",
"docker-install",
"persistent-installs",
+ "teams",
"---Compression---",
"how-compression-works",
"smart-crusher",
diff --git a/docs/content/docs/proxy.mdx b/docs/content/docs/proxy.mdx
index 81ab2cecd..e72df58c0 100644
--- a/docs/content/docs/proxy.mdx
+++ b/docs/content/docs/proxy.mdx
@@ -36,7 +36,7 @@ Separately, an **anonymous usage beacon is on by default** (opt-out). Once a ses
The install id is a random UUID generated on first run and stored in your config directory. It is deliberately not derived from hostname, MAC address, or any hardware property — delete the file and you get a new one.
-Disable it with `HEADROOM_BEACON=off`, the `DO_NOT_TRACK=1` convention, or `--offline` (which also disables update checks and license reporting).
+Disable it with `HEADROOM_BEACON=off`, the `DO_NOT_TRACK=1` convention, or `HEADROOM_OFFLINE=1` (which also disables update checks and license reporting).
## CLI options
@@ -401,7 +401,7 @@ with a privileged job.
| `HEADROOM_PROXY_TOKEN` | none | Require a token from non-loopback callers, as `X-Headroom-Proxy-Token: <token>` or `Authorization: Bearer <token>`. The token is removed from the request before it is forwarded upstream; clients that also send a provider credential should use `X-Headroom-Proxy-Token` and keep `Authorization` for the provider. Also gates the read-only operator routes (`/stats-history`, `/quota`, `/subscription-window`, `/metrics`), which otherwise answer loopback and trusted-CIDR callers only. |
| `HEADROOM_ALLOW_UNAUTHENTICATED_BIND` | `false` | Acknowledge a non-loopback bind (`--host 0.0.0.0`, `::`, a LAN address) with **no** `HEADROOM_PROXY_TOKEN`. Without a token or this flag the proxy refuses to start, because `/v1/*` would relay upstream with the operator's credentials for every peer that can reach the port. Only set it when the runtime already restricts reachability (a container published on `127.0.0.1`). |
| `HEADROOM_COMPRESS_ALLOW_REMOTE` | `false` | Allow non-loopback callers to reach [`POST /v1/compress`](#post-v1compress) and `POST /v1/usage`. Required to run Headroom as a remote gateway/sidecar; without it remote callers get `404`. |
-| `--offline` / `HEADROOM_OFFLINE` | `false` | Air-gap mode: refuse every connection Headroom itself initiates — telemetry, update checks, license reporting, model/tokenizer/binary/dataset downloads, remote Kompress, OTLP and Langfuse export, Copilot auth, the subscription pollers, the OpenAI embedders, Headroom Cloud compression and the TLS diagnostics (`headroom doctor --network` reports them as skipped). Four things still work on purpose: forwarding your own requests to the upstream you configured, operator-configured local endpoints (the Ollama embedder), loopback health probes, and paths an `is_offline()` check already disables. Refusals surface as messages, not tracebacks. See the air-gap notes in `docs/metrics-technical-guide.md`. |
+| `HEADROOM_OFFLINE` | `false` | Air-gap mode: refuse every connection Headroom itself initiates — telemetry, update checks, license reporting, model/tokenizer/binary/dataset downloads, remote Kompress, OTLP and Langfuse export, Copilot auth, the subscription pollers, the OpenAI embedders, Headroom Cloud compression and the TLS diagnostics (`headroom doctor --network` reports them as skipped). Four things still work on purpose: forwarding your own requests to the upstream you configured, operator-configured local endpoints (the Ollama embedder), loopback health probes, and paths an `is_offline()` check already disables. Refusals surface as messages, not tracebacks. See the air-gap notes in `docs/metrics-technical-guide.md`. |
| `HEADROOM_LICENSE` | unset | Licence token, read by core and every licensed extension. `HEADROOM_LICENSE_KEY` is a deprecated alias for one release and logs a warning. A licence on its own sends nothing to Headroom. |
| `HEADROOM_USAGE_REPORTING` | `false` | Set `1` to let the proxy validate the licence and post aggregate usage counts (no content) to the Headroom cloud. Off unless set; `HEADROOM_OFFLINE` still overrides it. |
| `--stateless` / `HEADROOM_STATELESS` | `false` | Keep all state in memory; no filesystem writes (disables logs, memory, TOIN). |
diff --git a/docs/content/docs/teams.mdx b/docs/content/docs/teams.mdx
new file mode 100644
index 000000000..62189fefe
--- /dev/null
+++ b/docs/content/docs/teams.mdx
@@ -0,0 +1,27 @@
+---
+title: Headroom for Teams
+description: Headroom Enterprise for engineering teams — more savings, automatic model routing, attack removal, SSO and an org-wide savings dashboard. 3 months free with a 12-month plan.
+---
+
+Headroom OSS is built for one developer on one laptop. Headroom Enterprise is built
+for the whole team.
+
+| | Open source | Enterprise |
+|---|---|---|
+| Savings | Compression, plus tool search on Anthropic requests (on by default) | Also: tool search for every model, harness tuning, extra compressors |
+| Model routing | Rule-based and opt-in: turn it on with `HEADROOM_MODEL_ROUTER_ENABLED=1` and write the rules in [`HEADROOM_MODEL_ROUTES`](/docs/configuration#cost-aware-model-routing) | Automatic: a cheaper model per request when quality allows, with a shadow mode that shows the savings before you turn it on |
+| Security | — | Detect and strip prompt injection and risky tool calls |
+| Rollout | Per laptop | Managed or in your VPC, SSO, central config, org-wide savings |
+| Support | GitHub, Discord | Dedicated engineers, onboarding, priority response |
+
+## 3 months free
+
+Companies that sign a 12-month Enterprise plan get their first 3 months free. One
+perk per company.
+
+**[Claim 3 months free →](https://headroom-perks.vercel.app/?source=github&utm_source=docs&utm_medium=teams-page)**
+
+Prefer to talk first? Email [[email protected]](mailto:[email protected])
+with your stack and rough monthly LLM spend.
+
+Everything in the open-source repo stays open source under Apache 2.0.
diff --git a/docs/lib/layout.shared.ts b/docs/lib/layout.shared.ts
index aad9c0be4..994a1c22a 100644
--- a/docs/lib/layout.shared.ts
+++ b/docs/lib/layout.shared.ts
@@ -6,5 +6,12 @@ export function baseOptions(): BaseLayoutProps {
title: 'Headroom',
},
githubUrl: 'https://github.com/headroomlabs-ai/headroom',
+ links: [
+ {
+ text: 'Headroom for Teams',
+ url: '/docs/teams',
+ active: 'nested-url',
+ },
+ ],
};
}
diff --git a/headroom/dashboard/__init__.py b/headroom/dashboard/__init__.py
index fccff9d21..66c3e36ba 100644
--- a/headroom/dashboard/__init__.py
+++ b/headroom/dashboard/__init__.py
@@ -1,6 +1,7 @@
"""Headroom Dashboard - Real-time proxy monitoring UI."""
import mimetypes
+import re
from pathlib import Path
DASHBOARD_DIR = Path(__file__).parent
@@ -49,10 +50,27 @@ def register_static_mime_types() -> None:
mimetypes.add_type(mime_type, extension)
-def get_dashboard_html() -> str:
- """Load the dashboard HTML template."""
+_TEAMS_PERK = re.compile(r"[ \t]*<!-- teams-perk:start.*?<!-- teams-perk:end -->\n?", re.DOTALL)
+
+
+def get_dashboard_html(*, licensed: bool | None = None) -> str:
+ """Load the dashboard HTML template.
+
+ The Headroom for Teams offer is stripped on a licensed install: it is
+ already a customer. ``licensed`` is the running proxy's effective licence
+ state (``create_app`` passes it, covering ``ProxyConfig.license_key``).
+ When omitted it is resolved from the environment the same way the CLI
+ does: ``HEADROOM_LICENSE``, or the deprecated ``HEADROOM_LICENSE_KEY``.
+ """
template_path = TEMPLATES_DIR / "dashboard.html"
- return template_path.read_text(encoding="utf-8")
+ html = template_path.read_text(encoding="utf-8")
+ if licensed is None:
+ from headroom.license_env import resolve_license_token
+
+ licensed = bool(resolve_license_token())
+ if licensed:
+ html = _TEAMS_PERK.sub("", html)
+ return html
def get_settings_html() -> str:
diff --git a/headroom/dashboard/templates/dashboard.html b/headroom/dashboard/templates/dashboard.html
index 3bc7e8b04..d0f82c5ad 100644
--- a/headroom/dashboard/templates/dashboard.html
+++ b/headroom/dashboard/templates/dashboard.html
@@ -209,6 +209,26 @@
</header>
<main class="p-6 max-w-7xl mx-auto">
+ <!-- teams-perk:start — removed server-side when HEADROOM_LICENSE is set
+ (see headroom.dashboard.get_dashboard_html). A plain link: nothing
+ is fetched or reported, and dismissal stays in this browser. -->
+ <aside data-testid="teams-perk" x-show="!teamsPerkDismissed"
+ class="mb-6 flex flex-col gap-3 rounded-lg border border-accent/40 bg-surface p-4 md:flex-row md:items-center md:justify-between">
+ <p class="text-sm text-gray-300">
+ <span class="font-medium text-accent">Headroom for Teams</span>
+ <span x-text="(stats.summary?.cost?.total_saved_usd || 0) >= 1
+ ? ' · You have saved $' + formatCurrency(stats.summary.cost.total_saved_usd) + ' on this machine. Get the same savings across your team, with 3 months free on a 12-month plan.'
+ : ' · Bring these savings to your whole team, with 3 months free on a 12-month plan.'"></span>
+ </p>
+ <div class="flex items-center gap-3 shrink-0">
+ <a href="https://headroom-perks.vercel.app/?source=github&utm_source=headroom&utm_medium=dashboard&utm_content=banner"
+ target="_blank" rel="noopener noreferrer"
+ class="px-3 py-1.5 text-sm font-medium rounded-md bg-accent text-black hover:opacity-90">Claim 3 months free →</a>
+ <button type="button" @click="dismissTeamsPerk()" aria-label="Dismiss Headroom for Teams offer"
+ class="text-sm text-gray-500 hover:text-gray-200">✕</button>
+ </div>
+ </aside>
+ <!-- teams-perk:end -->
<template x-if="viewMode === 'session'">
<div data-testid="session-view">
<p class="mb-4 text-xs text-gray-500">Current proxy process · runtime counters reset on restart</p>
@@ -2033,6 +2053,14 @@
function dashboard() {
return {
stats: {},
+ teamsPerkDismissed: (() => {
+ try { return localStorage.getItem('headroom-teams-perk-dismissed') === '1'; }
+ catch (e) { return false; }
+ })(),
+ dismissTeamsPerk() {
+ this.teamsPerkDismissed = true;
+ try { localStorage.setItem('headroom-teams-perk-dismissed', '1'); } catch (e) {}
+ },
lifetimeStats: {},
historyStats: {},
healthy: true,
diff --git a/headroom/proxy/server.py b/headroom/proxy/server.py
index be85743ee..404ecbd81 100644
--- a/headroom/proxy/server.py
+++ b/headroom/proxy/server.py
@@ -4537,11 +4537,17 @@ def create_app(config: ProxyConfig | None = None) -> FastAPI:
# published on host loopback, whose peer is the bridge gateway, still loads.
_dashboard_gate = [Depends(_require_operator_read_client)]
+ # Effective licence state of THIS proxy, resolved once: an explicit
+ # ProxyConfig.license_key, else HEADROOM_LICENSE or its deprecated alias.
+ from headroom.license_env import resolve_license_token
+
+ _dashboard_licensed = bool(config.license_key) or bool(resolve_license_token())
+
@app.get("/dashboard", response_class=HTMLResponse)
@app.get("/dashboard/", response_class=HTMLResponse, include_in_schema=False)
async def dashboard():
"""Serve the Headroom dashboard UI."""
- return get_dashboard_html()
+ return get_dashboard_html(licensed=_dashboard_licensed)
# --- Dashboard settings API (loopback-gated, registry-validated) ---------
# Read/write the curated HEADROOM_* knobs the settings GUI manages. Writes
diff --git a/llms.txt b/llms.txt
index 9739d354d..f7f2ec6f8 100644
--- a/llms.txt
+++ b/llms.txt
@@ -62,6 +62,13 @@ The canonical, always-current documentation index lives at the docs site below.
- [Troubleshooting](https://docs.headroomlabs.ai/docs/troubleshooting): Common failure modes and fixes.
- [Limitations](https://docs.headroomlabs.ai/docs/limitations): What Headroom won't do well today.
+## Headroom for Teams
+
+For teams and companies that want Headroom across every developer rather than one laptop: Headroom Enterprise adds more savings (tool search for every model, harness tuning, extra compressors), automatic model routing (open source has opt-in, rule-based routing), prompt-injection and risky-tool-call removal, SSO, managed or VPC deployment, an org-wide savings dashboard, and support. Companies that sign a 12-month Enterprise plan get the first 3 months free.
+
+- [Headroom for Teams](https://docs.headroomlabs.ai/docs/teams): Open source vs Enterprise, and the 3-months-free offer.
+- [Claim 3 months free](https://headroom-perks.vercel.app/?source=github&utm_source=llms-txt): Perk sign-up form. One perk per company.
+
## Licensing
-Apache 2.0. Use commercially, modify, redistribute. Data stays on the user's machine when running the library, proxy, or MCP server locally. Anonymous telemetry is **off by default** (opt-in); enable with `HEADROOM_TELEMETRY=on` or `headroom proxy --telemetry`.
+Apache 2.0. Use commercially, modify, redistribute. Data stays on the user's machine when running the library, proxy, or MCP server locally. An anonymous usage beacon is **on by default**: it reports compression ratios, counters, provider and model IDs, OS and architecture, and never prompts, completions, code or file paths. Turn it off with `HEADROOM_BEACON=off`, `DO_NOT_TRACK=1`, or `HEADROOM_OFFLINE=1`. See [Telemetry](https://github.com/headroomlabs-ai/headroom#telemetry).
diff --git a/tests/test_dashboard_teams_perk.py b/tests/test_dashboard_teams_perk.py
new file mode 100644
index 000000000..cd44d5628
--- /dev/null
+++ b/tests/test_dashboard_teams_perk.py
@@ -0,0 +1,86 @@
+"""The Headroom for Teams offer shows on unlicensed installs only.
+
+"Licensed" means the running proxy's effective licence, from any source the
+proxy accepts: an explicit ``ProxyConfig.license_key``, ``HEADROOM_LICENSE``, or
+the deprecated ``HEADROOM_LICENSE_KEY`` alias.
+"""
+
+from __future__ import annotations
+
+import pytest
+from fastapi.testclient import TestClient
+
+from headroom.dashboard import get_dashboard_html
+from headroom.proxy.server import ProxyConfig, create_app
+
+_LICENSE_ENV = ("HEADROOM_LICENSE", "HEADROOM_LICENSE_KEY")
+
+
[email protected](autouse=True)
+def _no_license_env(monkeypatch: pytest.MonkeyPatch) -> None:
+ for name in _LICENSE_ENV:
+ monkeypatch.delenv(name, raising=False)
+
+
+def _assert_offer(html: str, shown: bool) -> None:
+ assert ('data-testid="teams-perk"' in html) is shown
+ assert ("headroom-perks.vercel.app" in html) is shown
+ assert ("teams-perk:start" in html) is shown
+ # Only the offer block ever goes; the dashboard around it is intact.
+ assert 'data-testid="session-view"' in html
+ assert html.count("<main") == 1
+
+
+def _dashboard(monkeypatch: pytest.MonkeyPatch, **config: object) -> str:
+ monkeypatch.setenv("HEADROOM_SKIP_UPSTREAM_CHECK", "1")
+ app = create_app(
+ ProxyConfig(
+ optimize=False,
+ cache_enabled=False,
+ rate_limit_enabled=False,
+ cost_tracking_enabled=False,
+ log_requests=False,
+ http2=False,
+ **config,
+ )
+ )
+ with TestClient(app) as client:
+ response = client.get("/dashboard")
+ assert response.status_code == 200
+ return response.text
+
+
+# --- renderer ---------------------------------------------------------------
+
+
+def test_offer_shown_without_license() -> None:
+ _assert_offer(get_dashboard_html(), shown=True)
+
+
[email protected]("env", _LICENSE_ENV)
+def test_offer_removed_with_license_env(monkeypatch: pytest.MonkeyPatch, env: str) -> None:
+ monkeypatch.setenv(env, "hlk_test")
+ _assert_offer(get_dashboard_html(), shown=False)
+
+
+def test_explicit_licensed_flag_wins_over_env(monkeypatch: pytest.MonkeyPatch) -> None:
+ _assert_offer(get_dashboard_html(licensed=True), shown=False)
+ monkeypatch.setenv("HEADROOM_LICENSE", "hlk_test")
+ _assert_offer(get_dashboard_html(licensed=False), shown=True)
+
+
+# --- /dashboard route: the effective licence of the running proxy -------------
+
+
+def test_route_shows_offer_unlicensed(monkeypatch: pytest.MonkeyPatch) -> None:
+ _assert_offer(_dashboard(monkeypatch), shown=True)
+
+
+def test_route_hides_offer_with_configured_license_key(monkeypatch: pytest.MonkeyPatch) -> None:
+ _assert_offer(_dashboard(monkeypatch, license_key="hlk_configured"), shown=False)
+
+
[email protected]("env", _LICENSE_ENV)
+def test_route_hides_offer_with_license_env(monkeypatch: pytest.MonkeyPatch, env: str) -> None:
+ monkeypatch.setenv(env, "hlk_test")
+ _assert_offer(_dashboard(monkeypatch), shown=False)