Skip to content

release: Anticharon v0.7.0 — effective history & model identity - #34

Merged
parisneto merged 50 commits into
mainfrom
codex/history-analytics-identity-sprint
Oct 8, 2026
Merged

parisneto merged 50 commits into
mainfrom
codex/history-analytics-identity-sprint

Conversation

@parisneto

@parisneto parisneto commented Oct 8, 2026 •

Copy link
Copy Markdown
Owner

Summary

Anticharon 0.7.0: one price per model, on one definition, for the live quote, the stored history and the alerts. Contract: docs/plans/effective-history-model-identity/EXECUTION_CONTRACT.md. Release manifest: docs/releases/v0.7.0.md.

  • Standard-tier price (AC-8): cheapest standard-tier endpoint (flex, fast, priority, ultrafast, turbo, batch are excluded), blended with the calibration.
  • History from listed prices (AC-9): time-weighted daily mean of the cheapest standard listed price, blended with the calibration. OpenRouter's effective price is no longer used.
  • Alerts: PRICE_SPIKE / PRICE_DROP compare the latest observation with the 7-day observed average; the live quote never raises one (quote_vs_observed_pct reported separately).
  • Analytics by observed days (AC-1, AC-3), Hermes sync fixes (AC-2), redirect identity visible as NOT_TRACKED (AC-4), anticharon://effective_prices.json resource (AC-5), :batch hidden from discovery (AC-6), one help contract (AC-7).
  • Update tool: install_only is the default and the only advertised type; restart_host, phoenix, reload_request are deprecated (removal planned for 0.8.0). update reinstalls from the default branch without a version comparison.
  • Version 0.7.0; the project is now described as pre-1.0 instead of Beta.

Closes #25, closes #26, closes #27, closes #28, closes #29, closes #30, closes #31, closes #32, closes #33

Visible price change

With default weights: openai/gpt-5.6-luna 0.03265 → 0.06529 and google/gemini-3.1-flash-lite 0.04081 → 0.08162 (the old quotes were the flex tier). Models without tier endpoints are unchanged.

Protocol baseline

MCP specification 2026-07-28 (https://modelcontextprotocol.io/specification/2026-07-28), checked 2026-10-02.

Verification

  • uv run pytest: 491 passed, 2 live deselected; uv run anticharon test; changed-line lint gate against 219a766.
  • Independent review PASS at 7b8a08d (docs-only commit 3494f27 follows).
  • Hermes VM runs on earlier builds (listed history and tiers c88b278, time-weighted value and MCP self-update 8d17d1b): evidence/. The final build is re-checked on the VM after the release.
  • Tests changed or removed (disclosed): test_effective_pricing_backfill.py, test_listed_basis.py and the effective-route fixture were removed with the effective-pricing route; tests/test_docs_release.py now expects (v0.7.0) instead of Beta.

Upgrade and downgrade

uv tool install --force git+https://github.com/parisneto/anticharon.git@v0.7.0
anticharon run --force

Old history is kept as legacy_effective_observations and never read. After a downgrade to 0.6.x, run anticharon run --force on 0.7.0 to re-derive the stored days.

Known limits

  • History covers the 30 days OpenRouter returns.
  • An endpoint whose tag cannot be matched never sets a price; a model with only service-tier endpoints keeps a price and reports ONLY_NON_STANDARD_TIERS.
  • -latest redirect slugs are not priced.
  • Follow-ups are listed in the contract (Deferred) and docs/BACKLOG.md.

parisneto and others added 30 commits October 2, 2026 19:44
Co-Authored-By: Codex <codex@openai.com>
…s default ownership

Analytics now read the real dated observations in effective_prices.json:
NEWLY_TRACKED counts distinct valid observed days (backfill counts
immediately, first_seen plays no role) and results expose observation
count, earliest/latest dates, coverage span, and classification reason.
min_tracking_days_for_profile keeps its name and now means observed days.

Hermes sync compares against the stored shortlist so a legacy flat list is
persisted with explicit source/order metadata. A stored manual default
preference is preserved while Hermes owns the default; only the effective
default is reported as is_default, and authoritative removal restores it.

Co-Authored-By: Codex <codex@openai.com>
…available, and show one effective default

Today's stored observation now overrides a separate current quote in all
analytics calculations (run, fallback, history); the quote is used and
labelled only when today has no observation. Comparison baselines with no
real observation are unavailable instead of substituted, and profiles or
wording that need them are not produced. An overlapping manual and Hermes
slug is tracked once and lists a single effective default.

Co-Authored-By: Codex <codex@openai.com>
Co-Authored-By: Codex <codex@openai.com>
…tion

Co-Authored-By: Codex <codex@openai.com>
…ange

Co-Authored-By: Codex <codex@openai.com>
…very surface

Analytics use the latest stored observation as the current price whenever
any exists, so run, history, CLI, MCP and prompts classify identical stored
evidence identically. check and history now take price and moving averages
from effective_prices.json with explicit price_source/price_date; history.csv
is only a cached-quote fallback. history output shows observed-day evidence,
and the budget audit prompt and llms.txt distinguish backfill from
insufficient history.

Co-Authored-By: Codex <codex@openai.com>
…vation reads

Sibling candidate prices use stored observations on every surface; a valid
observation on a baseline cutoff date counts; local moving averages use only
valid observations; DATA_STALE fires when any row is stale; run price rows
report price_date. Spec corrected for the series definition, STABLE
condition, and profile evaluation order.

Co-Authored-By: Codex <codex@openai.com>
… from discovery

anticharon://effective_prices.json returns the local observation store (or
{} when absent) read-only with no network. Normal discovery silently
excludes ids ending in :batch; exact model add and configured Hermes batch
slugs are unchanged.

