v0.7.0 - Config-declared usage metering
Meter and price non-token-billed model calls (TTS characters, transcription seconds, per-request APIs) with zero client-code changes.
- New
capstead.capabilities[].usageblock:model,unit(tokens|characters|seconds|requests),input-from-arg CapabilityUsageRule(runtime): the interceptor synthesizes oneModelInvocationfrom the declared argument when the call records nothing itself; real enrichment always wins- Priced through the existing
capstead.costestimator like any token-billed model - Fix:
capstead.cost.modelsnow accepts input-only (or output-only) rates — required for usage-metered models
Example:
capstead:
capabilities:
- name: "Synthesize Speech"
bean: elevenLabsSpeechSynthesizer
method: synthesizeMp3
usage:
model: elevenlabs/eleven_multilingual_v2
unit: characters
input-from-arg: 0
cost:
models:
"[elevenlabs/eleven_multilingual_v2]":
input-per-million-tokens: 220