modelrig 0.8.1 → 0.10.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 (382) hide show
  1. package/CHANGELOG.md +324 -0
  2. package/README.md +55 -29
  3. package/data/PROVENANCE.md +14 -0
  4. package/data/pricing-map.json +26 -0
  5. package/dist/adapters/attempt-meta-map.d.ts +8 -1
  6. package/dist/adapters/attempt-meta-map.d.ts.map +1 -1
  7. package/dist/adapters/attempt-meta-map.js +4 -0
  8. package/dist/adapters/build-adapters.js +2 -2
  9. package/dist/adapters/gemini.d.ts +28 -1
  10. package/dist/adapters/gemini.d.ts.map +1 -1
  11. package/dist/adapters/gemini.js +38 -9
  12. package/dist/adapters/grok.d.ts.map +1 -1
  13. package/dist/adapters/grok.js +53 -4
  14. package/dist/adapters/openai-compat.d.ts +8 -2
  15. package/dist/adapters/openai-compat.d.ts.map +1 -1
  16. package/dist/adapters/openai-compat.js +8 -1
  17. package/dist/adapters/openai-stream.d.ts +10 -2
  18. package/dist/adapters/openai-stream.d.ts.map +1 -1
  19. package/dist/adapters/openai-stream.js +5 -1
  20. package/dist/adapters/openai.d.ts +10 -1
  21. package/dist/adapters/openai.d.ts.map +1 -1
  22. package/dist/adapters/openai.js +57 -7
  23. package/dist/adapters/responses-api.d.ts +61 -0
  24. package/dist/adapters/responses-api.d.ts.map +1 -0
  25. package/dist/adapters/responses-api.js +124 -0
  26. package/dist/artifacts/artifact.d.ts +31 -12
  27. package/dist/artifacts/artifact.d.ts.map +1 -1
  28. package/dist/artifacts/artifact.js +218 -188
  29. package/dist/artifacts/index.d.ts +15 -5
  30. package/dist/artifacts/index.d.ts.map +1 -1
  31. package/dist/artifacts/index.js +19 -5
  32. package/dist/artifacts/run-context.d.ts +3 -24
  33. package/dist/artifacts/run-context.d.ts.map +1 -1
  34. package/dist/artifacts/run-context.js +3 -39
  35. package/dist/bakeoff/engine.d.ts +29 -0
  36. package/dist/bakeoff/engine.d.ts.map +1 -1
  37. package/dist/bakeoff/engine.js +47 -0
  38. package/dist/bakeoff/eval-cases-rig.d.ts +36 -0
  39. package/dist/bakeoff/eval-cases-rig.d.ts.map +1 -0
  40. package/dist/bakeoff/eval-cases-rig.js +27 -0
  41. package/dist/bakeoff/eval-cases.d.ts +19 -0
  42. package/dist/bakeoff/eval-cases.d.ts.map +1 -1
  43. package/dist/bakeoff/eval-cases.js +18 -1
  44. package/dist/bakeoff/golden-judge.d.ts +47 -0
  45. package/dist/bakeoff/golden-judge.d.ts.map +1 -0
  46. package/dist/bakeoff/golden-judge.js +49 -0
  47. package/dist/bakeoff/groundedness.d.ts +58 -0
  48. package/dist/bakeoff/groundedness.d.ts.map +1 -0
  49. package/dist/bakeoff/groundedness.js +165 -0
  50. package/dist/bakeoff/quality.d.ts +43 -0
  51. package/dist/bakeoff/quality.d.ts.map +1 -1
  52. package/dist/bakeoff/quality.js +31 -0
  53. package/dist/bakeoff/replay.d.ts +11 -0
  54. package/dist/bakeoff/replay.d.ts.map +1 -1
  55. package/dist/bakeoff/replay.js +12 -0
  56. package/dist/bakeoff/report.d.ts +7 -0
  57. package/dist/bakeoff/report.d.ts.map +1 -1
  58. package/dist/bakeoff/report.js +26 -0
  59. package/dist/cli-judge.d.ts +12 -0
  60. package/dist/cli-judge.d.ts.map +1 -0
  61. package/dist/cli-judge.js +48 -0
  62. package/dist/cli.d.ts.map +1 -1
  63. package/dist/cli.js +22 -42
  64. package/dist/config.d.ts +85 -29
  65. package/dist/config.d.ts.map +1 -1
  66. package/dist/config.js +109 -47
  67. package/dist/detect/detector.d.ts +4 -2
  68. package/dist/detect/detector.d.ts.map +1 -1
  69. package/dist/detect/safe-harbor.d.ts +57 -0
  70. package/dist/detect/safe-harbor.d.ts.map +1 -0
  71. package/dist/detect/safe-harbor.js +278 -0
  72. package/dist/doctor-cli.d.ts +7 -0
  73. package/dist/doctor-cli.d.ts.map +1 -0
  74. package/dist/doctor-cli.js +67 -0
  75. package/dist/doctor-preflight.d.ts +52 -0
  76. package/dist/doctor-preflight.d.ts.map +1 -0
  77. package/dist/doctor-preflight.js +112 -0
  78. package/dist/feedback/coverage.d.ts +11 -8
  79. package/dist/feedback/coverage.d.ts.map +1 -1
  80. package/dist/feedback/coverage.js +29 -16
  81. package/dist/feedback/grade.d.ts +58 -0
  82. package/dist/feedback/grade.d.ts.map +1 -0
  83. package/dist/feedback/grade.js +67 -0
  84. package/dist/gateway/http-protocol.d.ts +20 -1
  85. package/dist/gateway/http-protocol.d.ts.map +1 -1
  86. package/dist/gateway/http-protocol.js +1 -1
  87. package/dist/gateway/serve-client.d.ts +99 -0
  88. package/dist/gateway/serve-client.d.ts.map +1 -0
  89. package/dist/gateway/serve-client.js +360 -0
  90. package/dist/index.d.ts +68 -29
  91. package/dist/index.d.ts.map +1 -1
  92. package/dist/index.js +167 -46
  93. package/dist/init/observe-cli.js +1 -1
  94. package/dist/init/observe.d.ts +2 -2
  95. package/dist/init/observe.d.ts.map +1 -1
  96. package/dist/init/observe.js +11 -7
  97. package/dist/mask/arm.d.ts +112 -0
  98. package/dist/mask/arm.d.ts.map +1 -0
  99. package/dist/mask/arm.js +179 -0
  100. package/dist/mask/index.d.ts +2 -0
  101. package/dist/mask/index.d.ts.map +1 -1
  102. package/dist/mask/index.js +7 -1
  103. package/dist/mask/mask-policy-cli.d.ts +12 -4
  104. package/dist/mask/mask-policy-cli.d.ts.map +1 -1
  105. package/dist/mask/mask-policy-cli.js +34 -9
  106. package/dist/prompts/manifest.d.ts +128 -0
  107. package/dist/prompts/manifest.d.ts.map +1 -0
  108. package/dist/prompts/manifest.js +214 -0
  109. package/dist/prompts/prompt-fetch.d.ts +84 -0
  110. package/dist/prompts/prompt-fetch.d.ts.map +1 -0
  111. package/dist/prompts/prompt-fetch.js +120 -0
  112. package/dist/prompts/prompt-resolve.d.ts +76 -0
  113. package/dist/prompts/prompt-resolve.d.ts.map +1 -0
  114. package/dist/prompts/prompt-resolve.js +93 -0
  115. package/dist/prompts/slot-resolver.d.ts +91 -0
  116. package/dist/prompts/slot-resolver.d.ts.map +1 -0
  117. package/dist/prompts/slot-resolver.js +135 -0
  118. package/dist/prompts/tools-register.d.ts +60 -0
  119. package/dist/prompts/tools-register.d.ts.map +1 -0
  120. package/dist/prompts/tools-register.js +48 -0
  121. package/dist/prompts/version-hash.d.ts +29 -0
  122. package/dist/prompts/version-hash.d.ts.map +1 -0
  123. package/dist/prompts/version-hash.js +54 -0
  124. package/dist/prompts-export-cli.d.ts +21 -0
  125. package/dist/prompts-export-cli.d.ts.map +1 -0
  126. package/dist/prompts-export-cli.js +130 -0
  127. package/dist/query/grammar.d.ts +2 -2
  128. package/dist/query/grammar.d.ts.map +1 -1
  129. package/dist/query/grammar.js +3 -1
  130. package/dist/query/saved.d.ts +13 -0
  131. package/dist/query/saved.d.ts.map +1 -1
  132. package/dist/query/saved.js +67 -1
  133. package/dist/receipts/types.d.ts +1 -1
  134. package/dist/receipts/types.d.ts.map +1 -1
  135. package/dist/receipts/types.js +1 -0
  136. package/dist/registry/build.d.ts +43 -1
  137. package/dist/registry/build.d.ts.map +1 -1
  138. package/dist/registry/build.js +52 -0
  139. package/dist/registry/cache-policy.d.ts.map +1 -1
  140. package/dist/registry/cache-policy.js +22 -0
  141. package/dist/registry/pricing-shape.d.ts +67 -8
  142. package/dist/registry/pricing-shape.d.ts.map +1 -1
  143. package/dist/registry/pricing-shape.js +50 -13
  144. package/dist/registry/pricing.d.ts +6 -5
  145. package/dist/registry/pricing.d.ts.map +1 -1
  146. package/dist/registry/pricing.js +9 -5
  147. package/dist/registry/rows.d.ts.map +1 -1
  148. package/dist/registry/rows.js +1 -0
  149. package/dist/registry/select.d.ts +6 -1
  150. package/dist/registry/select.d.ts.map +1 -1
  151. package/dist/registry/select.js +11 -0
  152. package/dist/routes/call-config.d.ts +199 -0
  153. package/dist/routes/call-config.d.ts.map +1 -0
  154. package/dist/routes/call-config.js +343 -0
  155. package/dist/routes/destination-loader.d.ts +16 -0
  156. package/dist/routes/destination-loader.d.ts.map +1 -0
  157. package/dist/routes/destination-loader.js +29 -0
  158. package/dist/routes/draft.d.ts +7 -0
  159. package/dist/routes/draft.d.ts.map +1 -1
  160. package/dist/routes/draft.js +12 -0
  161. package/dist/routes/loader.d.ts.map +1 -1
  162. package/dist/routes/loader.js +31 -56
  163. package/dist/routes/objective-loader.d.ts +12 -0
  164. package/dist/routes/objective-loader.d.ts.map +1 -1
  165. package/dist/routes/objective-loader.js +82 -0
  166. package/dist/routes/output-loader.d.ts +42 -0
  167. package/dist/routes/output-loader.d.ts.map +1 -0
  168. package/dist/routes/output-loader.js +112 -0
  169. package/dist/routes/prompt-loader.d.ts +49 -0
  170. package/dist/routes/prompt-loader.d.ts.map +1 -0
  171. package/dist/routes/prompt-loader.js +113 -0
  172. package/dist/routes/resolved-bundle.d.ts +69 -0
  173. package/dist/routes/resolved-bundle.d.ts.map +1 -1
  174. package/dist/routes/resolved-bundle.js +76 -0
  175. package/dist/routes/screen-loader.d.ts +29 -1
  176. package/dist/routes/screen-loader.d.ts.map +1 -1
  177. package/dist/routes/screen-loader.js +59 -1
  178. package/dist/run/accept.d.ts +5 -0
  179. package/dist/run/accept.d.ts.map +1 -1
  180. package/dist/run/accept.js +2 -0
  181. package/dist/run/cost.d.ts +31 -2
  182. package/dist/run/cost.d.ts.map +1 -1
  183. package/dist/run/cost.js +57 -2
  184. package/dist/run/destination.d.ts +39 -0
  185. package/dist/run/destination.d.ts.map +1 -0
  186. package/dist/run/destination.js +45 -0
  187. package/dist/run/dispatch.d.ts +67 -16
  188. package/dist/run/dispatch.d.ts.map +1 -1
  189. package/dist/run/dispatch.js +133 -29
  190. package/dist/run/grounding.d.ts +28 -2
  191. package/dist/run/grounding.d.ts.map +1 -1
  192. package/dist/run/grounding.js +54 -10
  193. package/dist/run/raw-defaults.d.ts.map +1 -1
  194. package/dist/run/raw-defaults.js +6 -1
  195. package/dist/run/raw-finalize.d.ts +50 -0
  196. package/dist/run/raw-finalize.d.ts.map +1 -0
  197. package/dist/run/raw-finalize.js +266 -0
  198. package/dist/run/raw-knobs.d.ts +36 -0
  199. package/dist/run/raw-knobs.d.ts.map +1 -0
  200. package/dist/run/raw-knobs.js +99 -0
  201. package/dist/run/raw-request.d.ts +24 -0
  202. package/dist/run/raw-request.d.ts.map +1 -0
  203. package/dist/run/raw-request.js +69 -0
  204. package/dist/run/raw-schema.d.ts +76 -0
  205. package/dist/run/raw-schema.d.ts.map +1 -0
  206. package/dist/run/raw-schema.js +166 -0
  207. package/dist/run/raw-search-cost.d.ts +48 -0
  208. package/dist/run/raw-search-cost.d.ts.map +1 -0
  209. package/dist/run/raw-search-cost.js +78 -0
  210. package/dist/run/raw-support.d.ts +64 -6
  211. package/dist/run/raw-support.d.ts.map +1 -1
  212. package/dist/run/raw-support.js +84 -11
  213. package/dist/run/raw.d.ts +25 -26
  214. package/dist/run/raw.d.ts.map +1 -1
  215. package/dist/run/raw.js +30 -351
  216. package/dist/run/record-attempt.d.ts +12 -0
  217. package/dist/run/record-attempt.d.ts.map +1 -1
  218. package/dist/run/record-attempt.js +30 -12
  219. package/dist/run/repair-attempt.d.ts +68 -0
  220. package/dist/run/repair-attempt.d.ts.map +1 -0
  221. package/dist/run/repair-attempt.js +180 -0
  222. package/dist/run/resolve-destination.d.ts +49 -0
  223. package/dist/run/resolve-destination.d.ts.map +1 -0
  224. package/dist/run/resolve-destination.js +76 -0
  225. package/dist/run/routing-docs.d.ts.map +1 -1
  226. package/dist/run/routing-docs.js +10 -5
  227. package/dist/run/run.d.ts +30 -1
  228. package/dist/run/run.d.ts.map +1 -1
  229. package/dist/run/run.js +94 -172
  230. package/dist/run/telemetry-row.d.ts +92 -0
  231. package/dist/run/telemetry-row.d.ts.map +1 -0
  232. package/dist/run/telemetry-row.js +81 -0
  233. package/dist/run/validate.d.ts +12 -1
  234. package/dist/run/validate.d.ts.map +1 -1
  235. package/dist/run/validate.js +31 -0
  236. package/dist/run/web-search-pricing.d.ts +43 -0
  237. package/dist/run/web-search-pricing.d.ts.map +1 -0
  238. package/dist/run/web-search-pricing.js +56 -0
  239. package/dist/savings/odometer.d.ts +4 -0
  240. package/dist/savings/odometer.d.ts.map +1 -1
  241. package/dist/savings/odometer.js +20 -1
  242. package/dist/savings/swap-execute.d.ts +7 -0
  243. package/dist/savings/swap-execute.d.ts.map +1 -1
  244. package/dist/savings/swap-execute.js +30 -0
  245. package/dist/savings/swaps-client.d.ts +10 -0
  246. package/dist/savings/swaps-client.d.ts.map +1 -1
  247. package/dist/screen/fixtures/probe-corpora.d.ts +23 -0
  248. package/dist/screen/fixtures/probe-corpora.d.ts.map +1 -0
  249. package/dist/screen/fixtures/probe-corpora.js +69 -0
  250. package/dist/screen/index.d.ts +21 -0
  251. package/dist/screen/index.d.ts.map +1 -0
  252. package/dist/screen/index.js +64 -0
  253. package/dist/screen/model-screen.d.ts +111 -0
  254. package/dist/screen/model-screen.d.ts.map +1 -0
  255. package/dist/screen/model-screen.js +178 -0
  256. package/dist/screen/patterns.d.ts +51 -0
  257. package/dist/screen/patterns.d.ts.map +1 -0
  258. package/dist/screen/patterns.js +151 -0
  259. package/dist/screen/phi-gate.d.ts +52 -0
  260. package/dist/screen/phi-gate.d.ts.map +1 -0
  261. package/dist/screen/phi-gate.js +86 -0
  262. package/dist/screen/policy.d.ts +71 -0
  263. package/dist/screen/policy.d.ts.map +1 -0
  264. package/dist/screen/policy.js +334 -0
  265. package/dist/screen/probe.d.ts +118 -0
  266. package/dist/screen/probe.d.ts.map +1 -0
  267. package/dist/screen/probe.js +132 -0
  268. package/dist/screen/screen-cli.d.ts +16 -0
  269. package/dist/screen/screen-cli.d.ts.map +1 -0
  270. package/dist/screen/screen-cli.js +178 -0
  271. package/dist/screen/screen.d.ts +99 -0
  272. package/dist/screen/screen.d.ts.map +1 -0
  273. package/dist/screen/screen.js +0 -0
  274. package/dist/screen/sidecar.d.ts +69 -0
  275. package/dist/screen/sidecar.d.ts.map +1 -0
  276. package/dist/screen/sidecar.js +145 -0
  277. package/dist/screen/types.d.ts +43 -2
  278. package/dist/screen/types.d.ts.map +1 -1
  279. package/dist/settings/api-fetcher.d.ts +14 -3
  280. package/dist/settings/api-fetcher.d.ts.map +1 -1
  281. package/dist/settings/api-fetcher.js +61 -10
  282. package/dist/settings/grading-guide.d.ts +102 -0
  283. package/dist/settings/grading-guide.d.ts.map +1 -0
  284. package/dist/settings/grading-guide.js +23 -0
  285. package/dist/settings/index.d.ts +3 -2
  286. package/dist/settings/index.d.ts.map +1 -1
  287. package/dist/settings/index.js +2 -1
  288. package/dist/settings/task-settings.d.ts +44 -7
  289. package/dist/settings/task-settings.d.ts.map +1 -1
  290. package/dist/settings/task-settings.js +53 -12
  291. package/dist/status.d.ts +32 -20
  292. package/dist/status.d.ts.map +1 -1
  293. package/dist/status.js +51 -30
  294. package/dist/telemetry/artifact-store.d.ts +5 -6
  295. package/dist/telemetry/artifact-store.d.ts.map +1 -1
  296. package/dist/telemetry/artifact-store.js +21 -24
  297. package/dist/telemetry/attempt-meta.d.ts +76 -1
  298. package/dist/telemetry/attempt-meta.d.ts.map +1 -1
  299. package/dist/telemetry/attempt-meta.js +33 -1
  300. package/dist/telemetry/exporter-setup.d.ts +2 -0
  301. package/dist/telemetry/exporter-setup.d.ts.map +1 -1
  302. package/dist/telemetry/exporter-setup.js +6 -1
  303. package/dist/telemetry/exporter.d.ts +2 -2
  304. package/dist/telemetry/exporter.d.ts.map +1 -1
  305. package/dist/telemetry/exporter.js +22 -41
  306. package/dist/telemetry/grade-mappers.d.ts +25 -0
  307. package/dist/telemetry/grade-mappers.d.ts.map +1 -0
  308. package/dist/telemetry/grade-mappers.js +64 -0
  309. package/dist/telemetry/grades-sql.d.ts +56 -0
  310. package/dist/telemetry/grades-sql.d.ts.map +1 -0
  311. package/dist/telemetry/grades-sql.js +156 -0
  312. package/dist/telemetry/ingest-protocol.d.ts +55 -48
  313. package/dist/telemetry/ingest-protocol.d.ts.map +1 -1
  314. package/dist/telemetry/ingest-protocol.js +48 -83
  315. package/dist/telemetry/org-identity.d.ts +44 -0
  316. package/dist/telemetry/org-identity.d.ts.map +1 -0
  317. package/dist/telemetry/org-identity.js +98 -0
  318. package/dist/telemetry/route-registration.d.ts +48 -0
  319. package/dist/telemetry/route-registration.d.ts.map +1 -0
  320. package/dist/telemetry/route-registration.js +77 -0
  321. package/dist/telemetry/sinks.d.ts +10 -1
  322. package/dist/telemetry/sinks.d.ts.map +1 -1
  323. package/dist/telemetry/sinks.js +52 -6
  324. package/dist/telemetry/store-migrations.d.ts.map +1 -1
  325. package/dist/telemetry/store-migrations.js +64 -0
  326. package/dist/telemetry/store.d.ts +9 -6
  327. package/dist/telemetry/store.d.ts.map +1 -1
  328. package/dist/telemetry/store.js +8 -50
  329. package/dist/tenancy/api-key-format.d.ts +45 -1
  330. package/dist/tenancy/api-key-format.d.ts.map +1 -1
  331. package/dist/tenancy/api-key-format.js +50 -1
  332. package/dist/types/provider.d.ts +23 -3
  333. package/dist/types/provider.d.ts.map +1 -1
  334. package/dist/types/provider.js +26 -0
  335. package/dist/types/route.d.ts +154 -2
  336. package/dist/types/route.d.ts.map +1 -1
  337. package/dist/types/telemetry.d.ts +73 -48
  338. package/dist/types/telemetry.d.ts.map +1 -1
  339. package/dist/validate-cli.d.ts.map +1 -1
  340. package/dist/validate-cli.js +32 -0
  341. package/dist/verify/verify.d.ts +5 -0
  342. package/dist/verify/verify.d.ts.map +1 -1
  343. package/dist/verify/verify.js +2 -0
  344. package/dist/watch/evaluate.d.ts +84 -1
  345. package/dist/watch/evaluate.d.ts.map +1 -1
  346. package/dist/watch/evaluate.js +28 -0
  347. package/dist/watch/monitor.d.ts +8 -2
  348. package/dist/watch/monitor.d.ts.map +1 -1
  349. package/dist/watch/monitor.js +13 -5
  350. package/dist/watch/regret-monitor-cli.d.ts +16 -0
  351. package/dist/watch/regret-monitor-cli.d.ts.map +1 -0
  352. package/dist/watch/regret-monitor-cli.js +137 -0
  353. package/dist/watch/regret-monitor.d.ts +168 -0
  354. package/dist/watch/regret-monitor.d.ts.map +1 -0
  355. package/dist/watch/regret-monitor.js +304 -0
  356. package/dist/watch/upgrade.d.ts +62 -0
  357. package/dist/watch/upgrade.d.ts.map +1 -0
  358. package/dist/watch/upgrade.js +57 -0
  359. package/docs/agent-skill/SKILL.md +181 -9
  360. package/docs/how-it-fits.md +3 -2
  361. package/docs/instrumentation.md +219 -46
  362. package/docs/llms.txt +158 -35
  363. package/docs/managed-serving.md +150 -0
  364. package/docs/mcp-oracle.md +322 -0
  365. package/docs/migration-playbook.md +5 -4
  366. package/docs/quickstart.md +263 -89
  367. package/package.json +18 -4
  368. package/registry/leaderboard.json +74 -0
  369. package/registry/registry.json +232 -112
  370. package/screen.d.ts +16 -0
  371. package/templates/call-disposition-qa.json +77 -0
  372. package/templates/catalog-cleansing.json +77 -0
  373. package/templates/compliance-review.json +76 -0
  374. package/templates/cs-next-action.json +76 -0
  375. package/templates/document-extraction.json +78 -0
  376. package/templates/financial-classification.json +75 -0
  377. package/templates/lead-qualification.json +76 -0
  378. package/templates/medical-classification.json +71 -0
  379. package/templates/ticket-triage.json +76 -0
  380. package/dist/feedback/feedback.d.ts +0 -35
  381. package/dist/feedback/feedback.d.ts.map +0 -1
  382. package/dist/feedback/feedback.js +0 -39
