@sriinnu/fiche 0.0.0-stage → 0.19.0

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.
Files changed (196) hide show
  1. package/CHANGELOG.md +134 -0
  2. package/LICENSE +22 -0
  3. package/NOTICE +13 -0
  4. package/PRIVACY.md +41 -0
  5. package/README.md +288 -2
  6. package/SECURITY.md +53 -0
  7. package/assets/JETBRAINS_MONO_LICENSE.txt +89 -0
  8. package/assets/SPLEEN_LICENSE.txt +24 -0
  9. package/assets/UNIFONT_LICENSE.txt +476 -0
  10. package/assets/fiche-logo-dark.svg +61 -0
  11. package/assets/fiche-logo-light.svg +61 -0
  12. package/assets/fiche-logo.svg +71 -0
  13. package/assets/fiche-mark.svg +48 -0
  14. package/bin/cli.js +7 -0
  15. package/bin/mcp.js +8 -0
  16. package/dist/calibrate.d.ts +30 -0
  17. package/dist/calibrate.js +588 -0
  18. package/dist/core/anthropic-vision.d.ts +28 -0
  19. package/dist/core/anthropic-vision.js +34 -0
  20. package/dist/core/applicability.d.ts +63 -0
  21. package/dist/core/applicability.js +151 -0
  22. package/dist/core/atlas-gray-jbmono10.d.ts +26 -0
  23. package/dist/core/atlas-gray-jbmono10.js +64 -0
  24. package/dist/core/atlas-gray-jbmono12.d.ts +26 -0
  25. package/dist/core/atlas-gray-jbmono12.js +64 -0
  26. package/dist/core/atlas-gray-jbmono14.d.ts +26 -0
  27. package/dist/core/atlas-gray-jbmono14.js +64 -0
  28. package/dist/core/atlas-gray.d.ts +26 -0
  29. package/dist/core/atlas-gray.js +64 -0
  30. package/dist/core/atlas-jbmono10.d.ts +34 -0
  31. package/dist/core/atlas-jbmono10.js +71 -0
  32. package/dist/core/atlas-jbmono12.d.ts +34 -0
  33. package/dist/core/atlas-jbmono12.js +71 -0
  34. package/dist/core/atlas-jbmono14.d.ts +34 -0
  35. package/dist/core/atlas-jbmono14.js +71 -0
  36. package/dist/core/atlas.d.ts +34 -0
  37. package/dist/core/atlas.js +71 -0
  38. package/dist/core/baseline.d.ts +121 -0
  39. package/dist/core/baseline.js +200 -0
  40. package/dist/core/calibration.d.ts +86 -0
  41. package/dist/core/calibration.js +547 -0
  42. package/dist/core/casi-delta.d.ts +63 -0
  43. package/dist/core/casi-delta.js +1271 -0
  44. package/dist/core/claude-model-profiles.d.ts +53 -0
  45. package/dist/core/claude-model-profiles.js +160 -0
  46. package/dist/core/client-tool-round.d.ts +31 -0
  47. package/dist/core/client-tool-round.js +58 -0
  48. package/dist/core/codex-cache.d.ts +20 -0
  49. package/dist/core/codex-cache.js +59 -0
  50. package/dist/core/context-mmu.d.ts +350 -0
  51. package/dist/core/context-mmu.js +3028 -0
  52. package/dist/core/cpt-fit.d.ts +70 -0
  53. package/dist/core/cpt-fit.js +197 -0
  54. package/dist/core/env.d.ts +8 -0
  55. package/dist/core/env.js +15 -0
  56. package/dist/core/export.d.ts +127 -0
  57. package/dist/core/export.js +385 -0
  58. package/dist/core/factsheet.d.ts +77 -0
  59. package/dist/core/factsheet.js +494 -0
  60. package/dist/core/gemini-model-profiles.d.ts +20 -0
  61. package/dist/core/gemini-model-profiles.js +134 -0
  62. package/dist/core/google.d.ts +76 -0
  63. package/dist/core/google.js +1380 -0
  64. package/dist/core/gpt-model-profiles.d.ts +218 -0
  65. package/dist/core/gpt-model-profiles.js +570 -0
  66. package/dist/core/gpt-tokens.d.ts +14 -0
  67. package/dist/core/gpt-tokens.js +165 -0
  68. package/dist/core/history.d.ts +197 -0
  69. package/dist/core/history.js +1003 -0
  70. package/dist/core/index.d.ts +16 -0
  71. package/dist/core/index.js +16 -0
  72. package/dist/core/library.d.ts +80 -0
  73. package/dist/core/library.js +131 -0
  74. package/dist/core/measurement.d.ts +34 -0
  75. package/dist/core/measurement.js +280 -0
  76. package/dist/core/messages-chat-bridge.d.ts +23 -0
  77. package/dist/core/messages-chat-bridge.js +747 -0
  78. package/dist/core/messages-responses-bridge.d.ts +11 -0
  79. package/dist/core/messages-responses-bridge.js +893 -0
  80. package/dist/core/openai-history.d.ts +184 -0
  81. package/dist/core/openai-history.js +1279 -0
  82. package/dist/core/openai-savings.d.ts +57 -0
  83. package/dist/core/openai-savings.js +116 -0
  84. package/dist/core/openai.d.ts +68 -0
  85. package/dist/core/openai.js +2523 -0
  86. package/dist/core/pin.d.ts +199 -0
  87. package/dist/core/pin.js +1353 -0
  88. package/dist/core/png.d.ts +14 -0
  89. package/dist/core/png.js +188 -0
  90. package/dist/core/prefix-tape.d.ts +102 -0
  91. package/dist/core/prefix-tape.js +315 -0
  92. package/dist/core/price-id.d.ts +10 -0
  93. package/dist/core/price-id.js +26 -0
  94. package/dist/core/prices.generated.d.ts +36 -0
  95. package/dist/core/prices.generated.js +369 -0
  96. package/dist/core/pricing.d.ts +134 -0
  97. package/dist/core/pricing.js +335 -0
  98. package/dist/core/profile-base.d.ts +30 -0
  99. package/dist/core/profile-base.js +67 -0
  100. package/dist/core/provider-router.d.ts +51 -0
  101. package/dist/core/provider-router.js +121 -0
  102. package/dist/core/proxy.d.ts +252 -0
  103. package/dist/core/proxy.js +2929 -0
  104. package/dist/core/reader-tier.d.ts +24 -0
  105. package/dist/core/reader-tier.js +118 -0
  106. package/dist/core/render.d.ts +280 -0
  107. package/dist/core/render.js +1302 -0
  108. package/dist/core/request-guard.d.ts +31 -0
  109. package/dist/core/request-guard.js +126 -0
  110. package/dist/core/request-transform.d.ts +43 -0
  111. package/dist/core/request-transform.js +173 -0
  112. package/dist/core/schema-compiler.d.ts +64 -0
  113. package/dist/core/schema-compiler.js +1696 -0
  114. package/dist/core/schema-strip.d.ts +29 -0
  115. package/dist/core/schema-strip.js +173 -0
  116. package/dist/core/session-state.d.ts +219 -0
  117. package/dist/core/session-state.js +929 -0
  118. package/dist/core/stage-plugins.d.ts +45 -0
  119. package/dist/core/stage-plugins.js +205 -0
  120. package/dist/core/text-history.d.ts +74 -0
  121. package/dist/core/text-history.js +612 -0
  122. package/dist/core/text-hygiene.d.ts +160 -0
  123. package/dist/core/text-hygiene.js +2259 -0
  124. package/dist/core/toon.d.ts +29 -0
  125. package/dist/core/toon.js +425 -0
  126. package/dist/core/tracker.d.ts +223 -0
  127. package/dist/core/tracker.js +290 -0
  128. package/dist/core/transform.d.ts +589 -0
  129. package/dist/core/transform.js +3153 -0
  130. package/dist/core/types.d.ts +87 -0
  131. package/dist/core/types.js +8 -0
  132. package/dist/core/upstream-hosts.d.ts +127 -0
  133. package/dist/core/upstream-hosts.js +398 -0
  134. package/dist/core/vision-cost.d.ts +63 -0
  135. package/dist/core/vision-cost.js +137 -0
  136. package/dist/dashboard/fragments.d.ts +87 -0
  137. package/dist/dashboard/fragments.js +1515 -0
  138. package/dist/dashboard/types.d.ts +217 -0
  139. package/dist/dashboard/types.js +3 -0
  140. package/dist/dashboard/vendor.d.ts +3 -0
  141. package/dist/dashboard/vendor.js +6 -0
  142. package/dist/dashboard.d.ts +372 -0
  143. package/dist/dashboard.js +2731 -0
  144. package/dist/export-collect.d.ts +36 -0
  145. package/dist/export-collect.js +59 -0
  146. package/dist/file-tracker.d.ts +42 -0
  147. package/dist/file-tracker.js +234 -0
  148. package/dist/kosha-sync.d.ts +74 -0
  149. package/dist/kosha-sync.js +272 -0
  150. package/dist/launchd-socket.d.ts +22 -0
  151. package/dist/launchd-socket.js +210 -0
  152. package/dist/mcp/cli.d.ts +2 -0
  153. package/dist/mcp/cli.js +55 -0
  154. package/dist/mcp/server.d.ts +48 -0
  155. package/dist/mcp/server.js +987 -0
  156. package/dist/mmu-store.d.ts +31 -0
  157. package/dist/mmu-store.js +179 -0
  158. package/dist/node-fetch.d.ts +22 -0
  159. package/dist/node-fetch.js +489 -0
  160. package/dist/node.d.ts +9 -0
  161. package/dist/node.js +244396 -0
  162. package/dist/request-decoding.d.ts +30 -0
  163. package/dist/request-decoding.js +85 -0
  164. package/dist/sessions.d.ts +179 -0
  165. package/dist/sessions.js +837 -0
  166. package/dist/stats.d.ts +114 -0
  167. package/dist/stats.js +439 -0
  168. package/dist/turn-report.d.ts +65 -0
  169. package/dist/turn-report.js +724 -0
  170. package/dist/warp/app-launch.d.ts +26 -0
  171. package/dist/warp/app-launch.js +155 -0
  172. package/dist/warp/ca.d.ts +74 -0
  173. package/dist/warp/ca.js +416 -0
  174. package/dist/warp/connect.d.ts +42 -0
  175. package/dist/warp/connect.js +686 -0
  176. package/dist/warp/der.d.ts +57 -0
  177. package/dist/warp/der.js +151 -0
  178. package/dist/warp/index.d.ts +79 -0
  179. package/dist/warp/index.js +650 -0
  180. package/dist/warp/resolve.d.ts +12 -0
  181. package/dist/warp/resolve.js +49 -0
  182. package/dist/warp/route.d.ts +71 -0
  183. package/dist/warp/route.js +134 -0
  184. package/dist/worker.d.ts +71 -0
  185. package/dist/worker.js +174 -0
  186. package/docs/SECURITY_MODEL.md +84 -0
  187. package/package.json +122 -4
  188. package/plugins/fiche-companion/README.md +42 -0
  189. package/plugins/fiche-companion/assets/logo.svg +48 -0
  190. package/plugins/fiche-companion/hooks.json +11 -0
  191. package/plugins/fiche-companion/mcp_config.json +8 -0
  192. package/plugins/fiche-companion/plugin.json +18 -0
  193. package/plugins/fiche-companion/scripts/claude-statusline.mjs +35 -0
  194. package/plugins/fiche-companion/scripts/post-invocation.mjs +122 -0
  195. package/plugins/fiche-companion/scripts/resolve-turn-report.mjs +132 -0
  196. package/plugins/fiche-companion/skills/fiche/SKILL.md +61 -0
@@ -0,0 +1,369 @@
1
+ // GENERATED by scripts/gen-prices.ts from a kosha registry snapshot. Do not edit.
2
+ // Regenerate with `pnpm prices:gen`; `pnpm prices:check` fails on drift.
3
+ // USD per 1M tokens. in/out/cr/cw = input/output/cache read/cache write (short TTL);
4
+ // cw1h = 1-hour write; cwt = [ttlSeconds, perMillion] write tiers; cwb = as-input when
5
+ // a write bills as plain input; bands = long-context tiers (above `at` prompt tokens, from
6
+ // `at` when incl, the whole request bills at the band); chg = dated changes (at = epoch ms).
7
+ export const PRICE_SNAPSHOT = "kosha schema 1 discovered 2026-11-17T21:37:37.905Z";
8
+ export const PRICES = {
9
+ "chat-latest": { "p": "openai", "in": 5, "out": 30, "cr": 0.5 },
10
+ "chatgpt-image-latest": { "p": "openai", "in": 5, "out": 10, "cr": 1.25 },
11
+ "claude-fable-5": { "p": "anthropic", "in": 10, "out": 50, "cr": 1, "cw": 12.5, "cw1h": 20, "cwt": [[300, 12.5], [3600, 20]] },
12
+ "claude-fable-5-1": { "p": "anthropic", "in": 10, "out": 50, "cr": 0.25, "cw": 12.5, "cw1h": 20, "cwt": [[300, 12.5], [3600, 20]] },
13
+ "claude-fable-5-2": { "p": "anthropic", "in": 8, "out": 40, "cr": 0.2, "cw": 10, "cw1h": 16, "cwt": [[300, 10], [3600, 16]] },
14
+ "claude-haiku-4-5": { "p": "anthropic", "in": 1, "out": 5, "cr": 0.1, "cw": 1.25, "cw1h": 2, "cwt": [[300, 1.25], [3600, 2]] },
15
+ "claude-haiku-5-5": { "p": "anthropic", "in": 0.1, "out": 0.5, "cr": 0.01, "cw": 0.125, "cw1h": 0.2, "lcIn": 0.5, "lcOut": 2.5, "lcAt": 100000, "cwt": [[300, 0.125], [3600, 0.2]], "bands": [{ "at": 100000, "in": 0.5, "out": 2.5, "cr": 0.05, "cwt": [[300, 0.625], [3600, 1]] }] },
16
+ "claude-mythos-5": { "p": "anthropic", "in": 10, "out": 50, "cr": 1, "cw": 12.5, "cw1h": 20, "cwt": [[300, 12.5], [3600, 20]] },
17
+ "claude-mythos-5-1": { "p": "anthropic", "in": 10, "out": 50, "cr": 0.25, "cw": 12.5, "cw1h": 20, "cwt": [[300, 12.5], [3600, 20]] },
18
+ "claude-mythos-5-2": { "p": "anthropic", "in": 8, "out": 40, "cr": 0.2, "cw": 10, "cw1h": 16, "cwt": [[300, 10], [3600, 16]] },
19
+ "claude-mythos-preview": { "p": "anthropic", "in": 10, "out": 50, "cr": 1, "cw": 12.5 },
20
+ "claude-opus-4-5": { "p": "anthropic", "in": 5, "out": 25, "cr": 0.5, "cw": 6.25, "cw1h": 10, "cwt": [[300, 6.25], [3600, 10]] },
21
+ "claude-opus-4-6": { "p": "anthropic", "in": 5, "out": 25, "cr": 0.5, "cw": 6.25, "cw1h": 10, "cwt": [[300, 6.25], [3600, 10]] },
22
+ "claude-opus-4-7": { "p": "anthropic", "in": 5, "out": 25, "cr": 0.5, "cw": 6.25, "cw1h": 10, "cwt": [[300, 6.25], [3600, 10]] },
23
+ "claude-opus-4-8": { "p": "anthropic", "in": 5, "out": 25, "cr": 0.5, "cw": 6.25, "cw1h": 10, "cwt": [[300, 6.25], [3600, 10]] },
24
+ "claude-opus-5": { "p": "anthropic", "in": 5, "out": 25, "cr": 0.5, "cw": 6.25, "cw1h": 10, "cwt": [[300, 6.25], [3600, 10]] },
25
+ "claude-opus-5-5": { "p": "anthropic", "in": 4, "out": 20, "cr": 0.2, "cw": 5, "cw1h": 8, "cwt": [[300, 5], [3600, 8]] },
26
+ "claude-sonnet-4-5": { "p": "anthropic", "in": 3, "out": 15, "cr": 0.3, "cw": 3.75, "cw1h": 6, "cwt": [[300, 3.75], [3600, 6]] },
27
+ "claude-sonnet-4-6": { "p": "anthropic", "in": 3, "out": 15, "cr": 0.3, "cw": 3.75, "cw1h": 6, "cwt": [[300, 3.75], [3600, 6]] },
28
+ "claude-sonnet-5": { "p": "anthropic", "in": 2, "out": 10, "cr": 0.2, "cw": 2.5, "cw1h": 4, "cwt": [[300, 2.5], [3600, 4]] },
29
+ "claude-sonnet-5-5": { "p": "anthropic", "in": 2, "out": 10, "cr": 0.1, "cw": 2.5, "cw1h": 4, "cwt": [[300, 2.5], [3600, 4]] },
30
+ "computer-use-preview": { "p": "openai", "in": 3, "out": 12 },
31
+ "daybreak-blue-latest": { "p": "openai", "in": 4, "out": 20, "cr": 0.4, "cw": 5 },
32
+ "daybreak-red-latest": { "p": "openai", "in": 12.5, "out": 75, "cr": 1.25, "cw": 15.625 },
33
+ "deep-research-max-preview-04-2026": { "p": "google", "in": 2, "out": 12, "cr": 0.2 },
34
+ "deep-research-preview-04-2026": { "p": "google", "in": 2, "out": 12, "cr": 0.2 },
35
+ "deep-research-pro-preview-12-2025": { "p": "google", "in": 2, "out": 12, "cr": 0.2 },
36
+ "deepseek-flash": { "p": "deepseek", "in": 0.3, "out": 1.2, "cr": 0.006, "cw": 0.3, "cwb": "as-input" },
37
+ "deepseek-v4-pro": { "p": "deepseek", "in": 1.32, "out": 3.96, "cr": 0.044, "cw": 1.32, "cwb": "as-input" },
38
+ "ft": { "p": "openai", "in": 3, "out": 6 },
39
+ "gemini-2.5-computer-use-preview-10-2025": { "p": "google", "in": 1.25, "out": 10 },
40
+ "gemini-2.5-flash": { "p": "google", "in": 0.3, "out": 2.5, "cr": 0.03 },
41
+ "gemini-2.5-flash-image": { "p": "google", "in": 0.3, "out": 30, "cr": 0.075 },
42
+ "gemini-2.5-flash-lite": { "p": "google", "in": 0.1, "out": 0.4, "cr": 0.01 },
43
+ "gemini-2.5-flash-lite-preview-09-2025": { "p": "google", "in": 0.1, "out": 0.4, "cr": 0.01 },
44
+ "gemini-2.5-flash-native-audio-latest": { "p": "google", "in": 0.5, "out": 2 },
45
+ "gemini-2.5-flash-native-audio-preview-09-2025": { "p": "google", "in": 0.5, "out": 2 },
46
+ "gemini-2.5-flash-native-audio-preview-12-2025": { "p": "google", "in": 0.5, "out": 2 },
47
+ "gemini-2.5-flash-preview-09-2025": { "p": "google", "in": 0.3, "out": 2.5, "cr": 0.03 },
48
+ "gemini-2.5-flash-preview-tts": { "p": "google", "in": 0.5, "out": 10 },
49
+ "gemini-2.5-pro": { "p": "google", "in": 1.25, "out": 10, "cr": 0.125 },
50
+ "gemini-2.5-pro-preview-tts": { "p": "google", "in": 1, "out": 20, "cr": 0.125 },
51
+ "gemini-3-flash-preview": { "p": "google", "in": 0.5, "out": 3, "cr": 0.05 },
52
+ "gemini-3-pro-image": { "p": "google", "in": 2, "out": 120, "cr": 0.2 },
53
+ "gemini-3-pro-image-preview": { "p": "google", "in": 2, "out": 12, "cr": 0.2 },
54
+ "gemini-3.1-flash-image": { "p": "google", "in": 0.5, "out": 60, "cr": 0.05 },
55
+ "gemini-3.1-flash-image-preview": { "p": "google", "in": 0.5, "out": 3, "cr": 0.05 },
56
+ "gemini-3.1-flash-lite": { "p": "google", "in": 0.25, "out": 1.5, "cr": 0.025, "cw": 0.25, "cwb": "as-input" },
57
+ "gemini-3.1-flash-lite-image": { "p": "google", "in": 0.25, "out": 30, "cr": 0.025 },
58
+ "gemini-3.1-flash-lite-preview": { "p": "google", "in": 0.25, "out": 1.5, "cr": 0.025, "cw": 0.25, "cwb": "as-input" },
59
+ "gemini-3.1-flash-live-preview": { "p": "google", "in": 0.75, "out": 4.5 },
60
+ "gemini-3.1-flash-tts-preview": { "p": "google", "in": 1, "out": 20 },
61
+ "gemini-3.1-pro-preview": { "p": "google", "in": 2, "out": 12, "cr": 0.2, "cw": 2, "lcIn": 4, "lcOut": 18, "lcAt": 200000, "cwb": "as-input", "bands": [{ "at": 200000, "in": 4, "out": 18, "cr": 0.4 }] },
62
+ "gemini-3.1-pro-preview-customtools": { "p": "google", "in": 2, "out": 12, "cr": 0.2, "cw": 2, "lcIn": 4, "lcOut": 18, "lcAt": 200000, "cwb": "as-input", "bands": [{ "at": 200000, "in": 4, "out": 18, "cr": 0.4 }] },
63
+ "gemini-3.5-flash": { "p": "google", "in": 1.5, "out": 9, "cr": 0.15 },
64
+ "gemini-3.5-flash-lite": { "p": "google", "in": 0.3, "out": 2.5, "cr": 0.03, "cw": 0.3, "cwb": "as-input" },
65
+ "gemini-3.5-live-translate-preview": { "p": "google", "in": 3.5, "out": 21 },
66
+ "gemini-3.5-transcribe": { "p": "google", "in": 2, "out": 12 },
67
+ "gemini-3.5-transcribe-live": { "p": "google", "in": 3.5, "out": 21 },
68
+ "gemini-3.6-flash": { "p": "google", "in": 0.75, "out": 3.75, "cr": 0.075, "cw": 0.75, "cwb": "as-input", "chg": [{ "at": 1798790400000, "in": 1.5, "out": 7.5, "cr": 0.15, "cw": 1.5 }] },
69
+ "gemini-3.7-flash": { "p": "google", "in": 0.75, "out": 3.75, "cr": 0.075 },
70
+ "gemini-3.8-flash": { "p": "google", "in": 0.75, "out": 3.75, "cr": 0.075, "cw": 0.75, "cwb": "as-input", "chg": [{ "at": 1798790400000, "in": 1.5, "out": 7.5, "cr": 0.15, "cw": 1.5 }] },
71
+ "gemini-3.8-flash-cyber": { "p": "google", "in": 1.5, "out": 7.5, "cr": 0.15 },
72
+ "gemini-3.8-flash-lite-tts": { "p": "google", "in": 0.5, "out": 6 },
73
+ "gemini-3.8-flash-tts": { "p": "google", "in": 0.5, "out": 9 },
74
+ "gemini-3.8-live": { "p": "google", "in": 0.75, "out": 4.5 },
75
+ "gemini-3.8-live-extended-thinking": { "p": "google", "in": 0.75, "out": 4.5 },
76
+ "gemini-4-argon": { "p": "google", "in": 2, "out": 10, "cr": 0.1, "cw": 2, "cwb": "as-input", "chg": [{ "at": 1796112000000, "in": 4, "out": 20, "cr": 0.2, "cw": 4 }] },
77
+ "gemini-4-carbon": { "p": "google", "in": 2, "out": 10, "cr": 0.1, "cw": 2, "cwb": "as-input", "chg": [{ "at": 1796112000000, "in": 4, "out": 20, "cr": 0.2, "cw": 4 }] },
78
+ "gemini-4-hydrogen": { "p": "google", "in": 1.5, "out": 7.5, "cr": 0.075, "cw": 1.5, "cwb": "as-input" },
79
+ "gemini-decision-1": { "p": "google", "in": 0.1, "out": 0 },
80
+ "gemini-embedding-001": { "p": "google", "in": 0.15, "out": 0 },
81
+ "gemini-embedding-2": { "p": "google", "in": 0.2, "out": 0 },
82
+ "gemini-embedding-2-preview": { "p": "google", "in": 0.2, "out": 0 },
83
+ "gemini-flash-latest": { "p": "google", "in": 0.75, "out": 3.75, "cr": 0.075 },
84
+ "gemini-flash-lite-latest": { "p": "google", "in": 0.3, "out": 2.5, "cr": 0.03 },
85
+ "gemini-gemma-2-27b-it": { "p": "google", "in": 0.35, "out": 1.05 },
86
+ "gemini-gemma-2-9b-it": { "p": "google", "in": 0.35, "out": 1.05 },
87
+ "gemini-live-2.5-flash-native-audio": { "p": "google", "in": 0.5, "out": 2 },
88
+ "gemini-live-2.5-flash-preview-native-audio-09-2025": { "p": "google", "in": 0.5, "out": 2 },
89
+ "gemini-nano-banana-2.1": { "p": "google", "in": 1.5, "out": 7.5, "cr": 0.15 },
90
+ "gemini-omni-1.1-flash": { "p": "google", "in": 1.5, "out": 9 },
91
+ "gemini-omni-1.2-flash": { "p": "google", "in": 1.5, "out": 9 },
92
+ "gemini-omni-flash-preview": { "p": "google", "in": 1.5, "out": 17.5 },
93
+ "gemini-pro-latest": { "p": "google", "in": 2, "out": 12, "cr": 0.2 },
94
+ "gemini-robotics-er-1.5-preview": { "p": "google", "in": 0.3, "out": 2.5, "cr": 0 },
95
+ "gemini-robotics-er-2-preview": { "p": "google", "in": 1, "out": 5, "cr": 0.1 },
96
+ "gemini-robotics-er-2-streaming-preview": { "p": "google", "in": 1, "out": 5 },
97
+ "glm-4.5": { "p": "zai", "in": 0.6, "out": 2.2, "cr": 0.11, "cw": 0.6, "cwb": "as-input" },
98
+ "glm-4.5-air": { "p": "zai", "in": 0.2, "out": 1.1, "cr": 0.03, "cw": 0.2, "cwb": "as-input" },
99
+ "glm-4.5v": { "p": "glm", "in": 0.29879, "out": 0.89637, "cr": 0.05976 },
100
+ "glm-4.6": { "p": "zai", "in": 0.6, "out": 2.2, "cr": 0.11, "cw": 0.6, "cwb": "as-input" },
101
+ "glm-4.6v": { "p": "glm", "in": 0.1494, "out": 0.44819, "cr": 0.02988 },
102
+ "glm-4.7": { "p": "zai", "in": 0.6, "out": 2.2, "cr": 0.11, "cw": 0.6, "cwb": "as-input" },
103
+ "glm-4.7-flashx": { "p": "glm", "in": 0.0747, "out": 0.44819, "cr": 0.01494 },
104
+ "glm-5": { "p": "zai", "in": 1, "out": 3.2, "cr": 0.2, "cw": 1, "cwb": "as-input" },
105
+ "glm-5.1": { "p": "zai", "in": 1.4, "out": 4.4, "cr": 0.26, "cw": 1.4, "cwb": "as-input" },
106
+ "glm-5.2": { "p": "zai", "in": 1.4, "out": 4.4, "cr": 0.26, "cw": 1.4, "cwb": "as-input" },
107
+ "glm-5.3": { "p": "zai", "in": 1.4, "out": 4.4, "cr": 0.26, "cw": 1.4, "cwb": "as-input" },
108
+ "glm-5.3-flash": { "p": "zai", "in": 0.15, "out": 0.5, "cr": 0.03, "cw": 0.15, "cwb": "as-input" },
109
+ "glm-5.3-flashx": { "p": "zai", "in": 0.37, "out": 1.25, "cr": 0.075, "cw": 0.37, "cwb": "as-input" },
110
+ "glm-5.3-flashx-legal": { "p": "zai", "in": 0.37, "out": 1.25, "cr": 0.075, "cw": 0.37, "cwb": "as-input" },
111
+ "glm-5v-turbo": { "p": "glm", "in": 0.74698, "out": 3.28669, "cr": 0.17927 },
112
+ "gpt-3.5-turbo": { "p": "openai", "in": 0.5, "out": 1.5, "cr": 0 },
113
+ "gpt-3.5-turbo-0125": { "p": "openai", "in": 0.5, "out": 1.5 },
114
+ "gpt-3.5-turbo-1106": { "p": "openai", "in": 1, "out": 2 },
115
+ "gpt-3.5-turbo-16k": { "p": "openai", "in": 3, "out": 4 },
116
+ "gpt-4": { "p": "openai", "in": 30, "out": 60 },
117
+ "gpt-4-0613": { "p": "openai", "in": 30, "out": 60 },
118
+ "gpt-4-1106-preview": { "p": "openai", "in": 10, "out": 30 },
119
+ "gpt-4-turbo": { "p": "openai", "in": 10, "out": 30 },
120
+ "gpt-4.1": { "p": "openai", "in": 2, "out": 8, "cr": 0.5 },
121
+ "gpt-4.1-mini": { "p": "openai", "in": 0.4, "out": 1.6, "cr": 0.1 },
122
+ "gpt-4.1-nano": { "p": "openai", "in": 0.1, "out": 0.4, "cr": 0.025 },
123
+ "gpt-4o": { "p": "openai", "in": 2.5, "out": 10, "cr": 1.25 },
124
+ "gpt-4o-audio-preview": { "p": "openai", "in": 2.5, "out": 10 },
125
+ "gpt-4o-mini": { "p": "openai", "in": 0.15, "out": 0.6, "cr": 0.075 },
126
+ "gpt-4o-mini-audio-preview": { "p": "openai", "in": 0.15, "out": 0.6 },
127
+ "gpt-4o-mini-realtime-preview": { "p": "openai", "in": 0.6, "out": 2.4, "cr": 0.3 },
128
+ "gpt-4o-mini-search-preview": { "p": "openai", "in": 0.15, "out": 0.6, "cr": 0.075 },
129
+ "gpt-4o-mini-transcribe": { "p": "openai", "in": 1.25, "out": 5 },
130
+ "gpt-4o-mini-tts": { "p": "openai", "in": 0.6, "out": 10 },
131
+ "gpt-4o-search-preview": { "p": "openai", "in": 2.5, "out": 10, "cr": 1.25 },
132
+ "gpt-4o-transcribe": { "p": "openai", "in": 2.5, "out": 10 },
133
+ "gpt-4o-transcribe-diarize": { "p": "openai", "in": 2.5, "out": 10 },
134
+ "gpt-5": { "p": "openai", "in": 1.25, "out": 10, "cr": 0.125 },
135
+ "gpt-5-chat": { "p": "openai", "in": 1.25, "out": 10, "cr": 0.125 },
136
+ "gpt-5-chat-latest": { "p": "openai", "in": 1.25, "out": 10, "cr": 0.125 },
137
+ "gpt-5-codex": { "p": "openai", "in": 1.25, "out": 10, "cr": 0.125 },
138
+ "gpt-5-mini": { "p": "openai", "in": 0.25, "out": 2, "cr": 0.025 },
139
+ "gpt-5-nano": { "p": "openai", "in": 0.05, "out": 0.4, "cr": 0.005 },
140
+ "gpt-5-pro": { "p": "openai", "in": 15, "out": 120 },
141
+ "gpt-5-search-api": { "p": "openai", "in": 1.25, "out": 10, "cr": 0.125 },
142
+ "gpt-5.1": { "p": "openai", "in": 1.25, "out": 10, "cr": 0.125 },
143
+ "gpt-5.1-chat-latest": { "p": "openai", "in": 1.25, "out": 10, "cr": 0.125 },
144
+ "gpt-5.1-codex": { "p": "openai", "in": 1.25, "out": 10, "cr": 0.125 },
145
+ "gpt-5.1-codex-max": { "p": "openai", "in": 1.25, "out": 10, "cr": 0.125 },
146
+ "gpt-5.1-codex-mini": { "p": "openai", "in": 0.25, "out": 2, "cr": 0.025 },
147
+ "gpt-5.2": { "p": "openai", "in": 1.75, "out": 14, "cr": 0.175 },
148
+ "gpt-5.2-chat-latest": { "p": "openai", "in": 1.75, "out": 14, "cr": 0.175 },
149
+ "gpt-5.2-codex": { "p": "openai", "in": 1.75, "out": 14, "cr": 0.175 },
150
+ "gpt-5.2-pro": { "p": "openai", "in": 21, "out": 168 },
151
+ "gpt-5.3-chat-latest": { "p": "openai", "in": 1.75, "out": 14, "cr": 0.175 },
152
+ "gpt-5.3-codex": { "p": "openai", "in": 1.75, "out": 14, "cr": 0.175 },
153
+ "gpt-5.3-codex-spark": { "p": "openai", "in": 1.75, "out": 14, "cr": 0.175 },
154
+ "gpt-5.4": { "p": "openai", "in": 2.5, "out": 15, "cr": 0.25, "lcIn": 5, "lcOut": 22.5, "lcAt": 272000, "bands": [{ "at": 272000, "in": 5, "out": 22.5, "cr": 0.5 }] },
155
+ "gpt-5.4-mini": { "p": "openai", "in": 0.75, "out": 4.5, "cr": 0.075 },
156
+ "gpt-5.4-nano": { "p": "openai", "in": 0.2, "out": 1.25, "cr": 0.02 },
157
+ "gpt-5.4-pro": { "p": "openai", "in": 30, "out": 180 },
158
+ "gpt-5.5": { "p": "openai", "in": 5, "out": 30, "cr": 0.5, "lcIn": 10, "lcOut": 45, "lcAt": 272000, "bands": [{ "at": 272000, "in": 10, "out": 45, "cr": 1 }] },
159
+ "gpt-5.5-cyber": { "p": "openai", "in": 12.5, "out": 75, "cr": 1.25 },
160
+ "gpt-5.5-cyber-preview": { "p": "openai", "in": 12.5, "out": 75, "cr": 1.25 },
161
+ "gpt-5.5-pro": { "p": "openai", "in": 30, "out": 180 },
162
+ "gpt-5.6": { "p": "openai", "in": 4, "out": 20, "cr": 0.4, "cw": 5 },
163
+ "gpt-5.6-cyber": { "p": "openai", "in": 12.5, "out": 75, "cr": 1.25, "cw": 15.625 },
164
+ "gpt-5.6-luna": { "p": "openai", "in": 0.2, "out": 1.2, "cr": 0.02, "cw": 0.25, "lcIn": 0.4, "lcOut": 1.8, "lcAt": 272000, "cwt": [[1800, 0.25], [43200, 0.5]], "bands": [{ "at": 272000, "in": 0.4, "out": 1.8, "cr": 0.04, "cwt": [[1800, 0.5], [43200, 1]] }] },
165
+ "gpt-5.6-sol": { "p": "openai", "in": 4, "out": 20, "cr": 0.4, "cw": 5, "lcIn": 8, "lcOut": 30, "lcAt": 272000, "cwt": [[1800, 5], [43200, 10]], "bands": [{ "at": 272000, "in": 8, "out": 30, "cr": 0.8, "cwt": [[1800, 10], [43200, 20]] }] },
166
+ "gpt-5.6-terra": { "p": "openai", "in": 2, "out": 12, "cr": 0.2, "cw": 2.5, "lcIn": 4, "lcOut": 18, "lcAt": 272000, "cwt": [[1800, 2.5], [43200, 5]], "bands": [{ "at": 272000, "in": 4, "out": 18, "cr": 0.4, "cwt": [[1800, 5], [43200, 10]] }] },
167
+ "gpt-6-astra": { "p": "openai", "in": 10, "out": 50, "cr": 1, "cw": 12.5, "lcIn": 20, "lcOut": 75, "lcAt": 272000, "cwt": [[1800, 12.5], [43200, 25]], "bands": [{ "at": 272000, "in": 20, "out": 75, "cr": 2, "cwt": [[1800, 25], [43200, 50]] }] },
168
+ "gpt-6-astra-law": { "p": "openai", "in": 10, "out": 50, "cr": 1 },
169
+ "gpt-6-cyber": { "p": "openai", "in": 20, "out": 100, "cr": 2, "cw": 25 },
170
+ "gpt-6-luna": { "p": "openai", "in": 0.1, "out": 0.5, "cr": 0.01, "cw": 0.125, "lcIn": 0.2, "lcOut": 0.75, "lcAt": 272000, "cwt": [[1800, 0.125], [43200, 0.25]], "bands": [{ "at": 272000, "in": 0.2, "out": 0.75, "cr": 0.02, "cwt": [[1800, 0.25], [43200, 0.5]] }] },
171
+ "gpt-6-rosalind": { "p": "openai", "in": 15, "out": 75, "cr": 1.5, "cw": 18.75 },
172
+ "gpt-6-sol": { "p": "openai", "in": 2, "out": 10, "cr": 0.2, "cw": 2.5, "lcIn": 4, "lcOut": 15, "lcAt": 272000, "cwt": [[1800, 2.5], [43200, 5]], "bands": [{ "at": 272000, "in": 4, "out": 15, "cr": 0.4, "cwt": [[1800, 5], [43200, 10]] }] },
173
+ "gpt-6.1-sol": { "p": "openai", "in": 2, "out": 10, "cr": 0.1, "cw": 2.5, "lcIn": 4, "lcOut": 15, "lcAt": 272000, "cwt": [[1800, 2.5], [43200, 5]], "bands": [{ "at": 272000, "in": 4, "out": 15, "cr": 0.2, "cwt": [[1800, 5], [43200, 10]] }] },
174
+ "gpt-6.1-terra": { "p": "openai", "in": 1, "out": 5, "cr": 0.05, "cw": 1.25, "lcIn": 2, "lcOut": 7.5, "lcAt": 272000, "cwt": [[1800, 1.25], [43200, 2.5]], "bands": [{ "at": 272000, "in": 2, "out": 7.5, "cr": 0.1, "cwt": [[1800, 2.5], [43200, 5]] }] },
175
+ "gpt-6.2-astra": { "p": "openai", "in": 8, "out": 40, "cr": 0.4, "cw": 10, "lcIn": 16, "lcOut": 60, "lcAt": 272000, "cwt": [[1800, 10], [43200, 20]], "bands": [{ "at": 272000, "in": 16, "out": 60, "cr": 0.8, "cwt": [[1800, 20], [43200, 40]] }] },
176
+ "gpt-6.2-astra-law": { "p": "openai", "in": 8, "out": 40, "cr": 0.4, "cw": 10, "lcIn": 16, "lcOut": 60, "lcAt": 272000, "cwt": [[1800, 10], [43200, 20]], "bands": [{ "at": 272000, "in": 16, "out": 60, "cr": 0.8, "cwt": [[1800, 20], [43200, 40]] }] },
177
+ "gpt-6.2-sol": { "p": "openai", "in": 2, "out": 10, "cr": 0.1, "cw": 2.5, "lcIn": 4, "lcOut": 15, "lcAt": 272000, "cwt": [[1800, 2.5], [43200, 5]], "bands": [{ "at": 272000, "in": 4, "out": 15, "cr": 0.2, "cwt": [[1800, 5], [43200, 10]] }] },
178
+ "gpt-audio": { "p": "openai", "in": 2.5, "out": 10 },
179
+ "gpt-audio-1.5": { "p": "openai", "in": 2.5, "out": 10 },
180
+ "gpt-audio-mini": { "p": "openai", "in": 0.6, "out": 2.4 },
181
+ "gpt-daybreak-blue-latest": { "p": "openai", "in": 4, "out": 20, "cr": 0.4, "cw": 5 },
182
+ "gpt-daybreak-red-latest": { "p": "openai", "in": 12.5, "out": 75, "cr": 1.25, "cw": 15.625 },
183
+ "gpt-image-1.5": { "p": "openai", "in": 5, "out": 10, "cr": 1.25 },
184
+ "gpt-realtime": { "p": "openai", "in": 4, "out": 16, "cr": 0.4 },
185
+ "gpt-realtime-1.5": { "p": "openai", "in": 4, "out": 16, "cr": 0.4 },
186
+ "gpt-realtime-2": { "p": "openai", "in": 4, "out": 24, "cr": 0.4 },
187
+ "gpt-realtime-2.1": { "p": "openai", "in": 4, "out": 24, "cr": 0.4 },
188
+ "gpt-realtime-2.1-mini": { "p": "openai", "in": 0.6, "out": 2.4, "cr": 0.06 },
189
+ "gpt-realtime-mini": { "p": "openai", "in": 0.6, "out": 2.4, "cr": 0.06 },
190
+ "gpt-rosalind-discovery": { "p": "openai", "in": 5, "out": 25, "cr": 0.5 },
191
+ "gpt-rosalind-research": { "p": "openai", "in": 5, "out": 25, "cr": 0.5 },
192
+ "grok-4.20": { "p": "xai", "in": 1.25, "out": 2.5, "cr": 0.2 },
193
+ "grok-4.20-0309": { "p": "xai", "in": 1.25, "out": 2.5, "cr": 0.2 },
194
+ "grok-4.20-0309-non-reasoning": { "p": "xai", "in": 1.25, "out": 2.5, "cr": 0.2, "cw": 1.25, "lcIn": 2.5, "lcOut": 5, "lcAt": 200000, "cwb": "as-input", "bands": [{ "at": 200000, "incl": true, "in": 2.5, "out": 5, "cr": 0.4 }] },
195
+ "grok-4.20-0309-reasoning": { "p": "xai", "in": 1.25, "out": 2.5, "cr": 0.2, "cw": 1.25, "lcIn": 2.5, "lcOut": 5, "lcAt": 200000, "cwb": "as-input", "bands": [{ "at": 200000, "incl": true, "in": 2.5, "out": 5, "cr": 0.4 }] },
196
+ "grok-4.20-beta": { "p": "xai", "in": 1.25, "out": 2.5, "cr": 0.2 },
197
+ "grok-4.20-beta-0309": { "p": "xai", "in": 1.25, "out": 2.5, "cr": 0.2 },
198
+ "grok-4.20-beta-0309-non-reasoning": { "p": "xai", "in": 1.25, "out": 2.5, "cr": 0.2 },
199
+ "grok-4.20-beta-0309-reasoning": { "p": "xai", "in": 1.25, "out": 2.5, "cr": 0.2 },
200
+ "grok-4.20-beta-latest": { "p": "xai", "in": 1.25, "out": 2.5, "cr": 0.2 },
201
+ "grok-4.20-beta-latest-non-reasoning": { "p": "xai", "in": 1.25, "out": 2.5, "cr": 0.2 },
202
+ "grok-4.20-beta-latest-reasoning": { "p": "xai", "in": 1.25, "out": 2.5, "cr": 0.2 },
203
+ "grok-4.20-beta-non-reasoning": { "p": "xai", "in": 1.25, "out": 2.5, "cr": 0.2 },
204
+ "grok-4.20-beta-reasoning": { "p": "xai", "in": 1.25, "out": 2.5, "cr": 0.2 },
205
+ "grok-4.20-experimental-beta-0304": { "p": "xai", "in": 1.25, "out": 2.5, "cr": 0.2 },
206
+ "grok-4.20-experimental-beta-0304-non-reasoning": { "p": "xai", "in": 1.25, "out": 2.5, "cr": 0.2 },
207
+ "grok-4.20-experimental-beta-0304-reasoning": { "p": "xai", "in": 1.25, "out": 2.5, "cr": 0.2 },
208
+ "grok-4.20-experimental-beta-latest": { "p": "xai", "in": 1.25, "out": 2.5, "cr": 0.2 },
209
+ "grok-4.20-experimental-beta-non-reasoning-latest": { "p": "xai", "in": 1.25, "out": 2.5, "cr": 0.2 },
210
+ "grok-4.20-experimental-beta-reasoning-latest": { "p": "xai", "in": 1.25, "out": 2.5, "cr": 0.2 },
211
+ "grok-4.20-multi-agent": { "p": "xai", "in": 1.25, "out": 2.5, "cr": 0.2 },
212
+ "grok-4.20-multi-agent-0309": { "p": "xai", "in": 1.25, "out": 2.5, "cr": 0.2, "cw": 1.25, "lcIn": 2.5, "lcOut": 5, "lcAt": 200000, "cwb": "as-input", "bands": [{ "at": 200000, "incl": true, "in": 2.5, "out": 5, "cr": 0.4 }] },
213
+ "grok-4.20-multi-agent-beta-0309": { "p": "xai", "in": 1.25, "out": 2.5, "cr": 0.2 },
214
+ "grok-4.20-multi-agent-beta-latest": { "p": "xai", "in": 1.25, "out": 2.5, "cr": 0.2 },
215
+ "grok-4.20-multi-agent-experimental-beta-0304": { "p": "xai", "in": 1.25, "out": 2.5, "cr": 0.2 },
216
+ "grok-4.20-multi-agent-experimental-beta-latest": { "p": "xai", "in": 1.25, "out": 2.5, "cr": 0.2 },
217
+ "grok-4.20-multi-agent-latest": { "p": "xai", "in": 1.25, "out": 2.5, "cr": 0.2 },
218
+ "grok-4.20-non-reasoning": { "p": "xai", "in": 1.25, "out": 2.5, "cr": 0.2 },
219
+ "grok-4.20-non-reasoning-gv2": { "p": "xai", "in": 1.25, "out": 2.5, "cr": 0.2 },
220
+ "grok-4.20-non-reasoning-latest": { "p": "xai", "in": 1.25, "out": 2.5, "cr": 0.2 },
221
+ "grok-4.20-reasoning": { "p": "xai", "in": 1.25, "out": 2.5, "cr": 0.2 },
222
+ "grok-4.20-reasoning-gv2": { "p": "xai", "in": 1.25, "out": 2.5, "cr": 0.2 },
223
+ "grok-4.20-reasoning-latest": { "p": "xai", "in": 1.25, "out": 2.5, "cr": 0.2 },
224
+ "grok-4.3": { "p": "xai", "in": 1.25, "out": 2.5, "cr": 0.2, "cw": 1.25, "lcIn": 2.5, "lcOut": 5, "lcAt": 200000, "cwb": "as-input", "bands": [{ "at": 200000, "incl": true, "in": 2.5, "out": 5, "cr": 0.4 }] },
225
+ "grok-4.3-latest": { "p": "xai", "in": 1.25, "out": 2.5, "cr": 0.2, "cw": 1.25, "lcIn": 2.5, "lcOut": 5, "lcAt": 200000, "cwb": "as-input", "bands": [{ "at": 200000, "incl": true, "in": 2.5, "out": 5, "cr": 0.4 }] },
226
+ "grok-4.5": { "p": "xai", "in": 2, "out": 6, "cr": 0.3, "cw": 2, "lcIn": 4, "lcOut": 12, "lcAt": 200000, "cwb": "as-input", "bands": [{ "at": 200000, "incl": true, "in": 4, "out": 12, "cr": 0.6 }] },
227
+ "grok-4.5-latest": { "p": "xai", "in": 2, "out": 6, "cr": 0.3, "cw": 2, "lcIn": 4, "lcOut": 12, "lcAt": 200000, "cwb": "as-input", "bands": [{ "at": 200000, "incl": true, "in": 4, "out": 12, "cr": 0.6 }] },
228
+ "grok-4.6": { "p": "xai", "in": 2, "out": 6, "cr": 0.5, "cw": 2, "lcIn": 4, "lcOut": 12, "lcAt": 200000, "cwb": "as-input", "bands": [{ "at": 200000, "incl": true, "in": 4, "out": 12, "cr": 1 }] },
229
+ "grok-4.7": { "p": "xai", "in": 2, "out": 6, "cr": 0.5, "cw": 2, "lcIn": 4, "lcOut": 12, "lcAt": 200000, "cwb": "as-input", "bands": [{ "at": 200000, "incl": true, "in": 4, "out": 12, "cr": 1 }] },
230
+ "grok-build-0.1": { "p": "xai", "in": 1, "out": 2, "cr": 0.2, "cw": 1, "lcIn": 2, "lcOut": 4, "lcAt": 200000, "cwb": "as-input", "bands": [{ "at": 200000, "incl": true, "in": 2, "out": 4, "cr": 0.4 }] },
231
+ "grok-build-latest": { "p": "xai", "in": 1, "out": 2, "cr": 0.2, "cw": 1, "lcIn": 2, "lcOut": 4, "lcAt": 200000, "cwb": "as-input", "bands": [{ "at": 200000, "incl": true, "in": 2, "out": 4, "cr": 0.4 }] },
232
+ "grok-code-fast": { "p": "xai", "in": 1, "out": 2, "cr": 0.2 },
233
+ "grok-code-fast-1": { "p": "xai", "in": 1, "out": 2, "cr": 0.2 },
234
+ "grok-code-fast-1-0825": { "p": "xai", "in": 1, "out": 2, "cr": 0.2 },
235
+ "kimi-k2.5": { "p": "moonshot", "in": 0.6, "out": 3, "cr": 0.1 },
236
+ "kimi-k2.6": { "p": "moonshot", "in": 0.95, "out": 4, "cr": 0.16 },
237
+ "kimi-k2.7-code": { "p": "moonshot", "in": 0.95, "out": 4, "cr": 0.19 },
238
+ "kimi-k2.7-code-highspeed": { "p": "moonshot", "in": 1.9, "out": 8, "cr": 0.38 },
239
+ "kimi-k3": { "p": "moonshot", "in": 3, "out": 15, "cr": 0.3, "cw": 3, "cw1h": 6, "cwt": [[300, 3], [3600, 6]] },
240
+ "kimi-k3.1-pro": { "p": "moonshot", "in": 2, "out": 10, "cr": 0.2, "cw": 2 },
241
+ "kimi-k3.1-pro-highspeed": { "p": "moonshot", "in": 4, "out": 20, "cr": 0.2, "cw": 4 },
242
+ "minimax-m2": { "p": "minimax", "in": 0.3, "out": 1.2, "cr": 0.03, "cw": 0.375 },
243
+ "minimax-m2.1": { "p": "minimax", "in": 0.3, "out": 1.2, "cr": 0.03, "cw": 0.375 },
244
+ "minimax-m2.1-lightning": { "p": "minimax", "in": 0.3, "out": 2.4, "cr": 0.03, "cw": 0.375 },
245
+ "minimax-m2.5": { "p": "minimax", "in": 0.3, "out": 1.2, "cr": 0.03, "cw": 0.375 },
246
+ "minimax-m2.5-highspeed": { "p": "minimax", "in": 0.6, "out": 2.4, "cr": 0.03 },
247
+ "minimax-m2.5-lightning": { "p": "minimax", "in": 0.3, "out": 2.4, "cr": 0.03, "cw": 0.375 },
248
+ "minimax-m2.7": { "p": "minimax", "in": 0.3, "out": 1.2, "cr": 0.06, "cw": 0.375 },
249
+ "minimax-m2.7-highspeed": { "p": "minimax", "in": 0.6, "out": 2.4, "cr": 0.06 },
250
+ "minimax-m3": { "p": "minimax", "in": 0.3, "out": 1.2, "cr": 0.06, "lcIn": 0.6, "lcOut": 2.4, "lcAt": 512000, "bands": [{ "at": 512000, "in": 0.6, "out": 2.4, "cr": 0.12 }] },
251
+ "minimax-m3.1-flash": { "p": "minimax", "in": 0.15, "out": 0.6, "cr": 0.015 },
252
+ "moonshot-v1-128k": { "p": "moonshot", "in": 2, "out": 5 },
253
+ "moonshot-v1-128k-vision-preview": { "p": "moonshot", "in": 2, "out": 5 },
254
+ "moonshot-v1-32k": { "p": "moonshot", "in": 1, "out": 3 },
255
+ "moonshot-v1-32k-vision-preview": { "p": "moonshot", "in": 1, "out": 3 },
256
+ "moonshot-v1-8k": { "p": "moonshot", "in": 0.2, "out": 2 },
257
+ "moonshot-v1-8k-vision-preview": { "p": "moonshot", "in": 0.2, "out": 2 },
258
+ "moonshot-v1-auto": { "p": "moonshot", "in": 2, "out": 5 },
259
+ "o1": { "p": "openai", "in": 15, "out": 60, "cr": 7.5 },
260
+ "o1-pro": { "p": "openai", "in": 150, "out": 600 },
261
+ "o3": { "p": "openai", "in": 2, "out": 8, "cr": 0.5 },
262
+ "o3-deep-research": { "p": "openai", "in": 10, "out": 40, "cr": 2.5 },
263
+ "o3-mini": { "p": "openai", "in": 1.1, "out": 4.4, "cr": 0.55 },
264
+ "o3-pro": { "p": "openai", "in": 20, "out": 80 },
265
+ "o4-mini": { "p": "openai", "in": 1.1, "out": 4.4, "cr": 0.275 },
266
+ "o4-mini-deep-research": { "p": "openai", "in": 2, "out": 8, "cr": 0.5 },
267
+ "qvq-max": { "p": "alibaba", "in": 1.2, "out": 4.8 },
268
+ "qwen-audio-3.1-tts-flash": { "p": "alibaba", "in": 0.23, "out": 1.87 },
269
+ "qwen-coder": { "p": "alibaba", "in": 0.3, "out": 1.5 },
270
+ "qwen-flash": { "p": "alibaba", "in": 0.05, "out": 0.4, "cr": 0.01, "cw": 0.0625 },
271
+ "qwen-max": { "p": "alibaba", "in": 1.6, "out": 6.4 },
272
+ "qwen-mt-plus": { "p": "alibaba", "in": 2.46, "out": 7.37 },
273
+ "qwen-mt-turbo": { "p": "alibaba", "in": 0.16, "out": 0.49 },
274
+ "qwen-omni-turbo": { "p": "alibaba", "in": 0.07, "out": 0.27 },
275
+ "qwen-omni-turbo-realtime": { "p": "alibaba", "in": 0.27, "out": 1.07 },
276
+ "qwen-plus": { "p": "alibaba", "in": 0.4, "out": 1.2, "cr": 0.08, "cw": 0.5 },
277
+ "qwen-plus-character-ja": { "p": "alibaba", "in": 0.5, "out": 1.4 },
278
+ "qwen-turbo": { "p": "alibaba", "in": 0.05, "out": 0.2 },
279
+ "qwen-turbo-latest": { "p": "alibaba", "in": 0.05, "out": 0.2 },
280
+ "qwen-vl-max": { "p": "alibaba", "in": 0.8, "out": 3.2 },
281
+ "qwen-vl-ocr": { "p": "alibaba", "in": 0.07, "out": 0.16 },
282
+ "qwen-vl-plus": { "p": "alibaba", "in": 0.21, "out": 0.63 },
283
+ "qwen2-5-omni-7b": { "p": "alibaba", "in": 0.1, "out": 0.4 },
284
+ "qwen3-14b": { "p": "alibaba", "in": 0.35, "out": 1.4 },
285
+ "qwen3-235b-a22b": { "p": "alibaba", "in": 0.7, "out": 2.8 },
286
+ "qwen3-32b": { "p": "alibaba", "in": 0.7, "out": 2.8 },
287
+ "qwen3-8b": { "p": "alibaba", "in": 0.18, "out": 0.7 },
288
+ "qwen3-coder-30b-a3b-instruct": { "p": "alibaba", "in": 0.45, "out": 2.25 },
289
+ "qwen3-coder-480b-a35b-instruct": { "p": "alibaba", "in": 1.5, "out": 7.5 },
290
+ "qwen3-coder-flash": { "p": "alibaba", "in": 0.3, "out": 1.5, "cr": 0.06, "cw": 0.375 },
291
+ "qwen3-coder-plus": { "p": "alibaba", "in": 1, "out": 5 },
292
+ "qwen3-livetranslate-flash-realtime": { "p": "alibaba", "in": 10, "out": 10 },
293
+ "qwen3-max": { "p": "alibaba", "in": 1.2, "out": 6 },
294
+ "qwen3-next-80b-a3b-instruct": { "p": "alibaba", "in": 0.5, "out": 2 },
295
+ "qwen3-next-80b-a3b-thinking": { "p": "alibaba", "in": 0.5, "out": 6 },
296
+ "qwen3-omni-flash": { "p": "alibaba", "in": 0.43, "out": 1.66 },
297
+ "qwen3-omni-flash-realtime": { "p": "alibaba", "in": 0.52, "out": 1.99 },
298
+ "qwen3-vl-235b-a22b": { "p": "alibaba", "in": 0.7, "out": 2.8 },
299
+ "qwen3-vl-235b-a22b-instruct": { "p": "alibaba", "in": 0.4, "out": 1.6 },
300
+ "qwen3-vl-235b-a22b-thinking": { "p": "alibaba", "in": 0.4, "out": 4 },
301
+ "qwen3-vl-30b-a3b": { "p": "alibaba", "in": 0.2, "out": 0.8 },
302
+ "qwen3-vl-32b-instruct": { "p": "alibaba", "in": 0.16, "out": 0.64 },
303
+ "qwen3-vl-32b-thinking": { "p": "alibaba", "in": 0.16, "out": 2.87 },
304
+ "qwen3-vl-plus": { "p": "alibaba", "in": 0.2, "out": 1.6, "cr": 0.04, "cw": 0.25 },
305
+ "qwen3.5-122b-a10b": { "p": "alibaba", "in": 0.4, "out": 3.2 },
306
+ "qwen3.5-27b": { "p": "alibaba", "in": 0.3, "out": 2.4 },
307
+ "qwen3.5-35b-a3b": { "p": "alibaba", "in": 0.25, "out": 2 },
308
+ "qwen3.5-397b-a17b": { "p": "alibaba", "in": 0.6, "out": 3.6 },
309
+ "qwen3.5-flash": { "p": "alibaba", "in": 0.1, "out": 0.4, "cr": 0.01, "cw": 0.125 },
310
+ "qwen3.5-plus": { "p": "alibaba", "in": 0.4, "out": 2.4 },
311
+ "qwen3.6-27b": { "p": "alibaba", "in": 0.6, "out": 3.6 },
312
+ "qwen3.6-35b-a3b": { "p": "alibaba", "in": 0.375, "out": 2.25 },
313
+ "qwen3.6-flash": { "p": "alibaba", "in": 0.25, "out": 1.5, "cr": 0.025, "cw": 0.3125 },
314
+ "qwen3.6-max-preview": { "p": "alibaba", "in": 1.3, "out": 7.8, "cr": 0.13, "cw": 1.625 },
315
+ "qwen3.6-plus": { "p": "alibaba", "in": 0.5, "out": 3, "cr": 0.05, "cw": 0.625 },
316
+ "qwen3.7-flash": { "p": "alibaba", "in": 0.03, "out": 0.13, "cr": 0.006, "cw": 0.0375 },
317
+ "qwen3.7-max": { "p": "alibaba", "in": 2.5, "out": 7.5, "cr": 0.5, "cw": 3.125 },
318
+ "qwen3.7-plus": { "p": "alibaba", "in": 0.4, "out": 1.6, "cr": 0.08, "cw": 0.5 },
319
+ "qwen3.8-flash": { "p": "alibaba", "in": 0.15, "out": 0.47, "cr": 0.016, "cw": 0.2 },
320
+ "qwen3.8-max": { "p": "alibaba", "in": 2, "out": 6, "cr": 0.25, "cw": 2.5 },
321
+ "qwen3.8-omni-flash": { "p": "alibaba", "in": 0.15, "out": 0.47, "cr": 0.016 },
322
+ "qwen4-max": { "p": "alibaba", "in": 1.5, "out": 4.5, "cr": 0.075, "cw": 1.875 },
323
+ "qwq-plus": { "p": "alibaba", "in": 0.8, "out": 2.4 },
324
+ "text-embedding-3-large": { "p": "openai", "in": 0.13, "out": 0 },
325
+ "text-embedding-3-small": { "p": "openai", "in": 0.02, "out": 0 },
326
+ "text-embedding-ada-002": { "p": "openai", "in": 0.1, "out": 0 },
327
+ "text-embedding-ada-002-v2": { "p": "openai", "in": 0.1, "out": 0 },
328
+ };
329
+ export const PRICE_ALIASES = {
330
+ "embed-large": "text-embedding-3-large",
331
+ "embed-small": "text-embedding-3-small",
332
+ "fable": "claude-fable-5-1",
333
+ "fable-5": "claude-fable-5",
334
+ "fable-5.1": "claude-fable-5-1",
335
+ "gemini-embed": "gemini-embedding-001",
336
+ "gemini-embed-2": "gemini-embedding-2",
337
+ "gemini-flash": "gemini-3.8-flash",
338
+ "gemini-flash-2.5": "gemini-2.5-flash",
339
+ "gemini-flash-lite": "gemini-3.5-flash-lite",
340
+ "gemini-flash-lite-2.5": "gemini-2.5-flash-lite",
341
+ "gemini-pro": "gemini-2.5-pro",
342
+ "gpt4.1": "gpt-4.1",
343
+ "gpt4o": "gpt-4o",
344
+ "gpt4o-mini": "gpt-4o-mini",
345
+ "gpt5": "gpt-5",
346
+ "gpt5-mini": "gpt-5-mini",
347
+ "gpt5-nano": "gpt-5-nano",
348
+ "gpt5-pro": "gpt-5-pro",
349
+ "gpt6": "gpt-6.1-sol",
350
+ "gpt6-astra": "gpt-6-astra",
351
+ "gpt6-luna": "gpt-6-luna",
352
+ "gpt6-sol": "gpt-6.1-sol",
353
+ "grok": "grok-4.7",
354
+ "kimi": "kimi-k3",
355
+ "mythos": "claude-mythos-5-1",
356
+ "mythos-5.1": "claude-mythos-5-1",
357
+ "opus": "claude-opus-5-5",
358
+ "opus-4": "claude-opus-4-8",
359
+ "opus-4.7": "claude-opus-4-7",
360
+ "opus-4.8": "claude-opus-4-8",
361
+ "opus-5": "claude-opus-5",
362
+ "opus-5.5": "claude-opus-5-5",
363
+ "sonnet": "claude-sonnet-5-5",
364
+ "sonnet-4": "claude-sonnet-4-6",
365
+ "sonnet-4.6": "claude-sonnet-4-6",
366
+ "sonnet-5": "claude-sonnet-5",
367
+ "sonnet-5.5": "claude-sonnet-5-5",
368
+ };
369
+ //# sourceMappingURL=prices.generated.js.map
@@ -0,0 +1,134 @@
1
+ /**
2
+ * One place every price ratio comes from.
3
+ *
4
+ * inkling compares token counts weighted by price ratios (cached input,
5
+ * cache write and output, each divided by the uncached input price). The
6
+ * compression gate and the savings math must use the same ratios for the same
7
+ * model, so both ask here.
8
+ *
9
+ * Two sources, chosen by `INKLING_PRICES`:
10
+ * - `legacy` (default): the values inkling has always used. Profile fields
11
+ * for the savings math; Anthropic's 5-minute-tier ratios (1.25x write,
12
+ * 0.1x read) for the gate, whatever the model. These are NOT the official
13
+ * per-model prices (Opus 5.5 reads at 0.05x).
14
+ * - `kosha`: the build-time table in prices.generated.ts (first-party rows
15
+ * of a kosha snapshot; `pnpm prices:gen`). An explicit pricing field in
16
+ * INKLING_GPT_PROFILES still wins. A model with no sane row is UNPRICED:
17
+ * the gate passes it through untouched, the savings math falls back to the
18
+ * profile and reports the source as unpriced.
19
+ *
20
+ * Kosha mode also reads the snapshot's TTL write tiers, long-context bands and
21
+ * dated changes through a {@link PriceContext}: the cache TTL the request
22
+ * writes, its prompt size (cached tokens included) and the time. Bands keep
23
+ * the ratios nearly flat (OpenAI, xAI and Haiku 5.5 double input, read and
24
+ * write together); they matter for absolute dollars. The TTL tier matters for
25
+ * the gate: an Anthropic 1h write costs 2x input, not 1.25x.
26
+ *
27
+ * Workers-safe: no node:, no fs. Reads process.env only behind a typeof guard,
28
+ * like gpt-model-profiles.ts.
29
+ */
30
+ import { PRICE_SNAPSHOT, type PriceRow } from './prices.generated.js';
31
+ /** What the request looks like, for picking a TTL tier, a band and a dated
32
+ * change. Every field is optional; an empty context prices the base row. */
33
+ export interface PriceContext {
34
+ /** Cache TTL the request writes, in seconds (Anthropic `ttl: "1h"` = 3600). */
35
+ ttlSec?: number;
36
+ /** Prompt tokens, cached included: what a provider compares to a band line. */
37
+ promptTokens?: number;
38
+ /** Epoch ms the request is billed at. Default now. */
39
+ at?: number;
40
+ }
41
+ /** Price ratios relative to the model's uncached input price. */
42
+ export interface PriceRates {
43
+ /** Cached-input (cache read) price ÷ input price. */
44
+ read: number;
45
+ /** Shortest-TTL cache write price ÷ input price. 1 when the provider charges
46
+ * no write premium (the write bills as ordinary input). */
47
+ write: number;
48
+ /** Output price ÷ input price. */
49
+ output: number;
50
+ }
51
+ export type PriceSource = 'legacy' | 'env' | 'kosha' | 'unpriced';
52
+ export { PRICE_SNAPSHOT };
53
+ /** The ratios the Anthropic gate has always priced with: 5-minute write tier,
54
+ * 0.1x read, for every Claude model. */
55
+ export declare const ANTHROPIC_GATE_RATES: Readonly<PriceRates>;
56
+ /** Which source is active. Anything other than `kosha` is legacy. */
57
+ export declare function priceMode(): 'legacy' | 'kosha';
58
+ /** The snapshot row for a model: exact normalised id, then a kosha alias, then
59
+ * the longest snapshot id that prefixes it at a `-` boundary (a `-codex` or
60
+ * `-latest` variant prices as its base). */
61
+ export declare function priceRowFor(model: string | null | undefined): PriceRow | undefined;
62
+ /** The row as billed under `ctx`: due dated changes applied, then the band the
63
+ * prompt falls in (above `at`, or from `at` when `incl`) replacing the base
64
+ * rates. A band without its own read or write tiers scales the base ones by
65
+ * its input ratio. */
66
+ export declare function effectiveRow(row: PriceRow | undefined, ctx?: PriceContext): PriceRow | undefined;
67
+ /** Ratios from a snapshot row, or undefined when the row can't be trusted for
68
+ * ratios: no positive input or output, no cache read, a read at or above
69
+ * input, or a write outside [input, 3x input]. A write of 0 or none means no
70
+ * write premium (DeepSeek, z.ai, xAI bill the write as ordinary input). */
71
+ export declare function ratesFromRow(row: PriceRow | undefined, ttlSec?: number): PriceRates | undefined;
72
+ /** Where this model's savings ratios come from under the active mode. */
73
+ export declare function priceSourceFor(model: string | undefined): PriceSource;
74
+ /** Ratios for a model as the savings math prices it. In kosha mode an
75
+ * unpriced model falls back to its profile; check {@link priceSourceFor}
76
+ * before presenting that number as a measured saving. */
77
+ export declare function resolvePriceRates(model: string | undefined, ctx?: PriceContext): PriceRates;
78
+ /** Ratios the image/text gate in transform.ts prices with, or null when the
79
+ * model is unpriced in kosha mode (the gate then passes the text through).
80
+ * Legacy mode keeps the historical Anthropic ratios for every model. */
81
+ export declare function gateRatesFor(model: string | undefined, ctx?: PriceContext): Readonly<PriceRates> | null;
82
+ /** Cache-read ratio for the Anthropic savings math (baseline.ts). Legacy and
83
+ * unpriced models keep the historical 0.1x. Writes stay at Anthropic's
84
+ * published 1.25x (5m) / 2x (1h), which hold for every Claude model. */
85
+ export declare function anthropicReadRate(model: string | undefined, ctx?: PriceContext): number;
86
+ /** USD per 1M uncached input tokens for converting saved token-equivalents to
87
+ * dollars, at the band and date in `ctx`, or undefined when legacy mode or
88
+ * the model is unpriced. */
89
+ export declare function inputUsdPerMtok(model: string | undefined, ctx?: PriceContext): number | undefined;
90
+ /** True for OpenAI GPT/o-series models whose standard prompt cache bills uncached writes at 1.0x. */
91
+ export declare function isAutoCacheOpenAIModel(model: string | null | undefined): boolean;
92
+ export interface CliffSavingsEval {
93
+ readonly crossesCliff: boolean;
94
+ readonly cliffAt: number;
95
+ readonly multiplier: number;
96
+ readonly inputUsdBefore: number;
97
+ readonly inputUsdAfter: number;
98
+ /** Immediate single-turn USD saved assuming the unproxied path stayed warm on the higher tier. */
99
+ readonly netSingleTurnUsd: number;
100
+ /** Input+output band-step savings across the remaining prompt alone. */
101
+ readonly cliffSavedUsd: number;
102
+ }
103
+ /**
104
+ * Evaluate whether shrinking a prompt from `promptTokensBefore` to
105
+ * `promptTokensAfter` drops the entire request below a long-context pricing
106
+ * cliff (e.g. OpenAI 272K, Gemini/Grok 200K, Haiku 5.5 100K, MiniMax M3 512K),
107
+ * turning an amortized multi-turn trade-off into an immediate turn-1 win.
108
+ *
109
+ * Returns null in legacy mode, on unpriced models, or if no cliff is crossed.
110
+ */
111
+ export declare function evaluateCliffAvoidance(model: string | null | undefined, args: {
112
+ promptTokensBefore: number;
113
+ promptTokensAfter: number;
114
+ collapsedBaselineTokens?: number;
115
+ collapsedActualTokens?: number;
116
+ downstreamCachedTokens?: number;
117
+ expectedOutputTokens?: number;
118
+ ttlSec?: number;
119
+ at?: number;
120
+ }): CliffSavingsEval | null;
121
+ /**
122
+ * Exact kosha USD bill for one request's token buckets at its billed prompt band,
123
+ * or undefined in legacy mode or when the model lacks input/output/read rates.
124
+ */
125
+ export declare function estimateBillUsd(model: string | null | undefined, args: {
126
+ uncachedTokens: number;
127
+ cachedTokens?: number;
128
+ cacheWriteTokens?: number;
129
+ outputTokens?: number;
130
+ ttlSec?: number;
131
+ promptTokens?: number;
132
+ at?: number;
133
+ }): number | undefined;
134
+ //# sourceMappingURL=pricing.d.ts.map