Quick start
Cost formula
Managing local models
Register a model
List registered models
Remove a model
Auto-detect Ollama models
If you have Ollama running locally, CostHQ can scanlocalhost:11434 and register all available models in one command:
GET /api/tags endpoint, pulls every loaded model name, and registers them all with the rate you specify.
Logging local model usage
Use the standardcs log-ai command with the new --duration flag:
The --local flag
CostHQ auto-recognizes these providers as local: ollama, llamacpp, llama.cpp, vllm, lmstudio, localai, jan, koboldcpp. If your provider isn’t in that list, use the --local flag to explicitly tell CostHQ to use compute-time costing:
JSON output
When you log a local model call with--json, the pricing object shows source: "local":
Estimating your GPU cost per hour
If you’re not sure what--cost-per-hour rate to use, here are some reference points:
Local model configurations are stored in
~/.costhq/local-models.json. This file is independent from the session database and can be version-controlled or shared across machines.