6301962a54
install() silently kept any pricing.json already beside the plugin, so reships shipped new code with old tables - that keep is exactly how the Hermes plugin lost the credit-pool (mistral-api) tables between 0.5.0 and 0.9.0, and the 0.9.0 fix needed a manual file deletion. The installer now prints a hint when the kept table differs from the bundled one, and --refresh-pricing ships the bundled table instead (top-level flag next to --integrate hermes, plus an installer flag for standalone runs; default unchanged - owner rate edits in the installed copy still win). SPEC, SKILL, and the installer docstring updated. PATCH to 0.9.1 (new-flag- as-patch precedent: --rm-integrate, 0.4.6 -> 0.4.7). 130 tests pass. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
12 KiB
12 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
1982386 - feat: canonical display module (display-path parity for CLI, GUI, hooks, Hermes plugin)
- Date: 2026-11-11
- Model: mistral-vibe:zai-glm-5-3
- Session Cost: $1.50 (running total at commit time; cumulative session 4cd78665)
- Turn Cost: $0.71
- Notes: Generic display architecture: new self-contained agent_cost_estimator/display.py is the single source of the cost line, model-price note, and token line; main() builds one report object feeding --json and the default output; new --display-lines flag is the pinned hook contract (default output == display lines, test-pinned). Both Vibe hooks thinned to verbatim relays (local formatters removed). Hermes plugin renders through a verbatim display.py copy shipped by install.py (byte-parity pinned by tests), closing the spec 11 open item: Hermes now prints the token line too. utils/formatting.py re-exports format_token_count for the GUI. SPEC.md 5.7/5.9 + module map updated; MINOR bump to 0.7.0; 128 tests pass.
(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.
(pending) - fix: GUI current-turn picks last turn with calls; SPEC.md pricing display docs
- Date: 2026-11-10
- Model: mistral-vibe:zai-glm-5-3
- Session Cost: $3.58 (running total at commit time, projection-state)
- Turn Cost: $0.96
- Total for commit: $3.58
- Notes: gui.last_active_turn() replaces usage.turns[-1] at all four current-turn sites: a trailing pruned turn (0 calls) no longer zeroes the GUI's current-turn price (matches CLI selection; 3 tests). SPEC.md section 3.2 now documents harness_credit_pools, billing_url_pools, provider_alias/model_alias, display-key semantics, and the credit_pool / model_key_raw --json fields; output examples updated to pool display.
(pending) - fix: Tk monthly-summary row background; SPEC.md 5.9 Token Display; README token example
- Date: 2026-11-10
- Model: mistral-vibe:zai-glm-5-3
- Session Cost: $0.20 (running total at commit time)
- Turn Cost: $0.25
- Total for commit: $0.20
- Notes: Spec-vs-implementation review follow-up. Tk GUI now tints the monthly_summary tag (#f0f0f0 light / #303030 dark), matching the already-correct PyQt path and the wiki token-display spec 4.2/4.5. SPEC.md gains section 5.9 Token Display (formatter, CLI, GUI, hooks, parity rule); README usage examples show the two-line default output. PATCH bump to 0.6.2; 140 tests pass.
(pending) - feat: token line gains +N per-turn increments; whole-number token format everywhere
- Date: 2026-11-10
- Model: mistral-vibe:zai-glm-5-3
- Session Cost: $3.62 (running total at commit time)
- Turn Cost: $0.75
- Total for commit: $3.62
- Notes: display.py format_token_count now rounds half-up to
whole numbers with tier rollover (999999 -> "1M", never "1000k");
format_token_line renders "-- I:
+ O:+ C:+", +0 for zero increments, fail-soft without turn fields; --json last_turn gains raw token counts and token_display gains last_turn_* keys; Hermes plugin report carries the turn bucket (parity across all display paths). 125 tests pass; live CLI and hook relay verified. MINOR bump to 0.8.0. Plan: wiki/plans/agent-cost-estimator-token-line-turn-usage-plan.md.
(pending) - feat: Hermes plugin credit-pool label (mistral-api) + mistral-small-latest rates
- Date: 2026-11-11
- Model: mistral-vibe:zai-glm-5-3
- Session Cost: $1.78 (running total at commit time)
- Turn Cost: $0.43
- Total for commit: $1.78
- Notes: the
94e7534credit-pool display never reached the Hermes plugin: its label stayed on the billing route (mistral:model), so the plugin never showed the mistral-api pool. The plugin now applies the same priority as the CLI/GUI display key (pool_label: billing_url_pools rule substring- matching sessions.billing_base_url wins, else harness_credit pools["hermes"], else the route, else the raw key); session- route reading split into _session_route; _pricing takes the loaded table so label and rates share one source; load_pricing data extracted. pricing.json gains mistral-small-latest (Small 4 rates) - current Hermes sessions on it were estimated at the global default rates with the price-unavailable warning. plugin.yaml pinned to the package version (0.9.0). 128 tests pass; label verified live against state.db (mistral-api:mistral-small-latest).
(pending) - feat: installer pricing keep/refresh (0.9.1)
- Date: 2026-11-11
- Model: mistral-vibe:zai-glm-5-3
- Session Cost: $3.22 (running total at commit time)
- Turn Cost: $0.87
- Total for commit: $3.22
- Notes: the 0.9.0 fix needed a manual deletion of the installed pricing.json because install() silently keeps any table that is already beside the plugin - that keep is how the plugin lost the pool tables in the first place. The installer now prints a hint when the kept table differs from the bundled one, and --refresh-pricing (top-level flag for --integrate hermes, installer flag for standalone runs) ships the bundled table instead of keeping the installed one. Keep default unchanged (owner rate edits win). PATCH bump to 0.9.1 (precedent: --rm-integrate shipped as 0.4.6 -> 0.4.7); SPEC, SKILL, installer docstring updated; 130 tests pass.
Instructions for Contributors
- Before committing, run
agent-cost-estimatorfor your current session - Copy the output (provider:model | session:$X | turn:$Y)
- 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
- Commit hash (use
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