fabro/lib/components/fabro-workflow/src
Bryan Helmkamp 27f16f89c4
Delete fabro's own pricing: lithos-llm prices every response once
lithos-llm attaches a cost to every response at the client: the codec
keeps a provider-reported cost when the provider supplies one, and the
resolver fills the catalog's price for the route when it does not.
Pebble records that priced usage on every assistant turn and sums it,
so each AssistantMessage on the stream, and the store fold's live stage
usage, already carries the cost. Fabro's catalog re-pricing of the same
tokens was redundant, and is gone.

model_usage_from_llm, with_reported_cost, and every estimate_cost call
in fabro are deleted. The pebble handler's stage_usage groups pebble's
accounts by route and sums them with Usage::saturating_add, keeping the
cost and source pebble carried, so the terminal stage.completed usage is
the live fold's sum; it no longer fails when the catalog does not know a
provider. A one-shot prompt stage records the response's own usage and
cost as lithos-llm returned it. The per-model price cards in fabro-llm's
API module stay.

Tests: the pebble handler sums Catalog and Provider costs per row and
leaves a row's and the total's cost unknown once an answer was unpriced;
the store fold shows the same tokens and cost live and at completion,
and None at both for an unpriced answer; the agent integration test
compares the whole completed Usage with the live fold, cost included;
a one-shot prompt stage on a mocked OpenAI-compatible provider reports a
Catalog cost that lithos-llm's resolver attached, with no fabro pricing.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-14 14:46:44 -06:00
..
event Carry usage as lithos-llm's Usage and rename billing to usage 2026-09-14 12:31:34 -06:00
graph Harden succeed failure policy routing 2026-08-26 09:13:04 -04:00
handler Delete fabro's own pricing: lithos-llm prices every response once 2026-09-14 14:46:44 -06:00
lifecycle Carry usage as lithos-llm's Usage and rename billing to usage 2026-09-14 12:31:34 -06:00
operations Carry usage as lithos-llm's Usage and rename billing to usage 2026-09-14 12:31:34 -06:00
pipeline Carry usage as lithos-llm's Usage and rename billing to usage 2026-09-14 12:31:34 -06:00
records refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
transforms Import lithos-llm types directly instead of through fabro-types 2026-09-10 10:03:08 -06:00
agent_memory.rs Let pebble discover memory and skills, and name the reuse rules 2026-09-11 19:40:36 -06:00
artifact.rs Merge origin/main into pebble-agent-loop 2026-09-12 09:40:00 -06:00
artifact_snapshot.rs Run agent stages, Ask Fabro, and fabro exec on pebble's CodingAgent 2026-09-11 14:19:15 -06:00
artifact_upload.rs refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
command_log.rs Unify blob hash vocabulary 2026-08-17 13:56:19 -04:00
condition.rs Reuse existing helpers in the for_each fan-out 2026-07-28 18:42:23 -04:00
context.rs Harden succeed failure policy routing 2026-08-26 09:13:04 -04:00
error.rs Carry usage as lithos-llm's Usage and rename billing to usage 2026-09-14 12:31:34 -06:00
event.rs Merge origin/main into pebble-agent-loop 2026-09-12 09:40:00 -06:00
file_resolver.rs refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
git.rs Carry usage as lithos-llm's Usage and rename billing to usage 2026-09-14 12:31:34 -06:00
git_bridge.rs refactor(github): deduplicate additional-repository access plumbing 2026-08-21 16:31:48 -04:00
git_identity.rs Resolve one Git identity per run and inject it everywhere 2026-09-12 11:35:46 -06:00
graph.rs Carry usage as lithos-llm's Usage and rename billing to usage 2026-09-14 12:31:34 -06:00
hook_context.rs refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
interview_runtime.rs Run agent stages, Ask Fabro, and fabro exec on pebble's CodingAgent 2026-09-11 14:19:15 -06:00
lib.rs Carry usage as lithos-llm's Usage and rename billing to usage 2026-09-14 12:31:34 -06:00
model_fallback.rs Import lithos-llm types directly instead of through fabro-types 2026-09-10 10:03:08 -06:00
node_handler.rs Retire the fabro Sandbox trait for one concrete RunSandbox 2026-09-10 00:14:42 -06:00
outcome.rs Delete fabro's own pricing: lithos-llm prices every response once 2026-09-14 14:46:44 -06:00
pull_request.rs refactor: simplify publish pipeline and collapse duplicated stage errors 2026-07-28 15:09:10 -04:00
retry.rs refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
run_control.rs refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
run_dir.rs refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
run_lookup.rs Carry usage as lithos-llm's Usage and rename billing to usage 2026-09-14 12:31:34 -06:00
run_materialization.rs Import lithos-llm types directly instead of through fabro-types 2026-09-10 10:03:08 -06:00
run_options.rs Merge remote-tracking branch 'origin/main' into remove/run-metadata-branches 2026-09-12 16:28:01 -06:00
run_status.rs refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
runtime_store.rs Retire legacy manifest run creation 2026-09-13 08:49:50 -06:00
sandbox_git.rs Merge remote-tracking branch 'origin/main' into remove/run-metadata-branches 2026-09-12 16:28:01 -06:00
sandbox_git_runtime.rs Merge origin/main into pebble-agent-loop 2026-09-12 09:40:00 -06:00
services.rs Merge remote-tracking branch 'origin/main' into remove/run-metadata-branches 2026-09-12 16:28:01 -06:00
stage_execution.rs Retire legacy manifest run creation 2026-09-13 08:49:50 -06:00
stage_scope.rs Merge origin/main into feat/stage-execution-identity-on-resume 2026-07-24 10:07:35 -04:00
steering_hub.rs Run steering over pebble's bus and keep only fabro's attribution 2026-09-11 20:35:31 -06:00
test_support.rs Carry usage as lithos-llm's Usage and rename billing to usage 2026-09-14 12:31:34 -06:00
usage_rollup.rs Carry usage as lithos-llm's Usage and rename billing to usage 2026-09-14 12:31:34 -06:00
web_search.rs Take environment helpers, compaction accounting, and search providers from pebble 2026-09-11 19:51:12 -06:00
workflow_bundle.rs Simplify local RunIntent producer support 2026-08-31 14:08:35 -04:00