Capture optional provider reported costs
This commit is contained in:
@@ -170,6 +170,9 @@ come from `usage.prompt_tokens_details.cache_write_tokens`; vLLM uses
|
||||
its top-level `usage.cache_write_tokens` mapping. Missing, null, malformed,
|
||||
fractional, or unrepresentable new details remain unknown without invalidating
|
||||
otherwise usable content. Existing common count decoding remains strict.
|
||||
OpenRouter's `usage.cost` is an optional USD amount; malformed or non-finite
|
||||
amounts are ignored without invalidating content. The generic and vLLM
|
||||
providers do not interpret that field.
|
||||
|
||||
Each common token field retains whether the provider reported a
|
||||
non-null integer, including zero. Omitted and `null` fields are unknown for
|
||||
|
||||
Reference in New Issue
Block a user