Skip to main content

Ai Usage

@webframp/ai-usagev2026.08.05.1· 1d agoMODELSWORKFLOWSREPORTS
01README

Unified cross-provider AI token usage monitoring — workflow, model, and report that aggregates Bedrock, Vertex AI, and Azure OpenAI token data into a single view.

Gracefully handles partial provider configurations. Unconfigured providers are shown with setup hints in the report output.

Quick Start

# Pull the extension (also pulls provider dependencies)
swamp extension pull @webframp/ai-usage

# Configure providers you use (any subset works)
swamp model create @webframp/aws/bedrock-usage bedrock-usage \
  --global-arg 'profiles=["default"]' --global-arg 'regions=["us-east-1"]'

swamp model create @webframp/gcp/vertex-usage vertex-usage \
  --global-arg 'projects=["my-project"]'

swamp model create @webframp/azure/openai-usage azure-ai-usage \
  --global-arg 'subscriptions=["sub-id"]'

# Create the unified model
swamp model create @webframp/ai-usage ai-usage

# Check provider status
swamp model method run ai-usage status

# Run the full scan workflow
swamp workflow run @webframp/ai-usage-scan

# Or generate report from existing data
swamp model method run ai-usage generate

Methods

  • status — Check which providers are configured, with setup hints
  • generate — Produce unified report from collected scan data

Workflow

  • @webframp/ai-usage-scan — Orchestrates scan across all configured providers then generates the unified report

Report

  • @webframp/ai-usage-report — Workflow-scope report for standalone use
02Release Notes

2026.08.05.1

Changed: Bump @webframp/aws/bedrock-usage 2026.08.01.1 → 2026.08.02.1

2026.08.02.1

Changed: Bump @webframp/aws/bedrock-usage 2026.07.29.1 → 2026.08.01.1

2026.07.31.2

Changed: Breaking schema change — the hint string field in status and report coverage entries is replaced by a setup object containing command, permissions (array of least-privilege IAM/RBAC permissions), and authNotes (authentication mechanism description). Consumers parsing the status resource must update to the new shape.

Changed: The extensionType field is now included in provider status entries (e.g. @webframp/aws/bedrock-usage).

Added: Setup guidance now includes the full model create command with all required arguments (including auth credentials for GCP and Azure that were previously missing), the exact permissions needed, and a description of how authentication works for each provider.

Added: Data-driven provider registry. Adding a new provider (Anthropic, Moonshot, etc.) requires only appending a ProviderDefinition object — no new code blocks in status, generate, or the report.

Changed: The report extension now imports provider definitions from the model, eliminating duplicated per-provider rendering logic.

Upgrade note: This is a breaking change. If you parse the status resource programmatically, update from provider.hint (string) to provider.setup (object with command, permissions, authNotes fields). Configured providers have these fields blanked (empty string / empty array).

03Models1
@webframp/ai-usagev2026.08.05.1ai_usage.ts
fn status()
Check which provider models are configured. Returns setup guidance
fn generate(days: number)
Generate a unified cross-provider AI usage report from collected scan data.
ArgumentTypeDescription
daysnumberExpected lookback period

Resources

status(1h)— Provider configuration status
report(6h)— Unified cross-provider AI usage report
04Workflows1
@webframp/ai-usage-scan239ea328-2c6d-4e77-8790-cda67e5715fe

Scan AI token usage across all configured cloud providers (AWS Bedrock, GCP Vertex AI, Azure OpenAI) and generate a unified cross-provider report. Gracefully handles missing providers — unconfigured provider steps fail silently (allowFailure: true) and the report shows coverage gaps with setup hints.

scanCollect token usage from each configured provider
1.aws-bedrockbedrock-usage.scan_accounts— Scan AWS Bedrock token usage across profiles/regions
2.gcp-vertexvertex-usage.scan_projects— Scan GCP Vertex AI token usage across projects
3.azure-openaiazure-ai-usage.scan_subscriptions— Scan Azure OpenAI token usage across subscriptions
reportGenerate unified cross-provider usage report
1.generateai-usage.generate— Aggregate scan data into unified report with coverage hints
05Reports1
@webframp/ai-usage-reportworkflow
ai_usage_report.ts

Cross-provider AI token usage report with coverage status, per-provider breakdown, and highlights

