@oscharko-dev/keiko 1.1.6 → 1.1.7

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 (211) hide show
  1. package/dist/ui/csp-hashes.json +7 -7
  2. package/dist/ui/static/404.html +1 -1
  3. package/dist/ui/static/__next.__PAGE__.txt +10 -10
  4. package/dist/ui/static/__next._full.txt +12 -12
  5. package/dist/ui/static/__next._tree.txt +1 -1
  6. package/dist/ui/static/_next/static/chunks/{1gb6os129fico.js → 01rp_j2a-73pp.js} +1 -1
  7. package/dist/ui/static/_next/static/chunks/02i0eppipph7e.js +1 -0
  8. package/dist/ui/static/_next/static/chunks/0hc828_gdkyek.js +3 -0
  9. package/dist/ui/static/_next/static/chunks/0hq0i12hw0ypm.js +1 -0
  10. package/dist/ui/static/_next/static/chunks/{0ak5o5brryicl.js → 18grpx4tuavds.js} +1 -1
  11. package/dist/ui/static/_next/static/chunks/1be0-x1mk56wu.js +1 -0
  12. package/dist/ui/static/_next/static/chunks/{0bbv42deftomm.js → 1c1gbfapof8m0.js} +1 -1
  13. package/dist/ui/static/_next/static/chunks/{3d-10944zk2o9.js → 1lj5se4u-t-e9.js} +1 -1
  14. package/dist/ui/static/_next/static/chunks/{1th8j9weqwhgx.js → 1o2cihsnxhmh6.js} +1 -1
  15. package/dist/ui/static/_next/static/chunks/22x3pxeia7hk_.js +1 -0
  16. package/dist/ui/static/_next/static/chunks/{0e6em7dg4gr6q.js → 25lgzefdnbdh6.js} +1 -1
  17. package/dist/ui/static/_next/static/chunks/{182b4sf3i-krz.js → 29p86cxry0h-l.js} +1 -1
  18. package/dist/ui/static/_next/static/chunks/{28mbnwl9g65al.js → 2ctd04x-fzbwc.js} +1 -1
  19. package/dist/ui/static/_next/static/chunks/2jfg687n_mvf8.js +1 -0
  20. package/dist/ui/static/_next/static/chunks/{2t2wftn5liinr.js → 2mnldrncbucm0.js} +1 -1
  21. package/dist/ui/static/_next/static/chunks/{21t1klb1thn76.js → 306ima8lxo17-.js} +1 -1
  22. package/dist/ui/static/_next/static/chunks/{2dpxapmdvqlh1.js → 36-tv3y56oau8.js} +1 -1
  23. package/dist/ui/static/_next/static/chunks/{0ks_l2sa4nfn0.js → 3aizxizjzdddj.js} +1 -1
  24. package/dist/ui/static/_next/static/chunks/{3doin5vaz4zjs.js → 3fuqgie3p2068.js} +1 -1
  25. package/dist/ui/static/_next/static/chunks/3k6g7nzn589fs.js +1 -0
  26. package/dist/ui/static/_next/static/chunks/3r4fz572q3l7s.js +1 -0
  27. package/dist/ui/static/_next/static/chunks/{1lb8ju8qa0d9m.js → 40g2_9ovqiuiu.js} +1 -1
  28. package/dist/ui/static/_not-found/__next._full.txt +9 -9
  29. package/dist/ui/static/_not-found/__next._not-found.__PAGE__.txt +8 -8
  30. package/dist/ui/static/_not-found/__next._tree.txt +1 -1
  31. package/dist/ui/static/_not-found.html +1 -1
  32. package/dist/ui/static/_not-found.txt +9 -9
  33. package/dist/ui/static/atlassian-connectors/__next._full.txt +13 -13
  34. package/dist/ui/static/atlassian-connectors/__next._tree.txt +1 -1
  35. package/dist/ui/static/atlassian-connectors/__next.atlassian-connectors.__PAGE__.txt +10 -10
  36. package/dist/ui/static/atlassian-connectors.html +1 -1
  37. package/dist/ui/static/atlassian-connectors.txt +13 -13
  38. package/dist/ui/static/index.html +1 -1
  39. package/dist/ui/static/index.txt +12 -12
  40. package/dist/ui/static/launch/__next._full.txt +12 -12
  41. package/dist/ui/static/launch/__next._tree.txt +1 -1
  42. package/dist/ui/static/launch/__next.launch.__PAGE__.txt +10 -10
  43. package/dist/ui/static/launch.html +1 -1
  44. package/dist/ui/static/launch.txt +12 -12
  45. package/dist/ui/static/local-knowledge/__next._full.txt +12 -12
  46. package/dist/ui/static/local-knowledge/__next._tree.txt +1 -1
  47. package/dist/ui/static/local-knowledge/__next.local-knowledge.__PAGE__.txt +10 -10
  48. package/dist/ui/static/local-knowledge/capsule/__next._full.txt +13 -13
  49. package/dist/ui/static/local-knowledge/capsule/__next._tree.txt +1 -1
  50. package/dist/ui/static/local-knowledge/capsule/__next.local-knowledge.capsule.__PAGE__.txt +10 -10
  51. package/dist/ui/static/local-knowledge/capsule.html +1 -1
  52. package/dist/ui/static/local-knowledge/capsule.txt +13 -13
  53. package/dist/ui/static/local-knowledge.html +1 -1
  54. package/dist/ui/static/local-knowledge.txt +12 -12
  55. package/node_modules/@oscharko-dev/keiko-cli/package.json +14 -14
  56. package/node_modules/@oscharko-dev/keiko-connectors/dist/version.d.ts +1 -1
  57. package/node_modules/@oscharko-dev/keiko-connectors/dist/version.js +1 -1
  58. package/node_modules/@oscharko-dev/keiko-connectors/package.json +3 -3
  59. package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-failure-class-contracts.d.ts +43 -3
  60. package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-failure-class-contracts.d.ts.map +1 -1
  61. package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-failure-class-contracts.js +79 -2
  62. package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-registry.generated.d.ts +645 -18
  63. package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-registry.generated.d.ts.map +1 -1
  64. package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-registry.generated.js +768 -16
  65. package/node_modules/@oscharko-dev/keiko-contracts/dist/bff-wire.d.ts +7 -2
  66. package/node_modules/@oscharko-dev/keiko-contracts/dist/bff-wire.d.ts.map +1 -1
  67. package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench-runtime-api-validation.js +2 -1
  68. package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench-runtime-constants.d.ts +1 -1
  69. package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench-runtime-constants.d.ts.map +1 -1
  70. package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench.d.ts +1 -1
  71. package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench.d.ts.map +1 -1
  72. package/node_modules/@oscharko-dev/keiko-contracts/dist/context-engineering.d.ts +3 -0
  73. package/node_modules/@oscharko-dev/keiko-contracts/dist/context-engineering.d.ts.map +1 -1
  74. package/node_modules/@oscharko-dev/keiko-contracts/dist/context-engineering.js +20 -4
  75. package/node_modules/@oscharko-dev/keiko-contracts/dist/version.d.ts +2 -2
  76. package/node_modules/@oscharko-dev/keiko-contracts/dist/version.js +2 -2
  77. package/node_modules/@oscharko-dev/keiko-contracts/package.json +1 -1
  78. package/node_modules/@oscharko-dev/keiko-evaluations/package.json +9 -9
  79. package/node_modules/@oscharko-dev/keiko-evidence/dist/version.d.ts +1 -1
  80. package/node_modules/@oscharko-dev/keiko-evidence/dist/version.js +1 -1
  81. package/node_modules/@oscharko-dev/keiko-evidence/package.json +4 -4
  82. package/node_modules/@oscharko-dev/keiko-git/dist/version.d.ts +1 -1
  83. package/node_modules/@oscharko-dev/keiko-git/dist/version.js +1 -1
  84. package/node_modules/@oscharko-dev/keiko-git/package.json +1 -1
  85. package/node_modules/@oscharko-dev/keiko-harness/dist/version.d.ts +1 -1
  86. package/node_modules/@oscharko-dev/keiko-harness/dist/version.js +1 -1
  87. package/node_modules/@oscharko-dev/keiko-harness/package.json +7 -7
  88. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/version.d.ts +1 -1
  89. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/version.js +1 -1
  90. package/node_modules/@oscharko-dev/keiko-local-knowledge/package.json +5 -5
  91. package/node_modules/@oscharko-dev/keiko-memory-capture/dist/version.d.ts +1 -1
  92. package/node_modules/@oscharko-dev/keiko-memory-capture/dist/version.js +1 -1
  93. package/node_modules/@oscharko-dev/keiko-memory-capture/package.json +3 -3
  94. package/node_modules/@oscharko-dev/keiko-memory-consolidation/dist/version.d.ts +1 -1
  95. package/node_modules/@oscharko-dev/keiko-memory-consolidation/dist/version.js +1 -1
  96. package/node_modules/@oscharko-dev/keiko-memory-consolidation/package.json +3 -3
  97. package/node_modules/@oscharko-dev/keiko-memory-governance/dist/version.d.ts +1 -1
  98. package/node_modules/@oscharko-dev/keiko-memory-governance/dist/version.js +1 -1
  99. package/node_modules/@oscharko-dev/keiko-memory-governance/package.json +3 -3
  100. package/node_modules/@oscharko-dev/keiko-memory-retrieval/dist/version.d.ts +1 -1
  101. package/node_modules/@oscharko-dev/keiko-memory-retrieval/dist/version.js +1 -1
  102. package/node_modules/@oscharko-dev/keiko-memory-retrieval/package.json +3 -3
  103. package/node_modules/@oscharko-dev/keiko-memory-vault/dist/version.d.ts +1 -1
  104. package/node_modules/@oscharko-dev/keiko-memory-vault/dist/version.js +1 -1
  105. package/node_modules/@oscharko-dev/keiko-memory-vault/package.json +3 -3
  106. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/config.d.ts.map +1 -1
  107. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/config.js +4 -1
  108. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/gateway.d.ts.map +1 -1
  109. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/gateway.js +127 -23
  110. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/openai-adapter.d.ts.map +1 -1
  111. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/openai-adapter.js +32 -1
  112. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/openai-embedding-adapter.d.ts.map +1 -1
  113. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/openai-embedding-adapter.js +12 -3
  114. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/realtime-voice-adapter.d.ts.map +1 -1
  115. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/realtime-voice-adapter.js +3 -1
  116. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/rerank-adapter.d.ts.map +1 -1
  117. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/rerank-adapter.js +4 -1
  118. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/resilience.d.ts +9 -1
  119. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/resilience.d.ts.map +1 -1
  120. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/resilience.js +87 -5
  121. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/speech-to-text-adapter.d.ts +1 -0
  122. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/speech-to-text-adapter.d.ts.map +1 -1
  123. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/speech-to-text-adapter.js +158 -10
  124. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/text-to-speech-adapter.d.ts.map +1 -1
  125. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/text-to-speech-adapter.js +176 -12
  126. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/version.d.ts +1 -1
  127. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/version.js +1 -1
  128. package/node_modules/@oscharko-dev/keiko-model-gateway/package.json +4 -4
  129. package/node_modules/@oscharko-dev/keiko-quality-intelligence/package.json +3 -3
  130. package/node_modules/@oscharko-dev/keiko-sandbox/package.json +2 -2
  131. package/node_modules/@oscharko-dev/keiko-sdk/package.json +9 -9
  132. package/node_modules/@oscharko-dev/keiko-security/dist/errors/gateway.d.ts +7 -1
  133. package/node_modules/@oscharko-dev/keiko-security/dist/errors/gateway.d.ts.map +1 -1
  134. package/node_modules/@oscharko-dev/keiko-security/dist/errors/gateway.js +21 -0
  135. package/node_modules/@oscharko-dev/keiko-security/dist/version.d.ts +1 -1
  136. package/node_modules/@oscharko-dev/keiko-security/dist/version.js +1 -1
  137. package/node_modules/@oscharko-dev/keiko-security/package.json +2 -2
  138. package/node_modules/@oscharko-dev/keiko-server/dist/coding-sidecar-gateway.d.ts +6 -0
  139. package/node_modules/@oscharko-dev/keiko-server/dist/coding-sidecar-gateway.d.ts.map +1 -1
  140. package/node_modules/@oscharko-dev/keiko-server/dist/coding-sidecar-gateway.js +299 -104
  141. package/node_modules/@oscharko-dev/keiko-server/dist/deps.d.ts +15 -0
  142. package/node_modules/@oscharko-dev/keiko-server/dist/deps.d.ts.map +1 -1
  143. package/node_modules/@oscharko-dev/keiko-server/dist/diagnostics-log.d.ts +5 -1
  144. package/node_modules/@oscharko-dev/keiko-server/dist/diagnostics-log.d.ts.map +1 -1
  145. package/node_modules/@oscharko-dev/keiko-server/dist/diagnostics-log.js +11 -0
  146. package/node_modules/@oscharko-dev/keiko-server/dist/gateway-readiness.d.ts +24 -2
  147. package/node_modules/@oscharko-dev/keiko-server/dist/gateway-readiness.d.ts.map +1 -1
  148. package/node_modules/@oscharko-dev/keiko-server/dist/gateway-readiness.js +215 -38
  149. package/node_modules/@oscharko-dev/keiko-server/dist/gateway-route-deadline.d.ts +6 -0
  150. package/node_modules/@oscharko-dev/keiko-server/dist/gateway-route-deadline.d.ts.map +1 -0
  151. package/node_modules/@oscharko-dev/keiko-server/dist/gateway-route-deadline.js +27 -0
  152. package/node_modules/@oscharko-dev/keiko-server/dist/gateway-setup.d.ts +33 -0
  153. package/node_modules/@oscharko-dev/keiko-server/dist/gateway-setup.d.ts.map +1 -1
  154. package/node_modules/@oscharko-dev/keiko-server/dist/gateway-setup.js +256 -25
  155. package/node_modules/@oscharko-dev/keiko-server/dist/gateway-tool-calling-probe.d.ts +2 -1
  156. package/node_modules/@oscharko-dev/keiko-server/dist/gateway-tool-calling-probe.d.ts.map +1 -1
  157. package/node_modules/@oscharko-dev/keiko-server/dist/gateway-tool-calling-probe.js +11 -4
  158. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/commitRoutes.d.ts +2 -1
  159. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/commitRoutes.d.ts.map +1 -1
  160. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/commitRoutes.js +221 -38
  161. package/node_modules/@oscharko-dev/keiko-server/package.json +22 -22
  162. package/node_modules/@oscharko-dev/keiko-tool-catalog/package.json +3 -3
  163. package/node_modules/@oscharko-dev/keiko-tools/dist/version.d.ts +1 -1
  164. package/node_modules/@oscharko-dev/keiko-tools/dist/version.js +1 -1
  165. package/node_modules/@oscharko-dev/keiko-tools/package.json +7 -7
  166. package/node_modules/@oscharko-dev/keiko-verification/package.json +5 -5
  167. package/node_modules/@oscharko-dev/keiko-workflows/package.json +10 -10
  168. package/node_modules/@oscharko-dev/keiko-workspace/dist/version.d.ts +1 -1
  169. package/node_modules/@oscharko-dev/keiko-workspace/dist/version.js +1 -1
  170. package/node_modules/@oscharko-dev/keiko-workspace/package.json +3 -3
  171. package/package.json +26 -26
  172. package/release-impact.catalog.json +78 -23
  173. package/vendor/{oscharko-dev-keiko-cli-1.1.6.tgz → oscharko-dev-keiko-cli-1.1.7.tgz} +0 -0
  174. package/vendor/{oscharko-dev-keiko-connectors-1.1.6.tgz → oscharko-dev-keiko-connectors-1.1.7.tgz} +0 -0
  175. package/vendor/oscharko-dev-keiko-contracts-1.1.7.tgz +0 -0
  176. package/vendor/{oscharko-dev-keiko-evaluations-1.1.6.tgz → oscharko-dev-keiko-evaluations-1.1.7.tgz} +0 -0
  177. package/vendor/{oscharko-dev-keiko-evidence-1.1.6.tgz → oscharko-dev-keiko-evidence-1.1.7.tgz} +0 -0
  178. package/vendor/{oscharko-dev-keiko-git-1.1.6.tgz → oscharko-dev-keiko-git-1.1.7.tgz} +0 -0
  179. package/vendor/{oscharko-dev-keiko-harness-1.1.6.tgz → oscharko-dev-keiko-harness-1.1.7.tgz} +0 -0
  180. package/vendor/{oscharko-dev-keiko-local-knowledge-1.1.6.tgz → oscharko-dev-keiko-local-knowledge-1.1.7.tgz} +0 -0
  181. package/vendor/{oscharko-dev-keiko-memory-capture-1.1.6.tgz → oscharko-dev-keiko-memory-capture-1.1.7.tgz} +0 -0
  182. package/vendor/{oscharko-dev-keiko-memory-consolidation-1.1.6.tgz → oscharko-dev-keiko-memory-consolidation-1.1.7.tgz} +0 -0
  183. package/vendor/{oscharko-dev-keiko-memory-governance-1.1.6.tgz → oscharko-dev-keiko-memory-governance-1.1.7.tgz} +0 -0
  184. package/vendor/{oscharko-dev-keiko-memory-retrieval-1.1.6.tgz → oscharko-dev-keiko-memory-retrieval-1.1.7.tgz} +0 -0
  185. package/vendor/{oscharko-dev-keiko-memory-vault-1.1.6.tgz → oscharko-dev-keiko-memory-vault-1.1.7.tgz} +0 -0
  186. package/vendor/oscharko-dev-keiko-model-gateway-1.1.7.tgz +0 -0
  187. package/vendor/{oscharko-dev-keiko-quality-intelligence-1.1.6.tgz → oscharko-dev-keiko-quality-intelligence-1.1.7.tgz} +0 -0
  188. package/vendor/{oscharko-dev-keiko-sandbox-1.1.6.tgz → oscharko-dev-keiko-sandbox-1.1.7.tgz} +0 -0
  189. package/vendor/{oscharko-dev-keiko-sdk-1.1.6.tgz → oscharko-dev-keiko-sdk-1.1.7.tgz} +0 -0
  190. package/vendor/oscharko-dev-keiko-security-1.1.7.tgz +0 -0
  191. package/vendor/oscharko-dev-keiko-server-1.1.7.tgz +0 -0
  192. package/vendor/{oscharko-dev-keiko-tool-catalog-1.1.6.tgz → oscharko-dev-keiko-tool-catalog-1.1.7.tgz} +0 -0
  193. package/vendor/{oscharko-dev-keiko-tools-1.1.6.tgz → oscharko-dev-keiko-tools-1.1.7.tgz} +0 -0
  194. package/vendor/{oscharko-dev-keiko-verification-1.1.6.tgz → oscharko-dev-keiko-verification-1.1.7.tgz} +0 -0
  195. package/vendor/{oscharko-dev-keiko-workflows-1.1.6.tgz → oscharko-dev-keiko-workflows-1.1.7.tgz} +0 -0
  196. package/vendor/{oscharko-dev-keiko-workspace-1.1.6.tgz → oscharko-dev-keiko-workspace-1.1.7.tgz} +0 -0
  197. package/dist/ui/static/_next/static/chunks/0c3w2ubla6ek6.js +0 -1
  198. package/dist/ui/static/_next/static/chunks/0gnizm29lk3ll.js +0 -1
  199. package/dist/ui/static/_next/static/chunks/19fesd0w1gjhp.js +0 -3
  200. package/dist/ui/static/_next/static/chunks/1k6f6m-u2q69-.js +0 -1
  201. package/dist/ui/static/_next/static/chunks/1pze64zkvx8vt.js +0 -1
  202. package/dist/ui/static/_next/static/chunks/2h_zvmb272ozs.js +0 -1
  203. package/dist/ui/static/_next/static/chunks/3-5_wuwrev-8c.js +0 -1
  204. package/dist/ui/static/_next/static/chunks/3-l-8qt163_y6.js +0 -1
  205. package/vendor/oscharko-dev-keiko-contracts-1.1.6.tgz +0 -0
  206. package/vendor/oscharko-dev-keiko-model-gateway-1.1.6.tgz +0 -0
  207. package/vendor/oscharko-dev-keiko-security-1.1.6.tgz +0 -0
  208. package/vendor/oscharko-dev-keiko-server-1.1.6.tgz +0 -0
  209. /package/dist/ui/static/_next/static/{ytpWXc-OicMB-rH2zX5b3 → nXnJJ05BP_rtUCiZsedfT}/_buildManifest.js +0 -0
  210. /package/dist/ui/static/_next/static/{ytpWXc-OicMB-rH2zX5b3 → nXnJJ05BP_rtUCiZsedfT}/_clientMiddlewareManifest.js +0 -0
  211. /package/dist/ui/static/_next/static/{ytpWXc-OicMB-rH2zX5b3 → nXnJJ05BP_rtUCiZsedfT}/_ssgManifest.js +0 -0