Co-Authored-By: Codex <codex@openai.com>
Slugs listed only as a ~<slug> redirect alias, or with no catalog match, are
recorded in effective_prices.json, listed as NOT_TRACKED with a diagnostic in
every price table and output format, and re-resolved at most every 24 hours
unless forced. They receive no price, history, or analytics and the exact slug
is never rewritten.

Co-Authored-By: Codex <codex@openai.com>
Co-Authored-By: Codex <codex@openai.com>
…ification

Co-Authored-By: Codex <codex@openai.com>
…isplaced help

Every primary and nested command supports `<command> [sub] -h|--help` and
`help <command> [sub]`. `<command> help`, `model help [<sub>]`, and
`model add help` fail with exit 2 and a hint; unknown or over-long help
targets exit 2.

Co-Authored-By: Codex <codex@openai.com>
Co-Authored-By: Codex <codex@openai.com>
Effective History & Model Identity sprint (EH-1 through EH-7): observation-based
analytics, price provenance, Hermes default ownership, redirect identity,
effective_prices.json MCP resource, :batch discovery filter, and the help
contract. Cuts [Unreleased] into [0.7.0] - 2026-10-05.

Co-Authored-By: Codex <codex@openai.com>
Co-Authored-By: Codex <codex@openai.com>
Co-Authored-By: Codex <codex@openai.com>
…tence, and identity

check/history rows show the last run's quote beside the observation-sourced
price and spike/drop alerts state their basis. A run that only reuses same-day
rows persists alerts.json including the default. An empty catalog never
reclassifies a slug's identity (CATALOG_UNAVAILABLE) and same-day reuse never
displays a redirect slug as priced.

Co-Authored-By: Codex <codex@openai.com>
…erts

Persisted BEST_OPTION_CHANGED and fallback alerts exclude slugs whose stored
identity is redirect or unresolved, and check drops stale persisted
recommendations of such slugs. The quote-basis test now requires the alert to
exist before checking its wording.

Co-Authored-By: Codex <codex@openai.com>
…ote divergence separately

PRICE_SPIKE/PRICE_DROP use the latest observation against the 7-day observed
average in run (live, reuse, fallback), check, history, and persisted alerts.
The live quote never raises one; its gap to the observation is the separate
quote_vs_observed_pct field. Run tables label the average and change as observed.

Co-Authored-By: Codex <codex@openai.com>
…nd in history (EH-8)

Service-tier endpoints (flex, fast, priority, ultrafast, turbo, batch tag segments)
no longer set the effective price. The live quote filters on the public endpoint
tag; history maps frontend endpoint UUIDs to tags (tag prefix + input/output
price join), stores endpoint_tags, and skips tier endpoints in the daily minimum.
A model with only tier endpoints falls back and reports ONLY_NON_STANDARD_TIERS.
run --force refreshes stored observations immediately. Adds AC-8, D-9, E-11.