aitoken-usagefinopsmonitoring
06Previous Versions9
2026.08.02.1

2026.08.02.1

Changed: Bump @webframp/aws/bedrock-usage 2026.07.29.1 → 2026.08.01.1

2026.07.31.2

Changed: Breaking schema change — the hint string field in status and report coverage entries is replaced by a setup object containing command, permissions (array of least-privilege IAM/RBAC permissions), and authNotes (authentication mechanism description). Consumers parsing the status resource must update to the new shape.

Changed: The extensionType field is now included in provider status entries (e.g. @webframp/aws/bedrock-usage).

Added: Setup guidance now includes the full model create command with all required arguments (including auth credentials for GCP and Azure that were previously missing), the exact permissions needed, and a description of how authentication works for each provider.

Added: Data-driven provider registry. Adding a new provider (Anthropic, Moonshot, etc.) requires only appending a ProviderDefinition object — no new code blocks in status, generate, or the report.

Changed: The report extension now imports provider definitions from the model, eliminating duplicated per-provider rendering logic.

Upgrade note: This is a breaking change. If you parse the status resource programmatically, update from provider.hint (string) to provider.setup (object with command, permissions, authNotes fields). Configured providers have these fields blanked (empty string / empty array).

updated dependencies

2026.07.31.2

2026.07.31.2

Changed: Breaking schema change — the hint string field in status and report coverage entries is replaced by a setup object containing command, permissions (array of least-privilege IAM/RBAC permissions), and authNotes (authentication mechanism description). Consumers parsing the status resource must update to the new shape.

Changed: The extensionType field is now included in provider status entries (e.g. @webframp/aws/bedrock-usage).

Added: Setup guidance now includes the full model create command with all required arguments (including auth credentials for GCP and Azure that were previously missing), the exact permissions needed, and a description of how authentication works for each provider.

Added: Data-driven provider registry. Adding a new provider (Anthropic, Moonshot, etc.) requires only appending a ProviderDefinition object — no new code blocks in status, generate, or the report.

Changed: The report extension now imports provider definitions from the model, eliminating duplicated per-provider rendering logic.

Upgrade note: This is a breaking change. If you parse the status resource programmatically, update from provider.hint (string) to provider.setup (object with command, permissions, authNotes fields). Configured providers have these fields blanked (empty string / empty array).

updated dependencies

2026.07.24.1

2026.07.24.1

Changed: Bump dependency pins to latest published versions:

  • @webframp/aws/bedrock-usage 2026.07.18.1 → 2026.07.21.1
  • @webframp/gcp/vertex-usage 2026.07.10.1 → 2026.07.21.1
  • @webframp/azure/openai-usage 2026.06.21.1 → 2026.07.21.1

updated dependencies

2026.07.20.1

2026.07.20.1

Changed: Refreshed dependency pins to the latest published releases. Model version bumped to match the manifest; no schema changes (identity upgrade).

Upgrade note: Bumps @webframp/aws/bedrock-usage 2026.05.12.1 → 2026.07.18.1, @webframp/gcp/vertex-usage 2026.05.12.1 → 2026.07.10.1, and @webframp/azure/openai-usage 2026.05.12.1 → 2026.06.21.1, pulled automatically with this extension.

updated dependencies

2026.07.18.1

2026.07.18.1

Added: An upgrades array entry (no-op) to ai_usage.ts for proper typeVersion tracking on existing instances. No schema or behavior changes.

2026.07.16.1

Changed: README and LICENSE reformatted (deno fmt) in PR #134; this is the first version bump to publish that formatting to the registry. No functional or behavioral change.

2026.07.16.1

2026.07.16.1

Changed: README and LICENSE reformatted (deno fmt) in PR #134; this is the first version bump to publish that formatting to the registry. No functional or behavioral change.

2026.06.21.1
2026.06.15.1
2026.05.12.1
07Stats
A
100 / 100
Downloads
2
Archive size
119.4 KB
  • Has README or module doc2/2earned
  • README has a code example1/1earned
  • README is substantive1/1earned
  • Most symbols documented1/1earned
  • No slow types (deprecated)1/1earned
  • Dependencies pass trust audit2/2earned
  • Has description1/1earned
  • Platform support declared (or universal)2/2earned
  • License declared1/1earned
  • Verified public repository2/2earned
08Platforms
09Labels