@@ -25,7 +25,7 @@ import { classifyTokenFailure } from "./qualityIntelligence/figma/figmaTokenSour
25
25
  import { buildQiJudgePreflightRequest, tryParseJudgeVerdict, } from "./qualityIntelligence/judgePort.js";
26
26
  import { persistSealedGatewayConfig } from "./credentialPersistence.js";
27
27
  import { bindSecurityLogCorrelation } from "@oscharko-dev/keiko-security";
28
- import { probeGatewayToolCalling } from "./gateway-tool-calling-probe.js";
28
+ import { probeGatewayToolCalling, transientGatewayStatus } from "./gateway-tool-calling-probe.js";
29
29
  const MODEL_REASONING_EFFORT_SET = new Set(MODEL_REASONING_EFFORTS);
30
30
  function isModelReasoningEffort(value) {
31
31
  return MODEL_REASONING_EFFORT_SET.has(value);
@@ -38,8 +38,23 @@ export const MAX_DISCOVERED_MODELS = 100;
38
38
  const MAX_DEPLOYMENT_NAMES = 100;
39
39
  const MAX_MODEL_ID_LENGTH = 160;
40
40
  const MISTRAL_TOOL_CALLING_LIMITATION = "Tool calling is disabled by default for Mistral deployments until endpoint readiness verifies it";
41
- const DISCOVERED_MODEL_SMOKE_TIMEOUT_MS = 15_000;
41
+ // #3591: the field customer's LiteLLM/vLLM gateway can take well over 15s to answer at peak load;
42
+ // raised so first-run discovery does not mistake a slow but healthy candidate for a broken one.
43
+ // A candidate the smoke probe never gets an answer from is now KEPT unverified instead of dropped
44
+ // (see `admitChatSmokeCandidates`) — this floor bounds how long that patience costs per candidate.
45
+ // `Gateway.chat()`'s own attempt/retry floors run far longer end to end (several minutes), so this
46
+ // value only actually bounds a probe through the per-candidate `cancellationSignal`
47
+ // `defaultGatewaySetupTester` composes from it (PR #3602 review). Exported so tests can pin the
48
+ // exact value instead of restating it (Issue #144 precedent — see `MAX_DISCOVERED_MODELS`).
49
+ export const DISCOVERED_MODEL_SMOKE_TIMEOUT_MS = 120_000;
42
50
  const DEPLOYMENT_SMOKE_TIMEOUT_MS = 30_000;
51
+ // The whole discovery smoke ROUND's own patience budget — distinct from the per-candidate ceiling
52
+ // above. Past this deadline no further candidate probe is even started: the remaining candidates
53
+ // are retained unverified without being called, so a large discovery batch of temporarily-transient
54
+ // candidates (rate-limited, briefly unreachable) can never block first-run setup for an unbounded
55
+ // time. The setup POST has no UI deadline and the server awaits the handler end to end, so this
56
+ // round bound is what actually protects first-run setup (PR #3602 review).
57
+ export const CHAT_SMOKE_ROUND_DEADLINE_MS = 600_000;
43
58
  const GATEWAY_TOOL_CALLING_VERIFICATION_OPERATION = defineActivityLogOperation({
44
59
  contractKind: "activity-log-operation",
45
60
  schemaVersion: 1,
@@ -1331,8 +1346,12 @@ function probeCodeSeverity(code) {
1331
1346
  return 4;
1332
1347
  if (code === ERROR_CODES.RATE_LIMIT)
1333
1348
  return 3;
1334
- if (code !== undefined && SETUP_NETWORK_ERROR_CODES.has(code))
1349
+ // A candidate's own smoke deadline surfaces as CANCELLED when it fires while the gateway sleeps
1350
+ // before a retry: the same "never answered" fact as a TIMEOUT, ranked the same (PR #3602 review).
1351
+ if (code !== undefined &&
1352
+ (SETUP_NETWORK_ERROR_CODES.has(code) || code === ERROR_CODES.CANCELLED)) {
1335
1353
  return 2;
1354
+ }
1336
1355
  if (code === ERROR_CODES.UNKNOWN_MODEL)
1337
1356
  return 1;
1338
1357
  return PROBE_FAILURE_UNCLASSIFIED;
@@ -1424,24 +1443,105 @@ export async function smokeTestCandidates(candidates, probe, concurrency) {
1424
1443
  }
1425
1444
  return accepted;
1426
1445
  }
1427
- async function defaultGatewaySetupTester(config, candidateModelIds, correlationId, deps) {
1428
- // Wired to the process activity log: first-run setup is where an operator's endpoint is wrong
1429
- // in a way no UI message can name (a proxy that blocks CONNECT, a provider that answers 404 for
1430
- // every model). Without the sink the smoke loop's retries and rejections are invisible.
1431
- const gateway = new Gateway(config, {
1432
- log: processServerLogSink(),
1433
- spendBudget: gatewaySpendBudgetForEnv(deps.env),
1434
- });
1435
- const testedModelIds = await smokeTestCandidates(candidateModelIds, async (modelId) => {
1436
- await gateway.chat({
1437
- modelId,
1438
- messages: [
1439
- { role: "system", content: CONVERSATION_SYSTEM_PROMPT },
1440
- { role: "user", content: "Reply with exactly: OK" },
1441
- ],
1442
- logContext: { correlationId },
1443
- });
1444
- }, SETUP_SMOKE_CONCURRENCY);
1446
+ // A per-candidate smoke failure that must be KEPT unverified rather than dropped (PR #3602
1447
+ // review): a rate limit, any existing `SETUP_NETWORK_ERROR_CODES` network-failure code (this
1448
+ // candidate's own `AbortSignal.timeout` deadline below can legitimately surface as either
1449
+ // `TimeoutError` or `CancelledError` — `Gateway.chat()`'s retry loop notices an already-fired
1450
+ // caller signal at the top of its backoff sleep and reports cancellation even though the deadline,
1451
+ // not a real cancel, is what fired it — both codes are already covered by that set), or a transient
1452
+ // HTTP status an intermediating proxy (e.g. the field customer's LiteLLM) answers with under load.
1453
+ // Reuses `transientGatewayStatus` — the SAME "gateway is overloaded, not broken" policy the
1454
+ // tool-calling probe already classifies by — instead of a second private status list. Anything else
1455
+ // is real evidence the candidate does not work and stays dropped.
1456
+ function isUnverifiedSmokeFailure(evidence) {
1457
+ const { code, httpStatus } = evidence;
1458
+ if (code === ERROR_CODES.RATE_LIMIT || code === ERROR_CODES.CANCELLED)
1459
+ return true;
1460
+ if (code !== undefined && SETUP_NETWORK_ERROR_CODES.has(code))
1461
+ return true;
1462
+ return httpStatus !== undefined && transientGatewayStatus(httpStatus);
1463
+ }
1464
+ // One failed candidate's classification: on record in `allFailures` regardless of bucket (the same
1465
+ // body-free pattern `setupToolCallingObservations` already uses for its own per-model probe
1466
+ // failures), then sorted into kept-unverified or dropped-rejected by `isUnverifiedSmokeFailure`.
1467
+ function recordChatSmokeFailure(modelId, error, deps, correlationId, accumulators) {
1468
+ reportSetupVerificationFailure(deps, error, correlationId, "gateway.setup.chat-smoke-probe");
1469
+ const evidence = {
1470
+ code: setupErrorCode(error),
1471
+ httpStatus: setupHttpStatus(error),
1472
+ };
1473
+ accumulators.allFailures.push(evidence);
1474
+ if (isUnverifiedSmokeFailure(evidence)) {
1475
+ accumulators.unverifiedKept.push(modelId);
1476
+ }
1477
+ else {
1478
+ accumulators.droppedRejected.push(modelId);
1479
+ }
1480
+ }
1481
+ // Companion to `passingCandidates` for the discovery smoke test specifically (#3591): tells a
1482
+ // candidate the smoke probe timed out or was rate-limited/overloaded on (`isUnverifiedSmokeFailure`)
1483
+ // apart from one the gateway actually rejected. Mirrors `admitEmbeddingCandidates`'s
1484
+ // retained/dropped shape, but on a different axis: THAT function splits by whether the model's ROLE
1485
+ // was asserted; this one splits by whether the PROBE was ever answered.
1486
+ //
1487
+ // `now` bounds the ROUND, not one candidate: past `CHAT_SMOKE_ROUND_DEADLINE_MS` from the first
1488
+ // call, no further candidate probe is even started — the remaining candidates are retained
1489
+ // unverified untouched, so a large discovery batch can never block first-run setup for an unbounded
1490
+ // time. Defaults to `Date.now` and is a parameter only so tests can control it deterministically.
1491
+ //
1492
+ // Every failure is ALSO recorded into `allFailures`, independent of its bucket: when NOTHING is
1493
+ // tested, `defaultGatewaySetupTester` still throws exactly as `smokeTestCandidates` always did —
1494
+ // `verifyAndSaveGatewaySetup`'s multi-base-URL fallback (`attemptSetupCandidates`) and the
1495
+ // whole-gateway `temporaryChatAdmission` deferral both depend on that throw to try the next
1496
+ // candidate base URL or defer the whole probe round; this function only widens what happens on a
1497
+ // PARTIAL failure, never removes the total-failure signal those two callers already rely on.
1498
+ // Exported for direct unit testing (Issue #144 precedent — see `smokeTestCandidates`): the
1499
+ // classification (`isUnverifiedSmokeFailure`) and round-deadline logic below are pure decision
1500
+ // rules over an injected `probe`/`now`, and exercising them through the full HTTP-mocked
1501
+ // `handleGatewaySetup` route would need either a real multi-minute wait or an intrusive global
1502
+ // `AbortSignal.timeout`/clock stub for every scenario (PR #3602 review).
1503
+ export async function admitChatSmokeCandidates(candidates, probe, concurrency, deps, correlationId, now = Date.now) {
1504
+ const tested = new Array(candidates.length).fill(undefined);
1505
+ const accumulators = {
1506
+ unverifiedKept: [],
1507
+ droppedRejected: [],
1508
+ allFailures: [],
1509
+ skippedByDeadline: [],
1510
+ };
1511
+ const roundDeadlineAt = now() + CHAT_SMOKE_ROUND_DEADLINE_MS;
1512
+ let next = 0;
1513
+ async function worker() {
1514
+ while (next < candidates.length) {
1515
+ const index = next;
1516
+ next += 1;
1517
+ const modelId = candidates[index];
1518
+ if (modelId === undefined)
1519
+ continue;
1520
+ if (now() >= roundDeadlineAt) {
1521
+ accumulators.unverifiedKept.push(modelId);
1522
+ accumulators.skippedByDeadline.push(modelId);
1523
+ continue;
1524
+ }
1525
+ try {
1526
+ await probe(modelId);
1527
+ tested[index] = modelId;
1528
+ }
1529
+ catch (error) {
1530
+ recordChatSmokeFailure(modelId, error, deps, correlationId, accumulators);
1531
+ }
1532
+ }
1533
+ }
1534
+ const workerCount = Math.max(1, Math.min(concurrency, candidates.length));
1535
+ await Promise.all(Array.from({ length: workerCount }, () => worker()));
1536
+ return {
1537
+ tested: tested.filter((modelId) => modelId !== undefined),
1538
+ ...accumulators,
1539
+ };
1540
+ }
1541
+ // The response-format and tool-calling verification rounds, run only over VERIFIED candidates
1542
+ // (`chatSmoke.tested`) — extracted so `defaultGatewaySetupTester` stays under the repository's
1543
+ // per-function line ceiling (AGENTS.md §6).
1544
+ async function verifyTestedChatCandidates(gateway, config, testedModelIds, correlationId, deps) {
1445
1545
  const responseFormatModelIds = await passingCandidates(testedModelIds, async (modelId) => {
1446
1546
  const response = await gateway.chat({
1447
1547
  ...buildQiJudgePreflightRequest(modelId),
@@ -1454,7 +1554,89 @@ async function defaultGatewaySetupTester(config, candidateModelIds, correlationI
1454
1554
  // Both probe rounds independently use the endpoint-wide concurrency budget. Keep them
1455
1555
  // sequential so setup never doubles the operator-approved in-flight request ceiling.
1456
1556
  const toolCallingObservations = await setupToolCallingObservations(config, testedModelIds, correlationId, deps);
1457
- return { testedModelIds, responseFormatModelIds, toolCallingObservations };
1557
+ return { responseFormatModelIds, toolCallingObservations };
1558
+ }
1559
+ // The deadline that actually bounds ONE candidate's smoke call (PR #3602 review): `Gateway.chat()`
1560
+ // floors every attempt at the interactive silence floor (several minutes) and retries once, so the
1561
+ // candidate's configured `timeoutMs` alone no longer bounds anything — this caller-owned
1562
+ // `AbortSignal.timeout` does. Reads the SAME `timeoutMs` `probeConfigForModels` gave this exact
1563
+ // candidate's provider entry (`DISCOVERED_MODEL_SMOKE_TIMEOUT_MS` for discovery,
1564
+ // `DEPLOYMENT_SMOKE_TIMEOUT_MS` for a manually entered deployment) rather than a hardcoded literal,
1565
+ // so both smoke paths stay bounded at the timeout each already advertises; the discovery constant
1566
+ // is only the defensive fallback for a candidate somehow missing its own provider entry.
1567
+ function candidateSmokeCancellationSignal(config, modelId) {
1568
+ return AbortSignal.timeout(candidateSmokeDeadlineMs(config, modelId));
1569
+ }
1570
+ // Never below the discovery smoke floor: a manually entered deployment keeps its shorter configured
1571
+ // timeout for later calls, but a setup probe that gave up at 30 s on a gateway that answers in 45 s
1572
+ // would leave a working model unverified (PR #3602 review). Exported for direct unit testing.
1573
+ export function candidateSmokeDeadlineMs(config, modelId) {
1574
+ const provider = config.providers.find((candidate) => candidate.modelId === modelId);
1575
+ return Math.max(provider?.timeoutMs ?? 0, DISCOVERED_MODEL_SMOKE_TIMEOUT_MS);
1576
+ }
1577
+ // Extracted so `defaultGatewaySetupTester` stays under the repository's per-function line ceiling
1578
+ // (AGENTS.md §6) — the probe itself is the one line that matters: a fixed "reply OK" chat call,
1579
+ // bounded by this candidate's own smoke deadline.
1580
+ function chatSmokeProbe(gateway, config, correlationId) {
1581
+ return async (modelId) => {
1582
+ await gateway.chat({
1583
+ modelId,
1584
+ messages: [
1585
+ { role: "system", content: CONVERSATION_SYSTEM_PROMPT },
1586
+ { role: "user", content: "Reply with exactly: OK" },
1587
+ ],
1588
+ logContext: { correlationId },
1589
+ cancellationSignal: candidateSmokeCancellationSignal(config, modelId),
1590
+ });
1591
+ };
1592
+ }
1593
+ async function defaultGatewaySetupTester(config, candidateModelIds, correlationId, deps) {
1594
+ // Wired to the process activity log: first-run setup is where an operator's endpoint is wrong
1595
+ // in a way no UI message can name (a proxy that blocks CONNECT, a provider that answers 404 for
1596
+ // every model). Without the sink the smoke loop's retries and rejections are invisible.
1597
+ const gateway = new Gateway(config, {
1598
+ log: processServerLogSink(),
1599
+ spendBudget: gatewaySpendBudgetForEnv(deps.env),
1600
+ });
1601
+ const chatSmoke = await admitChatSmokeCandidates(candidateModelIds, chatSmokeProbe(gateway, config, correlationId), SETUP_SMOKE_CONCURRENCY, deps, correlationId);
1602
+ // Nothing was verified: the historic "no discovered model accepted the chat-completions smoke
1603
+ // test" case, thrown exactly as `smokeTestCandidates` always did — even when some candidates were
1604
+ // merely kept unverified rather than dropped, because `verifyAndSaveGatewaySetup`'s multi-base-URL
1605
+ // fallback and the whole-gateway `temporaryChatAdmission` deferral both need this throw to try the
1606
+ // next base URL / defer the round; only reached with zero survivors does the caller ever see it.
1607
+ // Once at least ONE candidate is genuinely tested, the base URL is known-reachable and a peer
1608
+ // candidate that merely timed out is kept unverified instead of dropped (#3591) — see below.
1609
+ if (chatSmoke.tested.length === 0) {
1610
+ throw allProbesFailedError(chatSmoke.allFailures);
1611
+ }
1612
+ const testedModelIds = chatSmoke.tested;
1613
+ const { responseFormatModelIds, toolCallingObservations } = await verifyTestedChatCandidates(gateway, config, testedModelIds, correlationId, deps);
1614
+ return {
1615
+ testedModelIds,
1616
+ responseFormatModelIds,
1617
+ toolCallingObservations: [
1618
+ ...(toolCallingObservations ?? []),
1619
+ ...unverifiedKeptToolCallingObservations(config, chatSmoke.unverifiedKept, correlationId),
1620
+ ],
1621
+ ...(chatSmoke.unverifiedKept.length > 0
1622
+ ? { unverifiedModelIds: chatSmoke.unverifiedKept }
1623
+ : {}),
1624
+ ...(chatSmoke.skippedByDeadline.length > 0
1625
+ ? { skippedModelIds: chatSmoke.skippedByDeadline }
1626
+ : {}),
1627
+ ...(chatSmoke.droppedRejected.length > 0 ? { droppedModelIds: chatSmoke.droppedRejected } : {}),
1628
+ };
1629
+ }
1630
+ // A candidate the smoke probe never got an answer from is kept but was never actually chat-probed,
1631
+ // so its tool-calling status is "unverified" by definition — the SAME record and the SAME closed
1632
+ // vocabulary `temporaryChatAdmission` already uses when the whole gateway defers, just per-candidate
1633
+ // instead of gateway-wide (#3591).
1634
+ function unverifiedKeptToolCallingObservations(config, unverifiedKept, correlationId) {
1635
+ const checkedAt = new Date().toISOString();
1636
+ return unverifiedKept.map((modelId) => {
1637
+ logToolCallingVerification(config, modelId, "unverified", correlationId ?? UNKNOWN_CORRELATION_ID);
1638
+ return { modelId, status: "unverified", checkedAt };
1639
+ });
1458
1640
  }
1459
1641
  async function setupToolCallingObservations(config, testedModelIds, correlationId, deps) {
1460
1642
  const checkedAt = new Date().toISOString();
@@ -1470,7 +1652,7 @@ async function setupToolCallingObservations(config, testedModelIds, correlationI
1470
1652
  const provider = config.providers.find((candidate) => candidate.modelId === modelId);
1471
1653
  // A model without a provider stays unverified; that conclusion takes the same log line below
1472
1654
  // as every probe result instead of being recorded silently.
1473
- const status = provider === undefined
1655
+ const probeStatus = provider === undefined
1474
1656
  ? "unverified"
1475
1657
  : await probeGatewayToolCalling(config, provider, undefined, (error) => {
1476
1658
  reportSetupVerificationFailure(deps, error, correlationId, "gateway.setup.tool-calling-probe");
@@ -1479,6 +1661,11 @@ async function setupToolCallingObservations(config, testedModelIds, correlationI
1479
1661
  capability: findConfiguredCapability(config, modelId),
1480
1662
  correlationId: correlationId ?? UNKNOWN_CORRELATION_ID,
1481
1663
  });
1664
+ // A `transient` probe answer (408/429/5xx-except-501, `transientGatewayStatus`) proves
1665
+ // nothing about the model either way and must never be stored or logged as a verdict: the
1666
+ // closed status vocabulary here and on the `gateway.tool-calling.verification` activity-log
1667
+ // line stays exactly "verified" | "unsupported" | "unverified" (PR #3602 review).
1668
+ const status = probeStatus === "transient" ? "unverified" : probeStatus;
1482
1669
  observations[index] = {
1483
1670
  modelId,
1484
1671
  status,
@@ -3315,6 +3502,8 @@ function temporaryChatAdmission(input, candidateModels, candidateConfig) {
3315
3502
  },
3316
3503
  configuredModelIds: candidateModels.chatModelIds,
3317
3504
  unverifiedModelIds: candidateModels.chatModelIds,
3505
+ skippedModelIds: [],
3506
+ droppedModelIds: [],
3318
3507
  };
3319
3508
  }
3320
3509
  function temporaryGatewaySetupFailure(error) {
@@ -3327,10 +3516,15 @@ function definitiveGatewaySetupFailure(error) {
3327
3516
  }
3328
3517
  async function admitChatCandidates(input, candidateModels, candidateConfig) {
3329
3518
  const testResult = normalizeSetupTestResult(await input.tester(candidateConfig, candidateModels.chatModelIds));
3519
+ const unverifiedModelIds = testResult.unverifiedModelIds ?? [];
3330
3520
  return {
3331
3521
  testResult,
3332
- configuredModelIds: testResult.testedModelIds,
3333
- unverifiedModelIds: [],
3522
+ // A candidate kept unverified (timeout/transport) is still CONFIGURED, exactly like an
3523
+ // asserted embedding model that failed its probe (#3591).
3524
+ configuredModelIds: [...testResult.testedModelIds, ...unverifiedModelIds],
3525
+ unverifiedModelIds,
3526
+ skippedModelIds: testResult.skippedModelIds ?? [],
3527
+ droppedModelIds: testResult.droppedModelIds ?? [],
3334
3528
  };
3335
3529
  }
3336
3530
  function toolCallingObservationMap(observations) {
@@ -3462,6 +3656,30 @@ function reportUnusableDiscoveredModels(diagnostics, correlationId, unsupported,
3462
3656
  droppedEmbeddingModelCount: dropped,
3463
3657
  });
3464
3658
  }
3659
+ // Chat counterpart of `reportUnusableDiscoveredModels`, emitted separately because the chat smoke
3660
+ // test itself decides whether setup fails closed (an all-rejected gateway throws before this point
3661
+ // is ever reached) — see `verifySetupCandidate`. Body-free: counts only, never a model id (#3591).
3662
+ function reportChatSmokeAdmission(diagnostics, correlationId, chatAdmission) {
3663
+ const unverified = chatAdmission.unverifiedModelIds.length;
3664
+ const dropped = chatAdmission.droppedModelIds.length;
3665
+ if (unverified === 0 && dropped === 0)
3666
+ return;
3667
+ emitServerDiagnostic(diagnostics, {
3668
+ correlationId: correlationId ?? UNKNOWN_CORRELATION_ID,
3669
+ timestamp: new Date().toISOString(),
3670
+ operation: "POST /api/gateway/setup",
3671
+ source: "gateway-setup.discovery",
3672
+ errorClass: "GatewayDiscoveryUnusableModels",
3673
+ message: "Setup kept chat candidates the smoke test never got an answer from and dropped candidates the gateway answered and rejected.",
3674
+ code: "GATEWAY_DISCOVERY_UNUSABLE_MODELS",
3675
+ unverifiedChatModelCount: unverified,
3676
+ droppedChatModelCount: dropped,
3677
+ // How many of the unverified candidates the round's deadline never tried, and the deadline
3678
+ // that applied, so a skipped model is not mistaken for one that timed out (PR #3602 review).
3679
+ skippedChatModelCount: chatAdmission.skippedModelIds.length,
3680
+ chatSmokeRoundDeadlineMs: CHAT_SMOKE_ROUND_DEADLINE_MS,
3681
+ });
3682
+ }
3465
3683
  // KEIKO-0884 (#3333): every non-public egress target class (private, link-local, metadata)
3466
3684
  // requires an explicit env opt-in to be accepted by Gateway Setup; loopback is the only class
3467
3685
  // silently accepted with no configuration signal, no log line, and no opt-in trail — a deliberate
@@ -3516,6 +3734,7 @@ async function verifySetupCandidate(input) {
3516
3734
  // record of what discovery refused is most valuable for exactly that failed attempt.
3517
3735
  reportUnusableDiscoveredModels(input.diagnostics, input.correlationId, candidateModels.unsupportedModels ?? [], embeddingAdmission);
3518
3736
  const chatAdmission = await admitChatCandidatesOrDefer(input, candidateModels, admittedModels, candidateConfig, embeddingAdmission);
3737
+ reportChatSmokeAdmission(input.diagnostics, input.correlationId, chatAdmission);
3519
3738
  return verifiedSetupFromChatAdmission(input, candidateModels, admittedModels, candidateConfig, embeddingAdmission, chatAdmission);
3520
3739
  }
3521
3740
  function verifiedSetupFromChatAdmission(input, candidateModels, admittedModels, candidateConfig, embeddingAdmission, chatAdmission) {
@@ -3543,6 +3762,9 @@ function verifiedSetupResult(rawConfig, config, testResult, candidateModels, emb
3543
3762
  ...(chatAdmission.unverifiedModelIds.length > 0
3544
3763
  ? { unverifiedChatModelIds: chatAdmission.unverifiedModelIds }
3545
3764
  : {}),
3765
+ ...(chatAdmission.droppedModelIds.length > 0
3766
+ ? { droppedChatModelIds: chatAdmission.droppedModelIds }
3767
+ : {}),
3546
3768
  };
3547
3769
  }
3548
3770
  // KEIKO-0497 (#2901): configuring the gateway points the product at an outbound endpoint and can
@@ -3667,6 +3889,9 @@ function setupSuccessResult(config, testedModelIds, skippedModelIds, discoveryRe
3667
3889
  ...(discoveryReport.unverifiedChatModelIds !== undefined
3668
3890
  ? { unverifiedChatModelIds: discoveryReport.unverifiedChatModelIds }
3669
3891
  : {}),
3892
+ ...(discoveryReport.droppedChatModelIds !== undefined
3893
+ ? { droppedChatModelIds: discoveryReport.droppedChatModelIds }
3894
+ : {}),
3670
3895
  providerCount: config.providers.length,
3671
3896
  models: listConfiguredCapabilities(config),
3672
3897
  config: toSafeObject(config),
@@ -3712,6 +3937,9 @@ const TEMPORARY_SETUP_ERROR_CODES = new Set([
3712
3937
  "UND_ERR_HEADERS_TIMEOUT",
3713
3938
  "UND_ERR_SOCKET",
3714
3939
  ERROR_CODES.TIMEOUT,
3940
+ // The per-candidate smoke deadline firing during the gateway's retry backoff (PR #3602 review):
3941
+ // a whole round that ends this way is deferred exactly like one that timed out.
3942
+ ERROR_CODES.CANCELLED,
3715
3943
  ]);
3716
3944
  function safeErrorProperty(error, property) {
3717
3945
  if ((typeof error !== "object" || error === null) && typeof error !== "function") {
@@ -3852,6 +4080,9 @@ function finalizeVerifiedCandidate(verified, current, deps, gatewayConfig, reque
3852
4080
  ...(verified.unverifiedChatModelIds !== undefined
3853
4081
  ? { unverifiedChatModelIds: verified.unverifiedChatModelIds }
3854
4082
  : {}),
4083
+ ...(verified.droppedChatModelIds !== undefined
4084
+ ? { droppedChatModelIds: verified.droppedChatModelIds }
4085
+ : {}),
3855
4086
  });
3856
4087
  }
3857
4088
  async function trySetupCandidate(baseUrl, request, deps, gatewayConfig, seams, current) {
@@ -1,11 +1,12 @@
1
1
  import { type EnvSource, type GatewayConfig, type GatewaySpendReservation, type ModelCapability, type ModelProviderConfig, type UsageMetadata } from "@oscharko-dev/keiko-model-gateway";
2
- export type GatewayToolCallingProbeStatus = "verified" | "unsupported" | "unverified";
2
+ export type GatewayToolCallingProbeStatus = "verified" | "unsupported" | "unverified" | "transient";
3
3
  export type GatewayToolCallingProbeFailureReporter = (error: unknown) => void;
4
4
  export interface GatewayProbeSpendContext {
5
5
  readonly env: EnvSource;
6
6
  readonly capability: ModelCapability | undefined;
7
7
  readonly correlationId: string;
8
8
  }
9
+ export declare function transientGatewayStatus(status: number): boolean;
9
10
  export declare function reserveGatewayProbeSpend(provider: ModelProviderConfig, context: GatewayProbeSpendContext | undefined): GatewaySpendReservation | undefined;
10
11
  export declare function settleGatewayProbeSpend(reservation: GatewaySpendReservation | undefined, usage: UsageMetadata | undefined): void;
11
12
  export declare function admittedGatewayProbeOutputLimit(reservation: GatewaySpendReservation | undefined, context: GatewayProbeSpendContext | undefined): {
@@ -1 +1 @@
1
- {"version":3,"file":"gateway-tool-calling-probe.d.ts","sourceRoot":"","sources":["../src/gateway-tool-calling-probe.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,SAAS,EA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E,OAAO,KAAK,EACxB,aAAa,CAAC,EAAE,sCAAsC,EACtD,KAAK,CAAC,EAAE,wBAAwB,GAC/B,OAAO,CAAC,6BAA6B,CAAC,CAOxC"}
@@ -32,13 +32,20 @@ function hasReadinessArguments(value) {
32
32
  return false;
33
33
  }
34
34
  }
35
+ // A gateway at peak load answers 408/429/5xx for a while; that is no verdict on the model, and a
36
+ // Workbench that treated it as one locked itself out for hours (#3591 review). 501 (not
37
+ // implemented) is the one 5xx that IS a verdict.
38
+ export function transientGatewayStatus(status) {
39
+ return status === 408 || status === 429 || (status >= 500 && status !== 501);
40
+ }
35
41
  function rejectedStatus(response) {
36
- return response.status === 400 ||
42
+ if (response.status === 400 ||
37
43
  response.status === 404 ||
38
44
  response.status === 422 ||
39
- response.status === 501
40
- ? "unsupported"
41
- : "unverified";
45
+ response.status === 501) {
46
+ return "unsupported";
47
+ }
48
+ return transientGatewayStatus(response.status) ? "transient" : "unverified";
42
49
  }
43
50
  function toolCallingBody() {
44
51
  return {
@@ -4,7 +4,8 @@ import type { UiHandlerDeps } from "../deps.js";
4
4
  import type { ServerLogSink } from "../observability/server-log.js";
5
5
  import { type GitDeliveryExecutionSeams } from "./execution.js";
6
6
  import { type GitDeliverySignatureRequirement } from "./branchProtectionPreflight.js";
7
- export type GitDeliveryCommitErrorCode = "GIT_DELIVERY_COMMIT_BAD_REQUEST" | "GIT_DELIVERY_COMMIT_PAYLOAD_TOO_LARGE" | "GIT_DELIVERY_COMMIT_FORBIDDEN_PAYLOAD" | "GIT_DELIVERY_COMMIT_DRAFT_FAILED" | "GIT_DELIVERY_COMMIT_DRAFT_INVALID_OUTPUT" | "GIT_DELIVERY_COMMIT_DRAFT_MODEL_UNAVAILABLE" | "GIT_DELIVERY_COMMIT_DRAFT_NO_CHANGES" | "GIT_DELIVERY_COMMIT_UNKNOWN_PROJECT" | "GIT_DELIVERY_COMMIT_WORKTREE_UNAVAILABLE";
7
+ export type GitDeliveryCommitErrorCode = "GIT_DELIVERY_COMMIT_BAD_REQUEST" | "GIT_DELIVERY_COMMIT_PAYLOAD_TOO_LARGE" | "GIT_DELIVERY_COMMIT_FORBIDDEN_PAYLOAD" | "GIT_DELIVERY_COMMIT_DRAFT_FAILED" | "GIT_DELIVERY_COMMIT_DRAFT_INVALID_OUTPUT" | "GIT_DELIVERY_COMMIT_DRAFT_OUTPUT_EXHAUSTED" | "GIT_DELIVERY_COMMIT_DRAFT_TIMED_OUT" | "GIT_DELIVERY_COMMIT_DRAFT_CANCELLED" | "GIT_DELIVERY_COMMIT_DRAFT_MODEL_UNAVAILABLE" | "GIT_DELIVERY_COMMIT_DRAFT_NO_CHANGES" | "GIT_DELIVERY_COMMIT_UNKNOWN_PROJECT" | "GIT_DELIVERY_COMMIT_WORKTREE_UNAVAILABLE";
8
+ export declare const COMMIT_DRAFT_MAX_OUTPUT_TOKENS = 4000;
8
9
  export interface GitDeliveryCommitRouteOptions {
9
10
  readonly execution?: GitDeliveryExecutionSeams;
10
11
  readonly messagePolicy?: GitCommitMessagePolicy;
@@ -1 +1 @@
1
- {"version":3,"file":"commitRoutes.d.ts","sourceRoot":"","sources":["../../src/gitDelivery/commitRoutes.ts"],"names":[],"mappings":"AA6BA,OAAO,KAAK,EACV,sBAAsB,EACtB,uBAAuB,EACvB,sBAAsB,EACtB,0BAA0B,EAC1B,wBAAwB,EACxB,yBAAyB,EAE1B,MAAM,+BAA+B,CAAC;AAoBvC,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC/E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAgBpE,OAAO,EAUL,KAAK,yBAAyB,EAC/B,MAAM,gBAAgB,CAAC;AAaxB,OAAO,EAGL,KAAK,+BAA+B,EACrC,MAAM,gCAAgC,CAAC;AAIxC,MAAM,MAAM,0BAA0B,GAClC,iCAAiC,G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