mirror of
https://github.com/wu736139669/hapi.git
synced 2026-10-07 19:06:11 +00:00
Normalize usage input at parse time, mark inclusive producers, rebuild derived usage indexes, and preserve valid primary usage when cache partitions are malformed. Fixes #1389
11 lines
386 B
TypeScript
11 lines
386 B
TypeScript
/**
|
|
* Protocol marker for token_count payloads whose input token total already
|
|
* includes cache reads/writes. Consumers must not add cache tokens again.
|
|
*/
|
|
export const INCLUSIVE_INPUT_TOKEN_USAGE_MARKER = {
|
|
usageSchema: 'hapi.usage.v1',
|
|
inputTokenSemantics: 'includes-cache'
|
|
} as const
|
|
|
|
export type InclusiveInputTokenUsageMarker = typeof INCLUSIVE_INPUT_TOKEN_USAGE_MARKER
|