agent-top-core 0.12.0

Discovery, accounting and process-tree model for agent-top (no terminal dependencies).
Documentation
# Model prices, in US dollars per million tokens.
#
# This file is compiled into agent-top, and a file at
# ~/.config/agent-top/prices.toml (or $XDG_CONFIG_HOME/agent-top/prices.toml)
# is merged over it at startup: an entry with the same prefix replaces the one
# here, and a new prefix is added. So a stale price can be corrected, and an
# unpriced model can be priced, without waiting for a release.
#
# `prefix` is matched against the start of the model id, after lowercasing and
# stripping an `anthropic.` or `us.anthropic.` vendor prefix. The longest
# matching prefix wins, so `claude-fable-5-1` beats `claude-fable-5` and a
# date-suffixed id like `claude-sonnet-4-6-20251114` resolves to its base
# model. Order in this file does not matter.
#
# Cache write prices default to Anthropic's multipliers of the input price:
# 1.25x for the 5 minute TTL and 2x for the 1 hour TTL. Set `cache_write_5m`
# or `cache_write_1h` explicitly for a vendor that prices them differently.
#
# A model with no entry is not guessed at. Its tokens are counted and reported
# as unpriced, and any total containing them is shown as a floor.

# Anthropic rows checked 2026-06-24 (cache reads re-checked 2026-09-04),
# Google rows 2026-09-05.
updated = "2026-09-05"
source = "https://www.anthropic.com/pricing and https://ai.google.dev/gemini-api/docs/pricing"

# Server-side tools billed per call, on top of the tokens they produce, in US
# dollars per 1,000 calls. Anthropic charges for web search only; web fetch and
# the code execution that runs alongside either are free (checked 2026-09-04
# at https://platform.claude.com/docs/en/about-claude/pricing). Codex web
# searches are counted but not priced by this entry, which is Anthropic's rate.
[server_tools]
web_search = 10.0

[[model]]
prefix = "claude-fable-5-1"
input = 10.0
output = 50.0
cache_read = 0.25

[[model]]
prefix = "claude-mythos-5-1"
input = 10.0
output = 50.0
cache_read = 0.25

[[model]]
prefix = "claude-fable-5"
input = 10.0
output = 50.0
cache_read = 1.0

[[model]]
prefix = "claude-mythos-5"
input = 10.0
output = 50.0
cache_read = 1.0

[[model]]
prefix = "claude-opus-5"
input = 5.0
output = 25.0
cache_read = 0.5

[[model]]
prefix = "claude-opus-4-8"
input = 5.0
output = 25.0
cache_read = 0.5

[[model]]
prefix = "claude-opus-4-7"
input = 5.0
output = 25.0
cache_read = 0.5

[[model]]
prefix = "claude-opus-4-6"
input = 5.0
output = 25.0
cache_read = 0.5

[[model]]
prefix = "claude-sonnet-5"
input = 2.0
output = 10.0
cache_read = 0.2

[[model]]
prefix = "claude-sonnet-4-6"
input = 3.0
output = 15.0
cache_read = 0.3

[[model]]
prefix = "claude-haiku-4-5"
input = 1.0
output = 5.0
cache_read = 0.1

# Google, paid tier, text input, checked 2026-09-05 at
# https://ai.google.dev/gemini-api/docs/pricing. Gemini bills thinking
# tokens as output, and the Gemini CLI adapter folds them in there. Pro
# models cost more on prompts over 200k tokens; these are the rates under
# that, which is where a coding session lives; a longer prompt is under-
# priced here rather than guessed at. Cache writes are set to the input
# price: Gemini CLI uses implicit caching, which has no write charge and
# reports no write tokens, so the figure never applies. Grounded web
# searches are counted but not priced; Google's rate is per request with a
# free monthly quota and differs by model. The 3.6, 3.7 and 3.8 flash
# prices are promotional through 2026-12-31 and double after.

[[model]]
prefix = "gemini-2.5-pro"
input = 1.25
output = 10.0
cache_read = 0.125
cache_write_5m = 1.25
cache_write_1h = 1.25

[[model]]
prefix = "gemini-2.5-flash"
input = 0.30
output = 2.50
cache_read = 0.03
cache_write_5m = 0.30
cache_write_1h = 0.30

[[model]]
prefix = "gemini-2.5-flash-lite"
input = 0.10
output = 0.40
cache_read = 0.01
cache_write_5m = 0.10
cache_write_1h = 0.10

[[model]]
prefix = "gemini-3-flash"
input = 0.50
output = 3.0
cache_read = 0.05
cache_write_5m = 0.50
cache_write_1h = 0.50

[[model]]
prefix = "gemini-3.1-pro"
input = 2.0
output = 12.0
cache_read = 0.20
cache_write_5m = 2.0
cache_write_1h = 2.0

