@funkai/models 0.3.2 → 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -17,6 +17,12 @@ export type LanguageModel = Extract<BaseLanguageModel, { specificationVersion: "
17
17
  * Base token counts shared by raw tracking records and final output.
18
18
  *
19
19
  * All fields are resolved `number` (0 when absent).
20
+ *
21
+ * **Reasoning token semantics**: `reasoningTokens` must be **exclusive** of
22
+ * `outputTokens`. Some providers include reasoning tokens inside the output
23
+ * token count — if so, callers must deduct reasoning tokens from
24
+ * `outputTokens` before constructing this type to avoid double-counting in
25
+ * cost calculations.
20
26
  */
21
27
  export interface TokenUsage {
22
28
  /** Number of input (prompt) tokens. */
package/tsconfig.json CHANGED
@@ -5,21 +5,28 @@
5
5
  "module": "NodeNext",
6
6
  "moduleResolution": "NodeNext",
7
7
  "lib": ["ES2024"],
8
+ "types": ["node"],
9
+
8
10
  "strict": true,
9
- "esModuleInterop": true,
11
+ "noUncheckedIndexedAccess": true,
12
+ "exactOptionalPropertyTypes": true,
13
+ "noFallthroughCasesInSwitch": true,
14
+ "noPropertyAccessFromIndexSignature": true,
15
+
16
+ "verbatimModuleSyntax": true,
17
+ "resolveJsonModule": true,
10
18
  "skipLibCheck": true,
11
19
  "forceConsistentCasingInFileNames": true,
12
- "resolveJsonModule": true,
13
- "isolatedModules": true,
20
+
14
21
  "declaration": true,
15
22
  "declarationMap": true,
16
23
  "sourceMap": true,
24
+
17
25
  "outDir": "./dist",
18
26
  "rootDir": ".",
19
27
  "paths": {
20
28
  "@/*": ["./src/*"]
21
- },
22
- "types": ["node"]
29
+ }
23
30
  },
24
31
  "include": ["src"],
25
32
  "exclude": ["node_modules", "dist"]