Co-Authored-By: Codex <codex@openai.com>
Each refresh with the live endpoints list also stores the listed-price steps per
endpoint and a daily series blended with the calibration (standard tiers only).
history --json, MCP and human history show a listed_basis comparison next to the
existing analytics; nothing else changes. Adds D-10 (promotion decision, open).

Co-Authored-By: Codex <codex@openai.com>
parisneto and others added 20 commits October 6, 2026 18:23
…tats/endpoint route

The live quote and the history tag join are built from the frontend /stats/endpoint
entries, which carry the tag as provider_slug (e.g. openai/flex), not tag. Reading
only tag meant no service tier was filtered on the VM (luna stayed 0.03265, no
endpoint_tags stored). endpoint_tag() accepts both shapes; regression tests use the
real luna fixture and live gemini slugs.

Co-Authored-By: Codex <codex@openai.com>
Co-Authored-By: Codex <codex@openai.com>
… listed basis

Co-Authored-By: Codex <codex@openai.com>
…ibration (D-10, AC-9)

History is now OpenRouter's listed endpoint prices (listed-pricing route), blended with
the user's calibration, cheapest standard-tier endpoint per UTC day: the same definition
as the live quote. run stores its quote as today's point, so check/history right after
it show the same prices. The store keeps the raw listed steps and weights_used, so a
recalibration re-derives every day without a refetch. Entries from before this basis
are kept as legacy_effective_observations, never read, and upgraded on the first run.
OpenRouter's effective-price series, fetch_effective_pricing_history and its reducer
are removed (their unit tests replaced by listed-basis tests).

Co-Authored-By: Codex <codex@openai.com>
Co-Authored-By: Codex <codex@openai.com>
…rice

After the listed-basis change the stored today's point is the run quote, so the
line was redundant in the normal case. Also records the VM verification of AC-9.

Co-Authored-By: Codex <codex@openai.com>
Unmapped endpoints never set a price; negative/non-finite listed steps are ignored;
same-day runs after a recalibration refresh instead of reusing the old row; a
catalog-headline quote is flagged QUOTE_FROM_CATALOG and kept out of history;
malformed nested series payloads degrade to no history.

Co-Authored-By: Codex <codex@openai.com>
… review

Co-Authored-By: Codex <codex@openai.com>
…standard price

A past UTC day is averaged exactly from the listed step changes, taking the cheapest
standard endpoint at each moment, instead of sampling the price at 23:59:59. Providers
that reprice every few minutes now contribute what they charged. Today stays the live
quote; time before an endpoint exists is left out of the mean.

Co-Authored-By: Codex <codex@openai.com>
Co-Authored-By: Codex <codex@openai.com>
…e network-proof

Stored history is dropped when no standard endpoint is known; the tag join ignores
invalid final steps; a same-day row no longer delays a legacy upgrade. tests/conftest
now refuses real HTTP in the default suite, and the tests that silently used the live
endpoint route are stubbed (Rule 8).

Co-Authored-By: Codex <codex@openai.com>
…ve timestamps

Entries record history_method; one written by an older daily-value formula is
re-derived on the next run even within the same day. Listed timestamps without a
timezone are read as UTC instead of raising.

Co-Authored-By: Codex <codex@openai.com>
…per host

run_update and `anticharon update` now present install_only as the one supported
type. Its RESTART_REQUIRED message names the Hermes step (/reload-mcp) and the generic
one (restart or reconnect) and notes that check_updates reports the old version until
then. restart_host, phoenix and reload_request are deprecated for removal in 0.8.0.
The test suite is isolated from a locally installed Hermes (Rule 8). Adds the VM
self-update evidence.

Co-Authored-By: Codex <codex@openai.com>
…ecated types from help and schema

Co-Authored-By: Codex <codex@openai.com>
Co-Authored-By: Codex <codex@openai.com>
@parisneto parisneto added bug Something isn't working documentation Improvements or additions to documentation enhancement New feature or request pricing-engine Anticharon price engine to ingest Openrouter.ai model prices release Sprint Ecosystem Ergonomics labels Oct 8, 2026
@parisneto parisneto self-assigned this Oct 8, 2026
@parisneto
parisneto merged commit 17ffe58 into main Oct 8, 2026
5 checks passed
@parisneto
parisneto deleted the codex/history-analytics-identity-sprint branch October 8, 2026 22:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment