Files
agent-cost-estimator/.vibe/ai-usage-cost.md
T
nvaldez 94e7534a79 feat: credit-pool display (mistral-api vs mistral-vibe)
Different credit pools can share one pricing table, so the display key
now reports the pool a session actually bills. Two optional pricing
fields drive it:
- harness_credit_pools ({"vibe": "mistral-vibe", "hermes": "mistral-api"})
  for harnesses whose logs do not record the billing API (Vibe session
  logs carry only the model name)
- billing_url_pools ({"api.mistral.ai": "mistral-api"}) for harnesses
  that do: Hermes logs session_model_usage.billing_base_url, and a URL
  match wins over the harness mapping

SessionMeta gains base_url; the Hermes adapter exposes the logged
billing base URL (tolerates older schemas without the column). The pool
overrides the provider part of the display key (mistral-api:mistral-
large-4 for a Hermes session on the pay-as-you-go API, mistral-vibe:
zai-glm-5-3 for a Vibe session), appears as a "credit pool" line in -d
and credit_pool in --json, and the GUI refresh resolver maps
pool-prefixed strings back to the model's real rates. Rates always
come from the matched pricing entry.

Verified live against both harnesses: mistral-vibe:zai-glm-5-3
(Vibe) and mistral-api:mistral-large-4 (Hermes on api.mistral.ai).

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-10 20:02:11 +01:00

6.6 KiB

AI Usage Cost Tracking

This file tracks the AI model usage costs for each commit in this repository.

Purpose

To maintain transparency and accountability for AI-assisted development, this file records the estimated cost of each commit. This helps track project expenses and understand the value of AI assistance.

Format

Each entry follows this format:

### <commit-hash> - <commit-message-first-line>
- **Date**: YYYY-MM-DD HH:MM:SS
- **Model**: provider:model (e.g., mistral:mistral-medium)
- **Session Cost**: $X.XX
- **Turn Cost**: $Y.YY
- **Total for commit**: $Z.ZZ
- **Notes**: Any additional context

Cost Calculation

Costs are calculated using agent-cost-estimator based on:

  • Token usage from session logs
  • Pricing from the bundled pricing.json or custom pricing file
  • Formula: (fresh_input * input_price + cached_input * cached_price + output * output_price) / 1,000,000

Usage

Before committing, run:

agent-cost-estimator --session-id <session-dir> -d

And add the cost information to this file for the current session.


Commit Cost Log

Main Branch

(pending) - feat: add Hermes Agent support (harness adapter, plugin, installer)

  • Date: 2026-10-24
  • Model: zai:zai-glm-5-3 (Hermes Agent)
  • Session Cost: $11.49
  • Turn Cost: $0.73 (running total at commit time)
  • Total for commit: $11.49
  • Notes: Hermes integration: harnesses/hermes.py adapter (state.db + plugin ledger), integration/hermes/plugin (4 lifecycle hooks, per-turn cost line), standalone installer, 22 new tests (52 total), SPEC/SKILL/wiki docs updated. Cost via agent-cost-estimator --harness hermes (this very session).

fb2ceae - Bump version to 0.2.0

  • Date: 2026-10-24
  • Model: mistral:mistral-medium-3.5
  • Session Cost: $0.00
  • Turn Cost: $0.00
  • Total for commit: $0.00
  • Notes: Version bump only, no AI usage

b726ca2 - Prioritize active_model over model_name for pricing lookup

  • Date: 2026-10-24
  • Model: mistral:mistral-medium-3.5
  • Session Cost: $0.00
  • Turn Cost: $0.00
  • Total for commit: $0.00
  • Notes: Code restructuring, minimal token usage

d6f37c3 - Bump version to 0.2.1

  • Date: 2026-10-24
  • Model: mistral:mistral-medium-3.5
  • Session Cost: $0.00
  • Turn Cost: $0.00
  • Total for commit: $0.00
  • Notes: Version bump only

4d13fa0 - Make --integrate command require explicit harness argument

  • Date: 2026-10-24
  • Model: mistral:mistral-medium-3.5
  • Session Cost: $0.00
  • Turn Cost: $0.00
  • Total for commit: $0.00
  • Notes: CLI enhancement