@@ -23,4 +23,17 @@ export declare const SAVED_QUERIES: readonly SavedQuery[];
23
23
  export declare function savedQueryById(id: string): SavedQuery | null;
24
24
  /** The ISO lower bound for a trailing window of `windowDays` ending at `now`. */
25
25
  export declare function sinceIsoFor(windowDays: number, now: Date): string;
26
+ export interface CohortQuery {
27
+ readonly id: string;
28
+ readonly title: string;
29
+ readonly description: string;
30
+ /** The trailing window this measure asks over, in days. */
31
+ readonly windowDays: number;
32
+ /** Reference SQL over the control plane, `ts`/`created_at` bound filled in.
33
+ * Operator-run (service role); NOT the metadata-safe `/query` grammar. */
34
+ sql(sinceIso: string): string;
35
+ }
36
+ export declare const LAUNCH_COHORT_QUERIES: readonly CohortQuery[];
37
+ /** Look up a launch cohort question by id, or null. */
38
+ export declare function cohortQueryById(id: string): CohortQuery | null;
26
39
  //# sourceMappingURL=saved.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"saved.d.ts","sourceRoot":"","sources":["../../src/query/saved.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,2DAA2D;IAC3D,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,8DAA8D;IAC9D,OAAO,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC;CACnC;AAED,eAAO,MAAM,aAAa,EAAE,SAAS,UAAU,EA8B9C,CAAC;AAEF,+CAA+C;AAC/C,wBAAgB,cAAc,CAAC,EAAE,EAAE,MAAM,GAAG,UAAU,GAAG,IAAI,CAE5D;AAED,iFAAiF;AACjF,wBAAgB,WAAW,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,GAAG,MAAM,CAEjE"}
