Commit Graph
6 Commits
Author SHA1 Message Date
Jon Saad-Falcon 3777086d3a fix: count full prompt tokens without KV-cache assumption
Ollama's prompt_eval_count may exclude KV-cached tokens (system
prompt, prior conversation turns), under-counting the prompt size
used for cost/FLOPs/energy calculations and leaderboard submissions.

Engine changes:
- Add estimate_prompt_tokens() helper in engine/_base.py that
  computes cache-agnostic token count from message content
- Ollama + OpenAI-compat engines now use max(reported, estimated)
  to ensure system prompt and full context are always counted

Savings/leaderboard changes:
- Add TOKEN_COUNTING_VERSION=2 to savings.py so frontends can
  tag Supabase submissions (old=v1, corrected=v2)
- Desktop + web frontends forward version in leaderboard submissions
- Add POST /v1/telemetry/reset endpoint to clear stale telemetry

Active users auto-correct via upsert on next session; no manual
Supabase migration required.
2026-03-24 16:55:26 -07:00
Gabriel Bo 93344a787f adding asterisk to focus on local models 2026-03-14 14:32:29 -07:00
Gabriel Bo f077adc11f feat: add required email field to leaderboard opt-in 2026-03-13 15:17:13 -07:00
Gabriel Bo 90ea7c90b0 Revert "adding email requirement for opt in"
This reverts commit 898099e771.
2026-03-13 15:11:34 -07:00
Gabriel Bo 898099e771 adding email requirement for opt in 2026-03-13 14:23:41 -07:00
Jon Saad-Falconandkrypticmouse 8798e2ee4f init commit 2026-03-12 17:29:39 +00:00