Optional cacheDuration of the request in milliseconds.
Optional metadata?: MetricsMetadataMetadata for model provider and name tracking.
Optional reasoningThe number of completion tokens spent on hidden reasoning.
Already counted in completionTokens; do not add it to totals. Not all providers break
reasoning out separately, and it is 0 when they don't.
Optional speechTime to first token in milliseconds.
Tokens used to write to the prompt cache. Not all providers report this.