[[model]]
prefix = "gemini-3.1-flash-lite"
input = 0.25
output = 1.50
cache_read = 0.025
cache_write_5m = 0.25
cache_write_1h = 0.25

[[model]]
prefix = "gemini-3.5-flash"
input = 1.50
output = 9.0
cache_read = 0.15
cache_write_5m = 1.50
cache_write_1h = 1.50

[[model]]
prefix = "gemini-3.5-flash-lite"
input = 0.30
output = 2.50
cache_read = 0.03
cache_write_5m = 0.30
cache_write_1h = 0.30

[[model]]
prefix = "gemini-3.6-flash"
input = 0.75
output = 3.75
cache_read = 0.075
cache_write_5m = 0.75
cache_write_1h = 0.75

[[model]]
prefix = "gemini-3.7-flash"
input = 0.75
output = 3.75
cache_read = 0.075
cache_write_5m = 0.75
cache_write_1h = 0.75

[[model]]
prefix = "gemini-3.8-flash"
input = 0.75
output = 3.75
cache_read = 0.075
cache_write_5m = 0.75
cache_write_1h = 0.75

# OpenAI, standard tier, checked 2026-09-05 at
# https://developers.openai.com/api/docs/pricing. Codex reports
# `cached_input_tokens` separately, which the adapter maps to cache reads;
# `cache_read` here is OpenAI's cached-input rate. OpenAI's prompt caching has
# no write charge and Codex reports no write tokens, so the cache-write rates
# are set to the input price and never apply. The `pro` models offer no cached
# input, so their `cache_read` is the input price (they report no cached
# tokens). `gpt-5.5` and `gpt-5.4` also have a higher rate over 272k tokens of
# context that is not carried here; the under-272k rate is used, so a longer
# prompt is under-priced rather than guessed at. A Codex variant with no entry
# of its own (`gpt-5-codex`) resolves to its base model by the longest-prefix
# rule.

[[model]]
prefix = "gpt-5.6-sol"
input = 4.0
output = 20.0
cache_read = 0.40
cache_write_5m = 4.0
cache_write_1h = 4.0

[[model]]
prefix = "gpt-5.6-terra"
input = 2.0
output = 12.0
cache_read = 0.20
cache_write_5m = 2.0
cache_write_1h = 2.0

[[model]]
prefix = "gpt-5.6-luna"
input = 0.20
output = 1.20
cache_read = 0.02
cache_write_5m = 0.20
cache_write_1h = 0.20

[[model]]
prefix = "gpt-5.5-pro"
input = 30.0
output = 180.0
cache_read = 30.0
cache_write_5m = 30.0
cache_write_1h = 30.0

[[model]]
prefix = "gpt-5.5"
input = 5.0
output = 30.0
cache_read = 0.50
cache_write_5m = 5.0
cache_write_1h = 5.0

[[model]]
prefix = "gpt-5.4-mini"
input = 0.75
output = 4.50
cache_read = 0.075
cache_write_5m = 0.75
cache_write_1h = 0.75

[[model]]
prefix = "gpt-5.4-nano"
input = 0.20
output = 1.25
cache_read = 0.02
cache_write_5m = 0.20
cache_write_1h = 0.20

[[model]]
prefix = "gpt-5.4-pro"
input = 30.0
output = 180.0
cache_read = 30.0
cache_write_5m = 30.0
cache_write_1h = 30.0

[[model]]
prefix = "gpt-5.4"
input = 2.50
output = 15.0
cache_read = 0.25
cache_write_5m = 2.50
cache_write_1h = 2.50

[[model]]
prefix = "gpt-5.2-pro"
input = 21.0
output = 168.0
cache_read = 21.0
cache_write_5m = 21.0
cache_write_1h = 21.0

[[model]]
prefix = "gpt-5.2"
input = 1.75
output = 14.0
cache_read = 0.175
cache_write_5m = 1.75
cache_write_1h = 1.75

[[model]]
prefix = "gpt-5.1"
input = 1.25
output = 10.0
cache_read = 0.125
cache_write_5m = 1.25
cache_write_1h = 1.25

[[model]]
prefix = "gpt-5-mini"
input = 0.25
output = 2.0
cache_read = 0.025
cache_write_5m = 0.25
cache_write_1h = 0.25

[[model]]
prefix = "gpt-5-nano"
input = 0.05
output = 0.40
cache_read = 0.005
cache_write_5m = 0.05
cache_write_1h = 0.05

[[model]]
prefix = "gpt-5-pro"
input = 15.0
output = 120.0
cache_read = 15.0
cache_write_5m = 15.0
cache_write_1h = 15.0

[[model]]
prefix = "gpt-5"
input = 1.25
output = 10.0
cache_read = 0.125
cache_write_5m = 1.25
cache_write_1h = 1.25