9cc95dc793
- harnesses/hermes.py: Hermes adapter reading state.db (session_model_usage cumulative counters) for authoritative session totals plus the plugin's JSONL ledger for per-turn breakdowns; Hermes's disjoint CanonicalUsage buckets are folded into the tool's inclusive (Vibe-style) contract - integration/hermes/plugin: Hermes plugin (plugin.yaml + register(ctx)) wiring pre_llm_call (turn labels), post_api_request + post_auxiliary_call (per-call ledger, queue + drainer, no hook-path I/O), post_llm_call (cost line after every interactive CLI turn; silent for subagents/cron/one-shot) - integration/hermes/install.py: standalone idempotent installer (validates the home, copies the plugin + pricing.json, runs hermes plugins enable); also wired as agent-cost-estimator --integrate hermes / --rm-integrate hermes - pricing: plugin-local pricing.json first (stdlib-only reader), then the package table, then default rates - tests: 22 new (52 total) covering adapter, plugin, installer - docs: SPEC.md 1.1.0 (sections 5.2.1, 7.3), SKILL.md, wiki entity Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
4.0 KiB
4.0 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
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