17239e2 - Add comprehensive SPEC.md for project recreation

  • Date: 2026-10-24
  • Model: mistral:mistral-medium-3.5
  • Session Cost: $0.00
  • Turn Cost: $0.00
  • Total for commit: $0.00
  • Notes: Documentation only

974aea1 - Add warning when model price is not available in pricing.json

  • Date: 2026-10-24
  • Model: mistral:mistral-medium-3.5
  • Session Cost: $0.00
  • Turn Cost: $0.00
  • Total for commit: $0.00
  • Notes: Warning feature implementation

156f488 - Restructure SPEC.md: separate harness-specific configs from general configs

  • Date: 2026-10-24
  • Model: mistral:mistral-medium-3.5
  • Session Cost: $0.00
  • Turn Cost: $0.00
  • Total for commit: $0.00
  • Notes: Documentation restructuring

(pending) - fix: correct GUI auto-refresh pricing lookup and refresh posted prices

  • Date: 2026-11-10
  • Model: zai:zai-glm-5-3
  • Session Cost: $0.79 (running total at commit time)
  • Turn Cost: $0.12
  • Total for commit: $0.79
  • Notes: Pricing audit fixes: get_model_rates_for_display helper in gui.py splits provider-qualified model strings so auto-refresh stops falling back to default rates; pricing.json updated against official pages (Mistral Large 4 promotional $0.70/$0.07/$2.10, GLM 5.3 source corrected; verified 2026-11-10); AGENTS.md documents the price-update procedure; 4 regression tests added.

(pending) - docs: label zai pricing section as Mistral hosted

  • Date: 2026-11-10
  • Model: zai:zai-glm-5-3
  • Session Cost: $1.46 (running total at commit time)
  • Turn Cost: $0.18
  • Total for commit: $1.46
  • Notes: pricing.json zai section gets a "(Mistral hosted)" note (no separate Z.ai account; section named after the harness model prefix), per-model notes clarified; AGENTS.md price-update steps now cover section naming. No rate changes.

(pending) - feat: provider_alias/model_alias display keys in pricing.json

  • Date: 2026-11-10
  • Model: mistral:zai-glm-5-3
  • Session Cost: $1.68 (running total at commit time)
  • Turn Cost: $0.55
  • Total for commit: $1.68
  • Notes: New optional pricing fields provider_alias (set on the zai section to "mistral") and per-model model_alias change only the cost tracker display (mistral:zai-glm-5-3), never the lookup. pricing.py gains display_key_for/resolve_display_key; CLI default line, -d model line, and --json (model_key display + new model_key_raw) use the display form; GUI session rows and the refresh lookup resolver keep in sync. AGENTS.md documents the fields. MINOR bump to 0.5.0.

(pending) - feat: credit-pool display (mistral-api vs mistral-vibe)

  • Date: 2026-11-10
  • Model: mistral-vibe:zai-glm-5-3
  • Session Cost: $9.41 (running total at commit time)
  • Turn Cost: $1.10
  • Total for commit: $9.41
  • Notes: Credit pools differentiate billing pools that share a pricing table: harness_credit_pools (vibe -> mistral-vibe) for harnesses that do not log the billing API (Vibe), billing_url_pools (api.mistral.ai -> mistral-api) driven by Hermes's logged billing_base_url, which wins over the harness mapping. Pool overrides the provider part of the display key; SessionMeta gains base_url from the Hermes adapter; CLI --json gains credit_pool; GUI session strings and the refresh resolver handle pool prefixes. Verified live: mistral-vibe:zai-glm-5-3 (Vibe) and mistral-api:mistral-large-4 (Hermes). MINOR bump to 0.6.0.

Instructions for Contributors

  1. Before committing, run agent-cost-estimator for your current session
  2. Copy the output (provider:model | session:$X | turn:$Y)
  3. Add a new entry to this file with:
    • Commit hash (use git rev-parse --short HEAD)
    • Commit message
    • Date
    • Model and costs from agent-cost-estimator
    • Any relevant notes

Notes

  • Costs are estimates based on token counts and pricing models
  • Actual costs from providers may vary
  • Sessions with multiple turns will have cumulative costs
  • The **model price not available** warning indicates the model wasn't in pricing.json