1
+ {"version":3,"file":"saved.d.ts","sourceRoot":"","sources":["../../src/query/saved.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,2DAA2D;IAC3D,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,8DAA8D;IAC9D,OAAO,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC;CACnC;AAED,eAAO,MAAM,aAAa,EAAE,SAAS,UAAU,EA8B9C,CAAC;AAEF,+CAA+C;AAC/C,wBAAgB,cAAc,CAAC,EAAE,EAAE,MAAM,GAAG,UAAU,GAAG,IAAI,CAE5D;AAED,iFAAiF;AACjF,wBAAgB,WAAW,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,GAAG,MAAM,CAEjE;AAaD,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,2DAA2D;IAC3D,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B;8EAC0E;IAC1E,GAAG,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC;CAC/B;AAED,eAAO,MAAM,qBAAqB,EAAE,SAAS,WAAW,EA0EvD,CAAC;AAEF,uDAAuD;AACvD,wBAAgB,eAAe,CAAC,EAAE,EAAE,MAAM,GAAG,WAAW,GAAG,IAAI,CAE9D"}
@@ -11,9 +11,10 @@
11
11
  * editorializes (F5: measured-only).
12
12
  */
13
13
  Object.defineProperty(exports, "__esModule", { value: true });
14
- exports.SAVED_QUERIES = void 0;
14
+ exports.LAUNCH_COHORT_QUERIES = exports.SAVED_QUERIES = void 0;
15
15
  exports.savedQueryById = savedQueryById;
16
16
  exports.sinceIsoFor = sinceIsoFor;
17
+ exports.cohortQueryById = cohortQueryById;
17
18
  exports.SAVED_QUERIES = [
18
19
  {
19
20
  id: "cost-per-subject",
@@ -49,3 +50,68 @@ function savedQueryById(id) {
49
50
  function sinceIsoFor(windowDays, now) {
50
51
  return new Date(now.getTime() - windowDays * 24 * 60 * 60 * 1000).toISOString();
51
52
  }
53
+ exports.LAUNCH_COHORT_QUERIES = [
54
+ {
55
+ id: "cohort-orgs-active",
56
+ title: "Orgs created & active (≥1 run this week)",
57
+ description: "Orgs with at least one inference in the window — the active-org count the T+75 decision reads (spec §3.1).",
58
+ windowDays: 7,
59
+ sql: (since) => `SELECT count(DISTINCT org_id) AS active_orgs FROM inferences WHERE ts >= '${since}'`,
60
+ },
61
+ {
62
+ id: "cohort-byok-spend",
63
+ title: "BYOK list-price spend per org (p50 / p90 / total)",
64
+ description: "Per-org BYOK spend at list price over the window, then p50/p90/total across orgs — the launch value we are NOT charging during launch (spec §3.2).",
65
+ windowDays: 30,
66
+ sql: (since) => `WITH per_org AS (` +
67
+ `SELECT org_id, sum(cost_estimate_usd) AS byok_spend FROM inferences ` +
68
+ `WHERE ts >= '${since}' AND lane = 'byok' GROUP BY org_id) ` +
69
+ `SELECT percentile_cont(0.5) WITHIN GROUP (ORDER BY byok_spend) AS p50, ` +
70
+ `percentile_cont(0.9) WITHIN GROUP (ORDER BY byok_spend) AS p90, ` +
71
+ `sum(byok_spend) AS total FROM per_org`,
72
+ },
73
+ {
74
+ id: "cohort-card-adoption",
75
+ title: "Card-on-file adoption %",
76
+ description: "Share of billing orgs with a Stripe customer + verified card on file (the WS4 card path) — the cap-lifting signal (spec §3.3).",
77
+ windowDays: 30,
78
+ sql: () => `SELECT count(*) FILTER (WHERE stripe_customer IS NOT NULL) AS with_card, ` +
79
+ `count(*) AS billing_orgs FROM balances`,
80
+ },
81
+ {
82
+ id: "cohort-managed-adoption",
83
+ title: "Managed-key adoption % and managed spend",
84
+ description: "Orgs with any managed-lane usage and their managed list-price spend over the window (spec §3.4).",
85
+ windowDays: 30,
86
+ sql: (since) => `SELECT count(DISTINCT org_id) AS managed_orgs, sum(cost_estimate_usd) AS managed_spend ` +
87
+ `FROM inferences WHERE ts >= '${since}' AND lane = 'managed'`,
88
+ },
89
+ {
90
+ id: "cohort-bakeoffs-per-org",
91
+ title: "Bake-offs run per org",
92
+ description: "Bake-off artifacts published per org over the window — engagement with the proof surface (spec §3.6).",
93
+ windowDays: 30,
94
+ sql: (since) => `SELECT org_id, count(*) AS bakeoffs FROM artifacts ` +
95
+ `WHERE kind = 'bakeoff' AND created_at >= '${since}' GROUP BY org_id ORDER BY bakeoffs DESC`,
96
+ },
97
+ {
98
+ id: "cohort-receipts-per-org",
99
+ title: "Published receipts per org",
100
+ description: "Receipts published per org over the window (from the artifacts index) — a card-lifted, unlimited cap for card-on-file orgs (spec §3.7).",
101
+ windowDays: 30,
102
+ sql: (since) => `SELECT org_id, count(*) AS receipts FROM artifacts ` +
103
+ `WHERE kind = 'receipt' AND created_at >= '${since}' GROUP BY org_id ORDER BY receipts DESC`,
104
+ },
105
+ {
106
+ id: "cohort-cap-hits",
107
+ title: "Cap-hit counts by cap",
108
+ description: "How often each soft fair-use cap was exceeded over the window — the counted notices from the launch-terms cap counters (spec §3.9). Reads the counted cap-notice rows recorded in control_state.",
109
+ windowDays: 30,
110
+ sql: (since) => `SELECT key, value FROM control_state ` +
111
+ `WHERE key LIKE 'launch-terms:cap-hit:%' AND updated_at >= '${since}' ORDER BY key`,
112
+ },
113
+ ];
114
+ /** Look up a launch cohort question by id, or null. */
115
+ function cohortQueryById(id) {
116
+ return exports.LAUNCH_COHORT_QUERIES.find((q) => q.id === id) ?? null;
117
+ }
@@ -1,4 +1,4 @@
1
- export type ReceiptKind = "bakeoff" | "regret" | "masking-proof" | "run" | "egress" | "disclosure" | "statement" | "fact-sheet" | "launch-report";
1
+ export type ReceiptKind = "bakeoff" | "regret" | "masking-proof" | "run" | "egress" | "disclosure" | "statement" | "fact-sheet" | "launch-report" | "detector-probe";
2
2
  /** The kinds RP-1 ships producers for. Others land with their own missions. */
3
3
  export declare const RECEIPT_KINDS: readonly ReceiptKind[];
4
4
  export type MeasuredValue = number | string | boolean | null;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/receipts/types.ts"],"names":[],"mappings":"AAgBA,MAAM,MAAM,WAAW,GACnB,SAAS,GAAG,QAAQ,GAAG,eAAe,GAAG,KAAK,GAAG,QAAQ,GACzD,YAAY,GAAG,WAAW,GAAG,YAAY,GAAG,eAAe,CAAC;AAEhE,+EAA+E;AAC/E,eAAO,MAAM,aAAa,EAAE,SAAS,WAAW,EAG/C,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG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,WAAW,GAAG,IAAI,CAAC,SAAS,EAAE,MAAM,GAAG,WAAW,CAAC,CAAC;AAwBhE;;;;;;;;;;;;GAYG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,WAAW,GAAG,OAAO,CAiDxD;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,WAAW,GAAG,MAAM,CAE7D;AAED;mEACmE;AACnE,wBAAgB,WAAW,CAAC,IAAI,EAAE,WAAW,GAAG,MAAM,CAErD"}
@@ -23,6 +23,7 @@ const diff_1 = require("../verify/diff");
23
23
  exports.RECEIPT_KINDS = [
24
24
  "bakeoff", "regret", "masking-proof", "run", "egress",
25
25
  "disclosure", "statement", "fact-sheet", "launch-report",
26
+ "detector-probe",
26
27
  ];
27
28
  /**
28
29
  * Keys that would carry a tenant identifier and so must NEVER appear in
@@ -31,6 +31,14 @@ export interface DeclaredLayer {
31
31
  /** What OUR adapter actually drives for this model (static map v0). */
32
32
  readonly adapter_structured_native: boolean | null;
33
33
  readonly adapter_grounded_native: boolean | null;
34
+ /**
35
+ * DECLARED image-input claim (UC-3 M0) — the vendor's `supports_vision`
36
+ * flag from the pinned LiteLLM map. It SEEDS the image-probe candidate list
37
+ * and drives the declared-vs-probed discrepancy, but it can NEVER mark the
38
+ * probed `image_input` dimension true: probed-beats-declared, and a claim is
39
+ * not a measurement (dev-rule S9c / spec §3). `null` when the map is silent
40
+ * — silence is "unknown", never "no". */
41
+ readonly supports_image_input: boolean | null;
34
42
  };
35
43
  }
36
44
  /** Per-corpus (fixture-family) breakdown of a schema summary — demo-rig
@@ -85,6 +93,27 @@ export interface ProbedGroundingSummary {
85
93
  readonly grounded_rate: number;
86
94
  readonly mean_citations: number;
87
95
  }
96
+ /**
97
+ * Image-input probe summary (UC-3 M0) — the PROBED half of the `image_input`
98
+ * dimension. Every field is a MEASUREMENT over the image-fixture leg (a form
99
+ * image sent with a JSON-schema ask); nothing here is ever seeded from a
100
+ * declared claim. Absence of this block (probed.image === null) means UNPROBED,
101
+ * which is never rendered as "cannot" (spec §3, S9c honesty).
102
+ */
103
+ export interface ProbedImageSummary {
104
+ readonly samples: number;
105
+ /** The probe's PASS rate: fraction of samples that returned schema-conformant
106
+ * JSON AND recovered every planted field (full value accuracy). A wrong-fields
107
+ * response — conformant shape, wrong values — is NOT an extraction, so it
108
+ * lowers this rate (the negative control the leg is tested against). `null`
109
+ * when no samples were taken. */
110
+ readonly extract_rate: number | null;
111
+ readonly extract_ci95: readonly [number, number] | null;
112
+ /** Mean fraction of planted fields recovered over parsed samples — the
113
+ * graded-partial signal behind `extract_rate`. `null` when nothing parsed. */
114
+ readonly value_accuracy_mean: number | null;
115
+ readonly mean_cost_usd: number;
116
+ }
88
117
  export interface ProbedCachingSummary {
89
118
  readonly samples: number;
90
119
  readonly cache_hit_rate: number;
@@ -102,6 +131,10 @@ export interface ProbedLayer {
102
131
  readonly schema: ProbedSchemaSummary | null;
103
132
  readonly grounding: ProbedGroundingSummary | null;
104
133
  readonly caching: ProbedCachingSummary | null;
134
+ /** Image-input leg (UC-3 M0) — null when the model has not been probed on the
135
+ * image class. Optional/additive: pre-image probed layers omit the key, so a
136
+ * reader guards on `?? null` (an absent leg is UNPROBED, never "no images"). */
137
+ readonly image?: ProbedImageSummary | null;
105
138
  }
106
139
  export interface ObservedLayer {
107
140
  readonly as_of: string;
@@ -155,7 +188,7 @@ export interface Registry {
155
188
  * structural so the core package does not depend on modelrig-probes). */
156
189
  export interface ProbeResultFile {
157
190
  readonly modelKey: string;
158
- readonly class: "schema" | "grounding" | "caching";
191
+ readonly class: "schema" | "grounding" | "caching" | "image";
159
192
  readonly date: string;
160
193
  readonly harnessVersion: string;
161
194
  /** fixtureId → family (demo-rig §11.3b). Absent on pre-family result files;
@@ -186,6 +219,15 @@ export declare function latestPerClass(results: readonly ProbeResultFile[]): Par
186
219
  export declare function summarizeSchemaResult(result: ProbeResultFile): ProbedSchemaSummary;
187
220
  export declare function summarizeGroundingResult(result: ProbeResultFile): ProbedGroundingSummary;
188
221
  export declare function summarizeCachingResult(result: ProbeResultFile): ProbedCachingSummary;
222
+ /**
223
+ * Summarize an image-leg result (UC-3 M0). A sample is an EXTRACTION PASS iff it
224
+ * returned schema-conformant JSON (ajv) AND recovered every planted field
225
+ * (valueAccuracy 1.0) — a shape-right / values-wrong answer is the negative
226
+ * control and does NOT count. `extract_rate` is that pass rate over ALL samples
227
+ * (a failed call is a non-extraction), so a run of zero samples is `null`, never
228
+ * a confident 0%.
229
+ */
230
+ export declare function summarizeImageResult(result: ProbeResultFile): ProbedImageSummary;
189
231
  /** Compose a model's SCHEMA result files into one synthetic file, so a cheap
190
232
  * SUPPLEMENTAL run (new fixtures only) ADDS to a prior full run instead of
191
233
  * replacing it — the default latest-per-file rule would drop every fixture the
@@ -1 +1 @@
1
- {"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../src/registry/build.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEtD,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,OAAO,EAAE;QAChB,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;QACpC,QAAQ,CAAC,mBAAmB,EAAE,MAAM,CAAC;QACrC,QAAQ,CAAC,yBAAyB,EAAE,MAAM,GAAG,IAAI,CAAC;KACnD,GAAG,IAAI,CAAC;IACT;;;;;OAKG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,cAAc,GAAG,IAAI,CAAC;IAC5C,QAAQ,CAAC,KAAK,EAAE;QACd,QAAQ,CAAC,wBAAwB,EAAE,OAAO,GAAG,IAAI,CAAC;QAClD,QAAQ,CAAC,mBAAmB,EAAE,OAAO,GAAG,IA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AAG,IAAI,CAAC;IACpC,QAAQ,CAAC,QAAQ,EAAE,aAAa,GAAG,IAAI,CAAC;CACzC,CAAC,EACF,WAAW,EAAE,MAAM,GAClB,QAAQ,CAgBV;AAED;;qDAEqD;AACrD,wBAAgB,4BAA4B,CAAC,MAAM,EAAE,mBAAmB,GAAG,IAAI,GAAG,MAAM,GAAG,IAAI,CAG9F"}
@@ -13,6 +13,7 @@ exports.latestPerClass = latestPerClass;
13
13
  exports.summarizeSchemaResult = summarizeSchemaResult;
14
14
  exports.summarizeGroundingResult = summarizeGroundingResult;
15
15
  exports.summarizeCachingResult = summarizeCachingResult;
16
+ exports.summarizeImageResult = summarizeImageResult;
16
17
  exports.mergeSchemaResults = mergeSchemaResults;
17
18
  exports.buildProbedLayer = buildProbedLayer;
18
19
  exports.detectDiscrepancies = detectDiscrepancies;
@@ -22,6 +23,10 @@ const call_notes_1 = require("./call-notes");
22
23
  const claims_1 = require("./claims");
23
24
  const CONFORMANCE_BAR = 0.9;
24
25
  const GROUNDED_BAR = 0.5;
26
+ /** Schema-conformant-extraction bar for the image leg (UC-3 M0) — the same
27
+ * 0.9 the schema conformance detector uses; an image "capability" is a probed
28
+ * extract rate at or above it, never a declared claim. */
29
+ const IMAGE_BAR = 0.9;
25
30
  function mean(values) {
26
31
  if (values.length === 0)
27
32
  return null;
@@ -148,6 +153,27 @@ function summarizeCachingResult(result) {
148
153
  eligible_samples: n,
149
154
  };
150
155
  }
156
+ /**
157
+ * Summarize an image-leg result (UC-3 M0). A sample is an EXTRACTION PASS iff it
158
+ * returned schema-conformant JSON (ajv) AND recovered every planted field
159
+ * (valueAccuracy 1.0) — a shape-right / values-wrong answer is the negative
160
+ * control and does NOT count. `extract_rate` is that pass rate over ALL samples
161
+ * (a failed call is a non-extraction), so a run of zero samples is `null`, never
162
+ * a confident 0%.
163
+ */
164
+ function summarizeImageResult(result) {
165
+ const samples = Object.values(result.raw).flat();
166
+ const n = samples.length;
167
+ const extracted = samples.filter((s) => s.schemaConform === true && s.valueAccuracy !== null && s.valueAccuracy >= 1).length;
168
+ const accuracies = samples.map((s) => s.valueAccuracy).filter((a) => a !== null);
169
+ return {
170
+ samples: n,
171
+ extract_rate: n === 0 ? null : extracted / n,
172
+ extract_ci95: n === 0 ? null : wilson95(extracted, n),
173
+ value_accuracy_mean: mean(accuracies),
174
+ mean_cost_usd: n === 0 ? 0 : samples.reduce((a, s) => a + s.costUsd, 0) / n,
175
+ };
176
+ }
151
177
  /** Compose a model's SCHEMA result files into one synthetic file, so a cheap
152
178
  * SUPPLEMENTAL run (new fixtures only) ADDS to a prior full run instead of
153
179
  * replacing it — the default latest-per-file rule would drop every fixture the
@@ -214,6 +240,10 @@ function buildProbedLayer(results, currentSchemaFixtureIds) {
214
240
  schema: schemaFile !== undefined ? summarizeSchemaResult(schemaFile) : null,
215
241
  grounding: byClass.grounding !== undefined ? summarizeGroundingResult(byClass.grounding) : null,
216
242
  caching: byClass.caching !== undefined ? summarizeCachingResult(byClass.caching) : null,
243
+ // Image leg is latest-per-file like grounding/caching (one image result per
244
+ // cycle); the key is only emitted when the model was probed on it, so an
245
+ // unprobed model has no `image` block rather than a null-that-reads-as-no.
246
+ ...(byClass.image !== undefined ? { image: summarizeImageResult(byClass.image) } : {}),
217
247
  };
218
248
  }
219
249
  /** Declared-vs-probed disagreement detection — plan §4 (the rule pair) plus
@@ -284,6 +314,28 @@ function detectDiscrepancies(declared, probed) {
284
314
  });
285
315
  }
286
316
  }
317
+ // Image leg (UC-3 M0). Fires only when the model was actually probed on the
318
+ // image class — an UNPROBED model produces no image discrepancy (unprobed ≠
319
+ // "cannot"; the whole detectDiscrepancies also early-returns when probed is
320
+ // null). A declared `supports_vision` claim can disagree with the measurement
321
+ // either way, and we surface the disagreement rather than pick a side.
322
+ const image = probed.image ?? null;
323
+ if (image !== null && image.extract_rate !== null && image.samples > 0) {
324
+ if (declared.flags.supports_image_input === true && image.extract_rate < IMAGE_BAR) {
325
+ out.push({
326
+ kind: "declared_image_low_extraction",
327
+ message: `declared image input (supports_vision), but probed schema-conformant extraction is ` +
328
+ `${(image.extract_rate * 100).toFixed(0)}% (bar: ${IMAGE_BAR * 100}%)`,
329
+ });
330
+ }
331
+ if (declared.flags.supports_image_input !== true && image.extract_rate >= IMAGE_BAR) {
332
+ out.push({
333
+ kind: "undeclared_image_capable",
334
+ message: `no declared image input support, but probed schema-conformant extraction is ` +
335
+ `${(image.extract_rate * 100).toFixed(0)}% — capability exists undeclared`,
336
+ });
337
+ }
338
+ }
287
339
  return out;
288
340
  }
289
341
  function buildRegistry(entries, generatedAt) {
@@ -1 +1 @@
1
- {"version":3,"file":"cache-policy.d.ts","sourceRoot":"","sources":["../../src/registry/cache-policy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpD;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC1B;4CACwC;IACxC,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAC;IAClC;;;2EAGuE;IACvE,QAAQ,CAAC,IAAI,EAAE,sBAAsB,GAAG,kBAAkB,GAAG,YAAY,CAAC;IAC1E,0EAA0E;IAC1E,QAAQ,CAAC,mBAAmB,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5C;4CACwC;IACxC,QAAQ,CAAC,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7C;sFACkF;IAClF,QAAQ,CAAC,mBAAmB,EAAE,OAAO,CAAC;IACtC;8EAC0E;IAC1E,QAAQ,CAAC,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7C;mDAC+C;IAC/C,QAAQ,CAAC,eAAe,EAAE,kBAAkB,GAAG,eAAe,GAAG,eAAe,GAAG,IAAI,CAAC;IACxF;8EAC0E;IAC1E,QAAQ,CAAC,mBAAmB,EAAE,OAAO,CAAC;IACtC,qEAAqE;IACrE,QAAQ,CAAC,oBAAoB,E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AAQ,CAAC,eAAe,EAAE,kBAAkB,GAAG,eAAe,GAAG,eAAe,GAAG,IAAI,CAAC;IACxF;8EAC0E;IAC1E,QAAQ,CAAC,mBAAmB,EAAE,OAAO,CAAC;IACtC,qEAAqE;IACrE,QAAQ,CAAC,oBAAoB,EAAE,OAAO,CAAC;IACvC,qDAAqD;IACrD,QAAQ,CAAC,aAAa,EAClB,WAAW,GACX,gBAAgB,GAChB,oBAAoB,GACpB,iBAAiB,GACjB,mBAAmB,CAAC;IACxB;;8BAE0B;IAC1B,QAAQ,CAAC,0BAA0B,EAAE,OAAO,CAAC;IAC7C,4DAA4D;IAC5D,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;CACjC;AAqMD;;;;eAIe;AACf,wBAAgB,qBAAqB,IAAI,WAAW,CAiBnD;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,UAAU,GAAG,WAAW,CAEhE;AAED,+EAA+E;AAC/E,wBAAgB,0BAA0B,IAAI,SAAS,UAAU,EAAE,CAElE"}
@@ -199,6 +199,28 @@ const POLICIES = {
199
199
  as_of: AS_OF,
200
200
  policy_version: AS_OF,
201
201
  },
202
+ // Z.ai / Zhipu (B4a) — GLM context caching is not verified first-party here
203
+ // (docs egress-blocked at build time), so fail-closed to cache_supported:false,
204
+ // identical L5 posture to DeepInfra. The raw-lane `cache.key` still maps to the
205
+ // OpenAI-dialect `prompt_cache_key` HINT (raw-support.ts) — that is call-shaping,
206
+ // not a claim that a warm cache exists on our path. Revisit when a first-party
207
+ // Z.ai caching page can be cited (then flip with a new as_of).
208
+ zai: {
209
+ cache_supported: false,
210
+ mode: "automatic_prefix",
211
+ default_ttl_seconds: null,
212
+ extended_ttl_seconds: null,
213
+ ttl_refresh_on_read: false,
214
+ min_cacheable_tokens: null,
215
+ cache_key_param: null,
216
+ reports_read_tokens: false,
217
+ reports_write_tokens: false,
218
+ usage_dialect: "openai_details",
219
+ provider_affinity_required: false,
220
+ source: "z.ai — cached rates unverified first-party (fail-closed, L5)",
221
+ as_of: AS_OF,
222
+ policy_version: AS_OF,
223
+ },
202
224
  };
203
225
  /** The fail-closed policy for any provider not seeded (spec §3): caching is
204
226
  * assumed OFF until a first-party source says otherwise — identical posture to
@@ -29,21 +29,71 @@ export interface TokenRates {
29
29
  * ⇒ the 1h write bucket bills at `cache_write` (fail-closed, dev-rule L5). */
30
30
  readonly cache_write_1h?: number | null;
31
31
  }
32
+ /**
33
+ * Per-component tier multipliers (issue #2). A vendor's tier does not always
34
+ * scale every component by one number: Google's Gemini `flex` (and batch) is
35
+ * 0.5× input + output while cache read is "Same as Standard" — so a single
36
+ * scalar over-discounts the cached portion. An ABSENT component here is EXEMPT
37
+ * (multiplier 1.0 — the standard rate), never a guess: write a component
38
+ * explicitly when the vendor publishes a different multiplier for it (L5).
39
+ */
40
+ export interface TierComponentMultipliers {
41
+ readonly input: number;
42
+ readonly output: number;
43
+ /** absent/null ⇒ 1.0 (exempt — bills at the standard cache-read rate). */
44
+ readonly cache_read?: number | null;
45
+ readonly cache_write?: number | null;
46
+ readonly cache_write_1h?: number | null;
47
+ }
48
+ /** A tier multiplier: one scalar over EVERY component (`1.25`), or a
49
+ * per-component block (`{ input: 0.5, output: 0.5, cache_read: 1.0 }`). */
50
+ export type TierMultiplier = number | TierComponentMultipliers;
32
51
  /** MULTIPLIERS on `base` (1.0 = base), NOT absolute rates. */
33
52
  export interface ServingTiers {
34
- readonly priority?: number | null;
35
- readonly fast?: number | null;
36
- readonly region_us?: number | null;
53
+ readonly priority?: TierMultiplier | null;
54
+ readonly fast?: TierMultiplier | null;
55
+ readonly region_us?: TierMultiplier | null;
56
+ /** Gemini flex (issue #2): `{ input: 0.5, output: 0.5, cache_read: 1.0 }`. */
57
+ readonly flex?: TierMultiplier | null;
37
58
  }
38
59
  /** A rate change that applies above a token threshold. */
39
60
  export interface ContextBand {
40
61
  readonly above_tokens: number;
41
62
  readonly rates: TokenRates;
42
63
  }
64
+ /**
65
+ * Typed per-provider image-input price (UC-3 M0). The BILLING MODEL varies by
66
+ * provider — some charge a flat fee per image, others tile the image into input
67
+ * tokens billed per-token — so it is a discriminated union, never averaged into
68
+ * one scalar. `source` + `as_of` are REQUIRED provenance (a sourced value is
69
+ * "declared" until an observed layer supersedes it). GOVERNING RULE (dev-rule
70
+ * L5 / spec §3): if a provider's image price cannot be sourced, this field is
71
+ * ABSENT — never guessed, never synthesized from the text rate.
72
+ */
73
+ export type ImageInputPrice = {
74
+ /** A flat fee per image, USD (LiteLLM `input_cost_per_image`). */
75
+ readonly unit: "per_image";
76
+ readonly usd_per_image: number;
77
+ readonly source: string;
78
+ readonly as_of: string;
79
+ } | {
80
+ /** Per image-token, USD — the provider tiles the image into input tokens
81
+ * (LiteLLM `input_cost_per_image_token`). */
82
+ readonly unit: "per_token";
83
+ readonly usd_per_token: number;
84
+ readonly source: string;
85
+ readonly as_of: string;
86
+ };
43
87
  /** Non-text input units, USD per unit. */
44
88
  export interface ModalityRates {
45
89
  readonly image_per_unit?: number | null;
46
90
  readonly audio_per_second?: number | null;
91
+ /** Typed, provenance-bearing image-input price (UC-3 M0). Additive and
92
+ * optional; absent when the vendor's image price could not be sourced —
93
+ * absence is honest, never a zero or a guess. Supersedes the bare
94
+ * `image_per_unit` scalar for readers that understand the billing model (the
95
+ * scalar stays this pass — S3 order of destruction). */
96
+ readonly image_input?: ImageInputPrice | null;
47
97
  }
48
98
  export interface ModelPricingV2 {
49
99
  /** standard-tier text — the only REQUIRED rates block. */
@@ -72,12 +122,21 @@ export declare const SNAPSHOT_BASIS = "base \u00B7 standard tier \u00B7 text";
72
122
  * the caller supplies provenance. `source` defaults to the snapshot lane.
73
123
  */
74
124
  export declare function synthesizeFromFlat(input: number, output: number, cache_read: number | null, asOf: string, source?: string): ModelPricingV2;
75
- export type ServingTierName = "priority" | "fast" | "region_us";
125
+ export type ServingTierName = "priority" | "fast" | "region_us" | "flex";
126
+ /** Resolve a tier multiplier to one multiplier PER component. A scalar scales
127
+ * every component (the original contract, byte-identical); a per-component
128
+ * block fills an absent component with 1.0 — EXEMPT, i.e. the standard rate. */
129
+ export declare function tierComponentMultipliers(mult: TierMultiplier): Required<{
130
+ [K in keyof TierComponentMultipliers]: number;
131
+ }>;
76
132
  /**
77
- * Absolute rates for a serving tier = `base × multiplier`. Returns `null` when
78
- * the tier's multiplier is absent — fail-closed, so no surface can render a
79
- * tier price the model never published. The multiplier scales every rate
80
- * component present on `base`.
133
+ * Absolute rates for a serving tier = `base × multiplier`, PER COMPONENT.
134
+ * Returns `null` when the tier's multiplier is absent — fail-closed, so no
135
+ * surface (and no cost row) can carry a tier price the model never published.
136
+ * A scalar multiplier scales every rate component present on `base`; a
137
+ * per-component block scales each component by its own multiplier, with an
138
+ * absent component exempt (1.0) — issue #2: Gemini flex discounts input and
139
+ * output but NOT cache read.
81
140
  */
82
141
  export declare function tierRates(pricing: ModelPricingV2, tier: ServingTierName): TokenRates | null;
83
142
  /** A display-ready projection of a price. `basis` is always present, so a
@@ -1 +1 @@
1
- {"version":3,"file":"pricing-shape.d.ts","sourceRoot":"","sources":["../../src/registry/pricing-shape.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,+BAA+B;IAC/B,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,uEAAuE;IACvE,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC;kFAC8E;IAC9E,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACzC;AAED,8DAA8D;AAC9D,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC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IAAI,EAAE,MAAM,CAAC;IACtB,2EAA2E;IAC3E,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CACnC;AAqBD;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,cAAc,GAAG,gBAAgB,CAwD3E"}
@@ -22,6 +22,7 @@
22
22
  Object.defineProperty(exports, "__esModule", { value: true });
23
23
  exports.SNAPSHOT_BASIS = void 0;
24
24
  exports.synthesizeFromFlat = synthesizeFromFlat;
25
+ exports.tierComponentMultipliers = tierComponentMultipliers;
25
26
  exports.tierRates = tierRates;
26
27
  exports.describePricingV2 = describePricingV2;
27
28
  /** The basis string for a snapshot-synthesized (base-only, standard, text)
@@ -52,25 +53,44 @@ function synthesizeFromFlat(input, output, cache_read, asOf, source = "litellm-s
52
53
  function scale(rate, mult) {
53
54
  return rate === null || rate === undefined ? null : rate * mult;
54
55
  }
56
+ /** Resolve a tier multiplier to one multiplier PER component. A scalar scales
57
+ * every component (the original contract, byte-identical); a per-component
58
+ * block fills an absent component with 1.0 — EXEMPT, i.e. the standard rate. */
59
+ function tierComponentMultipliers(mult) {
60
+ if (typeof mult === "number") {
61
+ return { input: mult, output: mult, cache_read: mult, cache_write: mult, cache_write_1h: mult };
62
+ }
63
+ return {
64
+ input: mult.input,
65
+ output: mult.output,
66
+ cache_read: mult.cache_read ?? 1,
67
+ cache_write: mult.cache_write ?? 1,
68
+ cache_write_1h: mult.cache_write_1h ?? 1,
69
+ };
70
+ }
55
71
  /**
56
- * Absolute rates for a serving tier = `base × multiplier`. Returns `null` when
57
- * the tier's multiplier is absent — fail-closed, so no surface can render a
58
- * tier price the model never published. The multiplier scales every rate
59
- * component present on `base`.
72
+ * Absolute rates for a serving tier = `base × multiplier`, PER COMPONENT.
73
+ * Returns `null` when the tier's multiplier is absent — fail-closed, so no
74
+ * surface (and no cost row) can carry a tier price the model never published.
75
+ * A scalar multiplier scales every rate component present on `base`; a
76
+ * per-component block scales each component by its own multiplier, with an
77
+ * absent component exempt (1.0) — issue #2: Gemini flex discounts input and
78
+ * output but NOT cache read.
60
79
  */
61
80
  function tierRates(pricing, tier) {
62
81
  const mult = pricing.tiers?.[tier];
63
82
  if (mult === null || mult === undefined)
64
83
  return null;
84
+ const m = tierComponentMultipliers(mult);
65
85
  return {
66
- input: pricing.base.input * mult,
67
- output: pricing.base.output * mult,
68
- cache_read: scale(pricing.base.cache_read, mult),
69
- cache_write: scale(pricing.base.cache_write, mult),
70
- cache_write_1h: scale(pricing.base.cache_write_1h, mult),
86
+ input: pricing.base.input * m.input,
87
+ output: pricing.base.output * m.output,
88
+ cache_read: scale(pricing.base.cache_read, m.cache_read),
89
+ cache_write: scale(pricing.base.cache_write, m.cache_write),
90
+ cache_write_1h: scale(pricing.base.cache_write_1h, m.cache_write_1h),
71
91
  };
72
92
  }
73
- const TIER_ORDER = ["priority", "fast", "region_us"];
93
+ const TIER_ORDER = ["priority", "fast", "region_us", "flex"];
74
94
  /** USD-per-token → "$X.XX" per Mtok. Adaptive precision: a pricing-authority
75
95
  * surface must not misrepresent a rate — `$0.075/M` renders as `$0.075`, not a
76
96
  * rounded `$0.07`/`$0.08`. Shows up to 6 decimals, trailing zeros trimmed, with
@@ -94,12 +114,29 @@ function describePricingV2(pricing) {
94
114
  const tiers = [];
95
115
  for (const name of TIER_ORDER) {
96
116
  const rates = tierRates(pricing, name);
97
- if (rates !== null)
98
- tiers.push({ name, rate: inOut(rates) });
117
+ if (rates === null)
118
+ continue;
119
+ // Every scaled tier that publishes a cache-read rate states it explicitly,
120
+ // so a reader never infers the cache rate from the in/out multiplier
121
+ // (gemini flex: in/out 0.5× but cache read NOT discounted). Only a tier whose
122
+ // input equals base (a 1.0× tier) omits the note.
123
+ const cacheNote = rates.cache_read != null && pricing.base.cache_read != null && rates.input !== pricing.base.input
124
+ ? ` · cache read ${perMtok(rates.cache_read)}`
125
+ : "";
126
+ tiers.push({ name, rate: `${inOut(rates)}${cacheNote}` });
99
127
  }
100
128
  const contextBands = (pricing.context_bands ?? []).map((b) => `above ${b.above_tokens.toLocaleString()} tok: ${inOut(b.rates)}`);
101
129
  const modality = [];
102
- if (pricing.modality?.image_per_unit != null) {
130
+ // Typed image-input price wins over the bare scalar when present (UC-3 M0) —
131
+ // it carries the billing model, so a reader is never left guessing per-image
132
+ // vs per-token. Absent ⇒ nothing rendered (honest absence, never a $0).
133
+ const imageInput = pricing.modality?.image_input;
134
+ if (imageInput != null) {
135
+ modality.push(imageInput.unit === "per_image"
136
+ ? `image: $${imageInput.usd_per_image.toFixed(4)} per image`
137
+ : `image: ${perMtok(imageInput.usd_per_token)} per Mtok (tiled to tokens)`);
138
+ }
139
+ else if (pricing.modality?.image_per_unit != null) {
103
140
  modality.push(`image: $${pricing.modality.image_per_unit.toFixed(4)} per unit`);
104
141
  }
105
142
  if (pricing.modality?.audio_per_second != null) {
@@ -25,11 +25,12 @@ export interface ModelPricing {
25
25
  }
26
26
  export declare function getPricing(provider: ProviderId, model: string): ModelPricing | null;
27
27
  /**
28
- * The richer `ModelPricingV2` a vendor overlay/manual entry carries, if any —
29
- * resolved by the SAME key precedence as {@link getPricing} (snapshot wins on a
30
- * shared key, and the snapshot never carries `pricing_v2`, so a shared key
31
- * yields null → the caller synthesizes from the flat rate). Returns null when
32
- * no richer shape is on file. Never guesses: absence is `base`-only downstream.
28
+ * The richer `ModelPricingV2` on file for a model, if any — resolved by the SAME
29
+ * key precedence as {@link getPricing} (snapshot wins on a shared key; a snapshot
30
+ * entry yields its hand-grafted `pricing_v2` when it has one — issue #2's gemini
31
+ * tiers — else null → the caller synthesizes from the flat rate; an overlay or
32
+ * manual entry yields its own block). Returns null when no richer shape is on
33
+ * file. Never guesses: absence is `base`-only downstream.
33
34
  */
34
35
  export declare function getPricingV2(provider: ProviderId, model: string): ModelPricingV2 | null;
35
36
  export declare function estimateCostUsd(pricing: ModelPricing, tokensIn: number, tokensOut: number, tokensCached: number,
@@ -1 +1 @@
1
- {"version":3,"file":"pricing.d.ts","sourceRoot":"","sources":["../../src/registry/pricing.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEtD,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7C;;uEAEmE;IACnE,QAAQ,CAAC,mBAAmB,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5C;;sEAEkE;IAClE,QAAQ,CAAC,qBAAqB,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/C;AAyDD,wBAAgB,UAAU,CAAC,QAAQ,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,GAAG,YAAY,GAAG,IAAI,CA6BnF;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,GAAG,cAAc,GAAG,IAAI,CAYvF;AAED,wBAAgB,eAAe,CAC7B,OAAO,EAAE,YAAY,EACrB,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,MAAM;AACpB;;;0CAG0C;AAC1C,gBAAgB,SAAI;AACpB,+EAA+E;AAC/E,kBAAkB,SAAI,GACrB,MAAM,CAsBR"}
1
+ {"version":3,"file":"pricing.d.ts","sourceRoot":"","sources":["../../src/registry/pricing.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEtD,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,C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