@oscharko-dev/keiko 0.3.12 → 0.3.13

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 (152) hide show
  1. package/dist/ui/csp-hashes.json +13 -13
  2. package/dist/ui/static/404.html +1 -1
  3. package/dist/ui/static/__next.__PAGE__.txt +2 -2
  4. package/dist/ui/static/__next._full.txt +3 -3
  5. package/dist/ui/static/__next._head.txt +1 -1
  6. package/dist/ui/static/__next._index.txt +1 -1
  7. package/dist/ui/static/__next._tree.txt +1 -1
  8. package/dist/ui/static/_next/static/chunks/{0ovebg0sbcqct.js → 089ft_ee-2y20.js} +1 -1
  9. package/dist/ui/static/_next/static/chunks/09ifk61aybcwe.js +1 -0
  10. package/dist/ui/static/_next/static/chunks/{07kp3rvh_lwpl.js → 26sy339azhbd8.js} +1 -1
  11. package/dist/ui/static/_next/static/chunks/2bshxlpms4hq2.js +1 -0
  12. package/dist/ui/static/_next/static/chunks/{2ohow-fui5d_w.js → 2c9gq9vpyd9sm.js} +1 -1
  13. package/dist/ui/static/_next/static/chunks/{3mw_ni1a9rykb.js → 2iqsdgq5z7zi-.js} +1 -1
  14. package/dist/ui/static/_next/static/chunks/{0d5rtaf3-jc-x.js → 2iuxjus3qppec.js} +1 -1
  15. package/dist/ui/static/_next/static/chunks/2t0ktf1dxwv0_.js +1 -0
  16. package/dist/ui/static/_not-found/__next._full.txt +1 -1
  17. package/dist/ui/static/_not-found/__next._head.txt +1 -1
  18. package/dist/ui/static/_not-found/__next._index.txt +1 -1
  19. package/dist/ui/static/_not-found/__next._not-found.__PAGE__.txt +1 -1
  20. package/dist/ui/static/_not-found/__next._not-found.txt +1 -1
  21. package/dist/ui/static/_not-found/__next._tree.txt +1 -1
  22. package/dist/ui/static/_not-found.html +1 -1
  23. package/dist/ui/static/_not-found.txt +1 -1
  24. package/dist/ui/static/atlassian-connectors/__next._full.txt +5 -5
  25. package/dist/ui/static/atlassian-connectors/__next._head.txt +1 -1
  26. package/dist/ui/static/atlassian-connectors/__next._index.txt +1 -1
  27. package/dist/ui/static/atlassian-connectors/__next._tree.txt +1 -1
  28. package/dist/ui/static/atlassian-connectors/__next.atlassian-connectors.__PAGE__.txt +2 -2
  29. package/dist/ui/static/atlassian-connectors/__next.atlassian-connectors.txt +2 -2
  30. package/dist/ui/static/atlassian-connectors.html +1 -1
  31. package/dist/ui/static/atlassian-connectors.txt +5 -5
  32. package/dist/ui/static/index.html +1 -1
  33. package/dist/ui/static/index.txt +3 -3
  34. package/dist/ui/static/launch/__next._full.txt +3 -3
  35. package/dist/ui/static/launch/__next._head.txt +1 -1
  36. package/dist/ui/static/launch/__next._index.txt +1 -1
  37. package/dist/ui/static/launch/__next._tree.txt +1 -1
  38. package/dist/ui/static/launch/__next.launch.__PAGE__.txt +2 -2
  39. package/dist/ui/static/launch/__next.launch.txt +1 -1
  40. package/dist/ui/static/launch.html +1 -1
  41. package/dist/ui/static/launch.txt +3 -3
  42. package/dist/ui/static/local-knowledge/__next._full.txt +3 -3
  43. package/dist/ui/static/local-knowledge/__next._head.txt +1 -1
  44. package/dist/ui/static/local-knowledge/__next._index.txt +1 -1
  45. package/dist/ui/static/local-knowledge/__next._tree.txt +1 -1
  46. package/dist/ui/static/local-knowledge/__next.local-knowledge.__PAGE__.txt +2 -2
  47. package/dist/ui/static/local-knowledge/__next.local-knowledge.txt +1 -1
  48. package/dist/ui/static/local-knowledge/capsule/__next._full.txt +5 -5
  49. package/dist/ui/static/local-knowledge/capsule/__next._head.txt +1 -1
  50. package/dist/ui/static/local-knowledge/capsule/__next._index.txt +1 -1
  51. package/dist/ui/static/local-knowledge/capsule/__next._tree.txt +1 -1
  52. package/dist/ui/static/local-knowledge/capsule/__next.local-knowledge.capsule.__PAGE__.txt +2 -2
  53. package/dist/ui/static/local-knowledge/capsule/__next.local-knowledge.capsule.txt +2 -2
  54. package/dist/ui/static/local-knowledge/capsule/__next.local-knowledge.txt +1 -1
  55. package/dist/ui/static/local-knowledge/capsule.html +1 -1
  56. package/dist/ui/static/local-knowledge/capsule.txt +5 -5
  57. package/dist/ui/static/local-knowledge.html +1 -1
  58. package/dist/ui/static/local-knowledge.txt +3 -3
  59. package/node_modules/@oscharko-dev/keiko-cli/package.json +13 -13
  60. package/node_modules/@oscharko-dev/keiko-connectors/package.json +3 -3
  61. package/node_modules/@oscharko-dev/keiko-contracts/dist/gateway.d.ts +43 -0
  62. package/node_modules/@oscharko-dev/keiko-contracts/dist/gateway.d.ts.map +1 -1
  63. package/node_modules/@oscharko-dev/keiko-contracts/dist/gateway.js +47 -0
  64. package/node_modules/@oscharko-dev/keiko-contracts/dist/index.d.ts +4 -4
  65. package/node_modules/@oscharko-dev/keiko-contracts/dist/index.d.ts.map +1 -1
  66. package/node_modules/@oscharko-dev/keiko-contracts/dist/index.js +3 -3
  67. package/node_modules/@oscharko-dev/keiko-contracts/package.json +1 -1
  68. package/node_modules/@oscharko-dev/keiko-evaluations/package.json +9 -9
  69. package/node_modules/@oscharko-dev/keiko-evidence/dist/version.d.ts +1 -1
  70. package/node_modules/@oscharko-dev/keiko-evidence/dist/version.js +1 -1
  71. package/node_modules/@oscharko-dev/keiko-evidence/package.json +4 -4
  72. package/node_modules/@oscharko-dev/keiko-git/package.json +1 -1
  73. package/node_modules/@oscharko-dev/keiko-harness/dist/version.d.ts +1 -1
  74. package/node_modules/@oscharko-dev/keiko-harness/dist/version.js +1 -1
  75. package/node_modules/@oscharko-dev/keiko-harness/package.json +6 -6
  76. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/version.d.ts +1 -1
  77. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/version.js +1 -1
  78. package/node_modules/@oscharko-dev/keiko-local-knowledge/package.json +5 -5
  79. package/node_modules/@oscharko-dev/keiko-memory-capture/dist/version.d.ts +1 -1
  80. package/node_modules/@oscharko-dev/keiko-memory-capture/dist/version.js +1 -1
  81. package/node_modules/@oscharko-dev/keiko-memory-capture/package.json +3 -3
  82. package/node_modules/@oscharko-dev/keiko-memory-consolidation/dist/version.d.ts +1 -1
  83. package/node_modules/@oscharko-dev/keiko-memory-consolidation/dist/version.js +1 -1
  84. package/node_modules/@oscharko-dev/keiko-memory-consolidation/package.json +3 -3
  85. package/node_modules/@oscharko-dev/keiko-memory-governance/dist/version.d.ts +1 -1
  86. package/node_modules/@oscharko-dev/keiko-memory-governance/dist/version.js +1 -1
  87. package/node_modules/@oscharko-dev/keiko-memory-governance/package.json +3 -3
  88. package/node_modules/@oscharko-dev/keiko-memory-retrieval/dist/version.d.ts +1 -1
  89. package/node_modules/@oscharko-dev/keiko-memory-retrieval/dist/version.js +1 -1
  90. package/node_modules/@oscharko-dev/keiko-memory-retrieval/package.json +3 -3
  91. package/node_modules/@oscharko-dev/keiko-memory-vault/dist/version.d.ts +1 -1
  92. package/node_modules/@oscharko-dev/keiko-memory-vault/dist/version.js +1 -1
  93. package/node_modules/@oscharko-dev/keiko-memory-vault/package.json +3 -3
  94. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/version.d.ts +1 -1
  95. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/version.js +1 -1
  96. package/node_modules/@oscharko-dev/keiko-model-gateway/package.json +3 -3
  97. package/node_modules/@oscharko-dev/keiko-quality-intelligence/package.json +3 -3
  98. package/node_modules/@oscharko-dev/keiko-sandbox/package.json +2 -2
  99. package/node_modules/@oscharko-dev/keiko-sdk/package.json +9 -9
  100. package/node_modules/@oscharko-dev/keiko-security/dist/version.d.ts +1 -1
  101. package/node_modules/@oscharko-dev/keiko-security/dist/version.js +1 -1
  102. package/node_modules/@oscharko-dev/keiko-security/package.json +2 -2
  103. package/node_modules/@oscharko-dev/keiko-server/dist/deps.d.ts +4 -1
  104. package/node_modules/@oscharko-dev/keiko-server/dist/deps.d.ts.map +1 -1
  105. package/node_modules/@oscharko-dev/keiko-server/dist/deps.js +1 -0
  106. package/node_modules/@oscharko-dev/keiko-server/dist/diagnostics-log.d.ts +4 -0
  107. package/node_modules/@oscharko-dev/keiko-server/dist/diagnostics-log.d.ts.map +1 -1
  108. package/node_modules/@oscharko-dev/keiko-server/dist/gateway-setup.d.ts.map +1 -1
  109. package/node_modules/@oscharko-dev/keiko-server/dist/gateway-setup.js +298 -51
  110. package/node_modules/@oscharko-dev/keiko-server/package.json +21 -21
  111. package/node_modules/@oscharko-dev/keiko-tools/dist/version.d.ts +1 -1
  112. package/node_modules/@oscharko-dev/keiko-tools/dist/version.js +1 -1
  113. package/node_modules/@oscharko-dev/keiko-tools/package.json +5 -5
  114. package/node_modules/@oscharko-dev/keiko-verification/package.json +5 -5
  115. package/node_modules/@oscharko-dev/keiko-workflows/package.json +10 -10
  116. package/node_modules/@oscharko-dev/keiko-workspace/dist/version.d.ts +1 -1
  117. package/node_modules/@oscharko-dev/keiko-workspace/dist/version.js +1 -1
  118. package/node_modules/@oscharko-dev/keiko-workspace/package.json +3 -3
  119. package/package.json +25 -25
  120. package/release-impact.catalog.json +53 -0
  121. package/vendor/{oscharko-dev-keiko-cli-0.3.12.tgz → oscharko-dev-keiko-cli-0.3.13.tgz} +0 -0
  122. package/vendor/{oscharko-dev-keiko-connectors-0.3.12.tgz → oscharko-dev-keiko-connectors-0.3.13.tgz} +0 -0
  123. package/vendor/oscharko-dev-keiko-contracts-0.3.13.tgz +0 -0
  124. package/vendor/{oscharko-dev-keiko-evaluations-0.3.12.tgz → oscharko-dev-keiko-evaluations-0.3.13.tgz} +0 -0
  125. package/vendor/{oscharko-dev-keiko-evidence-0.3.12.tgz → oscharko-dev-keiko-evidence-0.3.13.tgz} +0 -0
  126. package/vendor/{oscharko-dev-keiko-git-0.3.12.tgz → oscharko-dev-keiko-git-0.3.13.tgz} +0 -0
  127. package/vendor/{oscharko-dev-keiko-harness-0.3.12.tgz → oscharko-dev-keiko-harness-0.3.13.tgz} +0 -0
  128. package/vendor/{oscharko-dev-keiko-local-knowledge-0.3.12.tgz → oscharko-dev-keiko-local-knowledge-0.3.13.tgz} +0 -0
  129. package/vendor/{oscharko-dev-keiko-memory-capture-0.3.12.tgz → oscharko-dev-keiko-memory-capture-0.3.13.tgz} +0 -0
  130. package/vendor/{oscharko-dev-keiko-memory-consolidation-0.3.12.tgz → oscharko-dev-keiko-memory-consolidation-0.3.13.tgz} +0 -0
  131. package/vendor/oscharko-dev-keiko-memory-governance-0.3.13.tgz +0 -0
  132. package/vendor/{oscharko-dev-keiko-memory-retrieval-0.3.12.tgz → oscharko-dev-keiko-memory-retrieval-0.3.13.tgz} +0 -0
  133. package/vendor/{oscharko-dev-keiko-memory-vault-0.3.12.tgz → oscharko-dev-keiko-memory-vault-0.3.13.tgz} +0 -0
  134. package/vendor/{oscharko-dev-keiko-model-gateway-0.3.12.tgz → oscharko-dev-keiko-model-gateway-0.3.13.tgz} +0 -0
  135. package/vendor/{oscharko-dev-keiko-quality-intelligence-0.3.12.tgz → oscharko-dev-keiko-quality-intelligence-0.3.13.tgz} +0 -0
  136. package/vendor/{oscharko-dev-keiko-sandbox-0.3.12.tgz → oscharko-dev-keiko-sandbox-0.3.13.tgz} +0 -0
  137. package/vendor/{oscharko-dev-keiko-sdk-0.3.12.tgz → oscharko-dev-keiko-sdk-0.3.13.tgz} +0 -0
  138. package/vendor/{oscharko-dev-keiko-security-0.3.12.tgz → oscharko-dev-keiko-security-0.3.13.tgz} +0 -0
  139. package/vendor/oscharko-dev-keiko-server-0.3.13.tgz +0 -0
  140. package/vendor/{oscharko-dev-keiko-tools-0.3.12.tgz → oscharko-dev-keiko-tools-0.3.13.tgz} +0 -0
  141. package/vendor/{oscharko-dev-keiko-verification-0.3.12.tgz → oscharko-dev-keiko-verification-0.3.13.tgz} +0 -0
  142. package/vendor/{oscharko-dev-keiko-workflows-0.3.12.tgz → oscharko-dev-keiko-workflows-0.3.13.tgz} +0 -0
  143. package/vendor/{oscharko-dev-keiko-workspace-0.3.12.tgz → oscharko-dev-keiko-workspace-0.3.13.tgz} +0 -0
  144. package/dist/ui/static/_next/static/chunks/1ziptu5xlzq_p.js +0 -1
  145. package/dist/ui/static/_next/static/chunks/2bpupnd-k7bgu.js +0 -1
  146. package/dist/ui/static/_next/static/chunks/2sji-23jqwpol.js +0 -1
  147. package/vendor/oscharko-dev-keiko-contracts-0.3.12.tgz +0 -0
  148. package/vendor/oscharko-dev-keiko-memory-governance-0.3.12.tgz +0 -0
  149. package/vendor/oscharko-dev-keiko-server-0.3.12.tgz +0 -0
  150. /package/dist/ui/static/_next/static/{B2yI3WR2eQz3OFEGkWCnI → iwhpaHGb663ka5R3lhZBj}/_buildManifest.js +0 -0
  151. /package/dist/ui/static/_next/static/{B2yI3WR2eQz3OFEGkWCnI → iwhpaHGb663ka5R3lhZBj}/_clientMiddlewareManifest.js +0 -0
  152. /package/dist/ui/static/_next/static/{B2yI3WR2eQz3OFEGkWCnI → iwhpaHGb663ka5R3lhZBj}/_ssgManifest.js +0 -0
@@ -5,8 +5,8 @@
5
5
  import { randomUUID } from "node:crypto";
6
6
  import { existsSync, readFileSync } from "node:fs";
7
7
  import { resolveEvidenceDir } from "@oscharko-dev/keiko-evidence";
8
- import { apiKeyHeaderValue, ConfigInvalidError, DEFAULT_API_KEY_HEADER_NAME, ERROR_CODES, Gateway, GATEWAY_CONFIG_SCHEMA_VERSION, createDefaultChatCapability, createDefaultEmbeddingCapability, findConfiguredCapability, GatewayError, isLikelyEmbeddingModelId, isVoiceCapability, listConfiguredCapabilities, loadConfigFromFile, modelSupportsRealtimeVoice, modelSupportsSpeechInput, modelSupportsSpeechOutput, normalizeApiKeyHeaderName, parseGatewayConfig, selectRealtimeVoiceModel, selectSpeechOutputModel, selectSpeechToTextModel, toSafeObject, validateBaseUrl, PROVIDER_ENDPOINT_STYLES, REALTIME_AUTH_MODES, VOICE_PROVIDER_LOCALITIES, } from "@oscharko-dev/keiko-model-gateway";
9
- import { GATEWAY_SETUP_AUDIT_SCHEMA_VERSION, validateGatewaySetupAuditRecord, } from "@oscharko-dev/keiko-contracts";
8
+ import { apiKeyHeaderValue, ConfigInvalidError, DEFAULT_API_KEY_HEADER_NAME, ERROR_CODES, Gateway, GATEWAY_CONFIG_SCHEMA_VERSION, createDefaultChatCapability, createDefaultEmbeddingCapability, findConfiguredCapability, GatewayError, isLikelyEmbeddingModelId, isVoiceCapability, listConfiguredCapabilities, loadConfigFromFile, modelSupportsRealtimeVoice, modelSupportsSpeechInput, modelSupportsSpeechOutput, normalizeApiKeyHeaderName, parseGatewayConfig, requestOpenAIEmbedding, selectRealtimeVoiceModel, selectSpeechOutputModel, selectSpeechToTextModel, toSafeObject, validateBaseUrl, PROVIDER_ENDPOINT_STYLES, REALTIME_AUTH_MODES, VOICE_PROVIDER_LOCALITIES, } from "@oscharko-dev/keiko-model-gateway";
9
+ import { boundedUnsupportedReason, GATEWAY_SETUP_AUDIT_SCHEMA_VERSION, isChatCompatibleDeclaredMode, modelKindForDeclaredMode, validateGatewaySetupAuditRecord, } from "@oscharko-dev/keiko-contracts";
10
10
  import { classifyOutboundHost, gatewayFetch, readJsonCapped, } from "@oscharko-dev/keiko-model-gateway/internal/http";
11
11
  import { errorBody } from "./routes.js";
12
12
  import { currentGatewayConfig, currentGatewayEgressConfig } from "./deps.js";
@@ -28,7 +28,11 @@ const DEPLOYMENT_SMOKE_TIMEOUT_MS = 30_000;
28
28
  const FIGMA_CREDENTIAL_SMOKE_TIMEOUT_MS = 15_000;
29
29
  const FIGMA_CREDENTIAL_SMOKE_RESPONSE_BYTES = 64_000;
30
30
  const SETUP_SMOKE_CONCURRENCY = 4;
31
- const CHAT_COMPATIBLE_MODES = new Set(["chat", "completion", "responses"]);
31
+ // The chat vocabulary lives in the contract table (modelKindForDeclaredMode); this predicate
32
+ // only adapts it to the local "no declaration" case.
33
+ function declaresChatCompatibleMode(mode) {
34
+ return mode !== undefined && isChatCompatibleDeclaredMode(mode);
35
+ }
32
36
  const IMAGE_INPUT_ID_PATTERNS = [
33
37
  /(?:^|[-_/. ])(?:vision|multimodal|multi-modal|llava|pixtral|omni|gpt-4o)(?:$|[-_/. ])/i,
34
38
  /(?:^|[-_/. ])vl(?:$|[-_/. ])/i,
@@ -540,7 +544,7 @@ function metadataFromDiscoveryItem(item) {
540
544
  // entries as the conversation default (keiko-contracts conversationDefaultRank). Only ever
541
545
  // true — declared NON-chat modes never reach the chat list, and "no mode" is no signal.
542
546
  const mode = modelModeFromDiscoveryItem(item);
543
- const chatModeDeclared = mode !== undefined && CHAT_COMPATIBLE_MODES.has(mode);
547
+ const chatModeDeclared = declaresChatCompatibleMode(mode);
544
548
  return {
545
549
  ...(contextWindow === undefined ? {} : { contextWindow }),
546
550
  ...(maxOutputTokens === undefined ? {} : { maxOutputTokens }),
@@ -866,9 +870,6 @@ function modelModeFromDiscoveryItem(item) {
866
870
  }
867
871
  return undefined;
868
872
  }
869
- function isExplicitlyEmbeddingModel(item) {
870
- return modelModeFromDiscoveryItem(item) === "embedding";
871
- }
872
873
  // Issue #144: exported as part of the discovery-normalization seam so a
873
874
  // sibling test file can drive it with synthetic payloads. Behaviour unchanged
874
875
  // — only the visibility is widened.
@@ -878,8 +879,29 @@ export function isExplicitlyNonChatModel(item) {
878
879
  return true;
879
880
  }
880
881
  const mode = modelModeFromDiscoveryItem(item);
881
- return mode !== undefined && !CHAT_COMPATIBLE_MODES.has(mode);
882
+ return mode !== undefined && !declaresChatCompatibleMode(mode);
883
+ }
884
+ function isUnsupportedEntry(entry) {
885
+ return entry.kind === "unsupported" && entry.reason !== undefined;
886
+ }
887
+ // Classification WITHOUT a declaration: the id heuristic is all a `/models`-only gateway gives us.
888
+ function classifyUndeclaredDiscoveryItem(item, id, metadata) {
889
+ if (isLikelyEmbeddingModelId(id)) {
890
+ return { id, kind: "embedding", supportsImageInput: false, metadata };
891
+ }
892
+ return {
893
+ id,
894
+ kind: "chat",
895
+ supportsImageInput: supportsImageInputFromDiscoveryItem(item, id),
896
+ metadata,
897
+ };
882
898
  }
899
+ // A DECLARED mode is authoritative; the id heuristic is only the no-declaration fallback.
900
+ // Field incident (LiteLLM customer, 2026-08): the old order let a name beat the declaration, so a
901
+ // `mode: "rerank"` endpoint named "bge-reranker-v2-m3" was stored as this gateway's embedding
902
+ // model, bound to every new Knowledge Pod, and indexing wrote zero vectors. Keiko is
903
+ // model-agnostic — the customer hosts whatever models they like, so only the gateway's own
904
+ // statement about a model can decide its role.
883
905
  function classifyDiscoveryItem(item) {
884
906
  if (!isRecord(item)) {
885
907
  return undefined;
@@ -889,22 +911,41 @@ function classifyDiscoveryItem(item) {
889
911
  return undefined;
890
912
  }
891
913
  const metadata = metadataFromDiscoveryItem(item);
892
- if (isExplicitlyEmbeddingModel(item)) {
893
- return { id, kind: "embedding", supportsImageInput: false, metadata };
894
- }
895
- if (isExplicitlyNonChatModel(item)) {
896
- return isLikelyEmbeddingModelId(id)
897
- ? { id, kind: "embedding", supportsImageInput: false, metadata }
898
- : undefined;
899
- }
900
- return isLikelyEmbeddingModelId(id)
901
- ? { id, kind: "embedding", supportsImageInput: false, metadata }
902
- : {
914
+ const declaredMode = modelModeFromDiscoveryItem(item);
915
+ if (declaredMode !== undefined) {
916
+ const role = modelKindForDeclaredMode(declaredMode);
917
+ if (role === "unsupported") {
918
+ // The reason is drawn from a CLOSED vocabulary. A declared mode is gateway-controlled text of
919
+ // unbounded shape; echoing it verbatim would put foreign strings into the diagnostic channel
920
+ // and the setup response, which the redaction rules forbid.
921
+ const reason = boundedUnsupportedReason(declaredMode);
922
+ return { id, kind: "unsupported", supportsImageInput: false, metadata, reason };
923
+ }
924
+ if (role === "embedding") {
925
+ return { id, kind: "embedding", supportsImageInput: false, metadata };
926
+ }
927
+ return {
903
928
  id,
904
929
  kind: "chat",
905
930
  supportsImageInput: supportsImageInputFromDiscoveryItem(item, id),
906
931
  metadata,
907
932
  };
933
+ }
934
+ // No declaration. `capabilities.chat_completion === false` states what the model is NOT, which
935
+ // is not a role: an embedding model legitimately carries it. So the id heuristic still decides,
936
+ // exactly as before — it just cannot fall through to "chat".
937
+ if (isExplicitlyNonChatModel(item)) {
938
+ return isLikelyEmbeddingModelId(id)
939
+ ? { id, kind: "embedding", supportsImageInput: false, metadata }
940
+ : {
941
+ id,
942
+ kind: "unsupported",
943
+ supportsImageInput: false,
944
+ metadata,
945
+ reason: "not-chat-capable",
946
+ };
947
+ }
948
+ return classifyUndeclaredDiscoveryItem(item, id, metadata);
908
949
  }
909
950
  // Issue #144: exported as part of the discovery-normalization seam. Gateway setup now returns
910
951
  // embedding-capable records so setup can persist them for Local Knowledge while keeping them out of
@@ -912,7 +953,8 @@ function classifyDiscoveryItem(item) {
912
953
  // Returns undefined for unknown/non-record/unsupported/malformed input so
913
954
  // callers can drop the entry silently and keep healthy peers.
914
955
  export function modelIdFromDiscoveryItem(item) {
915
- return classifyDiscoveryItem(item)?.id;
956
+ const classified = classifyDiscoveryItem(item);
957
+ return classified === undefined || classified.kind === "unsupported" ? undefined : classified.id;
916
958
  }
917
959
  // Issue #144: exported as part of the discovery-normalization seam. Throws on schema-level
918
960
  // malformation (no data array) and on the "every entry filtered" terminal case so the caller
@@ -921,37 +963,69 @@ export function parseModelDiscovery(payload) {
921
963
  if (!isRecord(payload) || !Array.isArray(payload.data)) {
922
964
  throw new Error("model discovery response must contain a data array");
923
965
  }
924
- const entries = [];
925
- const seen = new Set();
966
+ // First occurrence wins, with ONE exception: a usable entry replaces an unsupported one for the
967
+ // same id. A LiteLLM `model_name` is a routing alias that can front several deployments, and an
968
+ // unusable one listed first must not shadow the usable duplicate behind it.
969
+ const byId = new Map();
926
970
  for (const item of payload.data) {
927
971
  const classified = classifyDiscoveryItem(item);
928
- if (classified !== undefined && !seen.has(classified.id)) {
929
- seen.add(classified.id);
930
- entries.push(classified);
972
+ if (classified === undefined)
973
+ continue;
974
+ const existing = byId.get(classified.id);
975
+ if (existing === undefined ||
976
+ (existing.kind === "unsupported" && classified.kind !== "unsupported")) {
977
+ byId.set(classified.id, classified);
931
978
  }
932
979
  }
980
+ const entries = [...byId.values()];
933
981
  // KEIKO-0325: raise a truncation flag alongside the limited slice so callers can
934
982
  // surface "N of M models discovered; add the rest by deployment name" instead of the
935
983
  // pre-fix silent drop. Kept optional-and-off-by-default so a fitting-within-cap
936
984
  // discovery does not carry a redundant `truncated: false` on the wire.
937
- const wasTruncated = entries.length > MAX_DISCOVERED_MODELS;
938
- const limited = entries.slice(0, MAX_DISCOVERED_MODELS);
939
- if (limited.length === 0) {
940
- throw new Error("model discovery returned no model ids");
941
- }
985
+ // Recognised-but-unusable models are reported, never configured: they get no provider entry and
986
+ // no slot in any selection list, but the operator learns they exist and why they were skipped.
987
+ // They are partitioned BEFORE the cap — a gateway listing 60 audio endpoints ahead of its chat
988
+ // aliases must not push the chat models past MAX_DISCOVERED_MODELS.
989
+ const unsupported = entries.filter(isUnsupportedEntry);
990
+ const usableEntries = entries.filter((entry) => entry.kind !== "unsupported");
991
+ const wasTruncated = usableEntries.length > MAX_DISCOVERED_MODELS;
992
+ const usable = usableEntries.slice(0, MAX_DISCOVERED_MODELS);
993
+ assertDiscoveryYieldedUsableModels(usable, unsupported);
942
994
  return {
943
- modelIds: limited.map((entry) => entry.id),
944
- chatModelIds: limited.filter((entry) => entry.kind === "chat").map((entry) => entry.id),
945
- embeddingModelIds: limited
995
+ modelIds: usable.map((entry) => entry.id),
996
+ chatModelIds: usable.filter((entry) => entry.kind === "chat").map((entry) => entry.id),
997
+ embeddingModelIds: usable
946
998
  .filter((entry) => entry.kind === "embedding")
947
999
  .map((entry) => entry.id),
948
- imageInputModelIds: limited
1000
+ imageInputModelIds: usable
949
1001
  .filter((entry) => entry.kind === "chat" && entry.supportsImageInput)
950
1002
  .map((entry) => entry.id),
951
- modelMetadata: Object.fromEntries(limited.map((entry) => [entry.id, entry.metadata])),
1003
+ modelMetadata: Object.fromEntries(usable.map((entry) => [entry.id, entry.metadata])),
1004
+ ...(unsupported.length > 0
1005
+ ? {
1006
+ unsupportedModels: unsupported.map((entry) => ({
1007
+ id: entry.id,
1008
+ reason: entry.reason,
1009
+ })),
1010
+ }
1011
+ : {}),
952
1012
  ...(wasTruncated ? { truncated: true } : {}),
953
1013
  };
954
1014
  }
1015
+ function assertDiscoveryYieldedUsableModels(usable, unsupported) {
1016
+ if (usable.length > 0)
1017
+ return;
1018
+ const terminal = unsupported.length > 0
1019
+ ? discoveryTerminal("model discovery found only models this gateway declared as unsupported modes", "DISCOVERY_ALL_ENTRIES_UNSUPPORTED")
1020
+ : discoveryTerminal("model discovery returned no model ids", "DISCOVERY_EMPTY");
1021
+ throw terminal;
1022
+ }
1023
+ // Tags a discovery terminal so the caller can tell "this gateway has no /model/info" (fall back to
1024
+ // /models) from "the endpoint answered and the answer is unusable" (surface it). Mirrors the
1025
+ // existing httpStatus tagging on fetch failures.
1026
+ function discoveryTerminal(message, code) {
1027
+ return Object.assign(new Error(message), { discoveryCode: code });
1028
+ }
955
1029
  export function parseModelList(payload) {
956
1030
  return parseModelDiscovery(payload).modelIds;
957
1031
  }
@@ -988,14 +1062,28 @@ async function fetchDiscoveryJson(url, apiKey, apiKeyHeaderName, egress) {
988
1062
  throw new Error("model discovery response was not readable JSON");
989
1063
  }
990
1064
  }
1065
+ // `/model/info` is a LiteLLM management route. Plenty of healthy deployments refuse it — an
1066
+ // ingress that exposes only /v1/*, a virtual key without management scope, a rate-limited proxy —
1067
+ // and they have always set up fine by degrading to the mode-free /models list. Losing mode
1068
+ // enrichment is not a silent failure: a genuinely bad credential still fails the chat smoke test
1069
+ // loudly. So EVERY transport or HTTP outcome falls back, exactly as before.
1070
+ //
1071
+ // Exactly one outcome must NOT fall back: the endpoint answered, Keiko understood every entry, and
1072
+ // every one declared a mode with no lane. Falling back there would re-read the same models from
1073
+ // /models WITHOUT their declarations and hand them to the id heuristic — resurrecting the very
1074
+ // misclassification this change exists to prevent.
1075
+ function modelInfoAnswerIsUnusable(cause) {
1076
+ return (cause?.discoveryCode ===
1077
+ "DISCOVERY_ALL_ENTRIES_UNSUPPORTED");
1078
+ }
991
1079
  async function discoverLiteLlmModelInfo(baseUrl, apiKey, apiKeyHeaderName, egress) {
992
1080
  for (const endpoint of modelInfoEndpointCandidates(baseUrl)) {
993
1081
  try {
994
1082
  return parseModelDiscovery(await fetchDiscoveryJson(endpoint, apiKey, apiKeyHeaderName, egress));
995
1083
  }
996
- catch {
997
- // /model/info is a LiteLLM-specific enrichment endpoint. If it is absent or blocked,
998
- // continue with OpenAI-compatible /models discovery so customer gateways are not broken.
1084
+ catch (cause) {
1085
+ if (modelInfoAnswerIsUnusable(cause) && cause instanceof Error)
1086
+ throw cause;
999
1087
  }
1000
1088
  }
1001
1089
  return undefined;
@@ -1272,6 +1360,63 @@ async function defaultGatewaySetupTester(config, candidateModelIds) {
1272
1360
  }, SETUP_SMOKE_CONCURRENCY);
1273
1361
  return { testedModelIds, responseFormatModelIds };
1274
1362
  }
1363
+ // Field incident (LiteLLM customer, 2026-08): chat models were smoke-tested, embedding models were
1364
+ // persisted on the strength of a classification alone. A model the gateway DECLARES as an embedding
1365
+ // engine but which cannot answer /embeddings was bound to every new Knowledge Pod, and indexing
1366
+ // wrote zero vectors with no earlier signal. One real request per candidate closes that gap; the
1367
+ // four-input space fingerprint stays where it belongs (the pod's first indexing preflight), because
1368
+ // on CPU-served hardware four inputs per model would make setup crawl.
1369
+ const EMBEDDING_PROBE_INPUT = "Keiko embedding setup probe";
1370
+ // One embedding request against the model, using the SAME endpoint protocol the provider will
1371
+ // persist with — an Azure deployment path must not be probed at the OpenAI-compatible URL, or the
1372
+ // probe measures a 404 that production would never see.
1373
+ async function embedOnceForProbe(provider, modelId) {
1374
+ return requestOpenAIEmbedding({
1375
+ endpoint: provider.baseUrl,
1376
+ apiKey: provider.apiKey,
1377
+ ...(provider.apiKeyHeaderName !== undefined
1378
+ ? { apiKeyHeaderName: provider.apiKeyHeaderName }
1379
+ : {}),
1380
+ ...(provider.egress !== undefined ? { egress: provider.egress } : {}),
1381
+ ...(provider.endpointStyle !== undefined ? { endpointStyle: provider.endpointStyle } : {}),
1382
+ ...(provider.apiVersion !== undefined ? { apiVersion: provider.apiVersion } : {}),
1383
+ modelId,
1384
+ input: EMBEDDING_PROBE_INPUT,
1385
+ timeoutMs: provider.timeoutMs,
1386
+ });
1387
+ }
1388
+ // Transient kinds get exactly ONE retry, matching the chat lane's `maxRetries: 1`: a single
1389
+ // rate-limit or cold-start blip must not permanently exclude a working embedding model, and
1390
+ // requestOpenAIEmbedding is a bare transport that does no retrying of its own.
1391
+ const RETRYABLE_PROBE_KINDS = new Set([
1392
+ "rate-limited",
1393
+ "timeout",
1394
+ "transport",
1395
+ ]);
1396
+ // An immediate retry against a gateway that just answered 429 answers 429 again, so it would burn a
1397
+ // request and change nothing. One short pause, matching the chat lane's backoff base.
1398
+ const EMBEDDING_PROBE_RETRY_DELAY_MS = 500;
1399
+ async function defaultGatewayEmbeddingProbe(config, candidateModelIds) {
1400
+ return passingCandidates(candidateModelIds, async (modelId) => {
1401
+ const provider = config.providers.find((entry) => entry.modelId === modelId);
1402
+ if (provider === undefined)
1403
+ throw new Error("embedding candidate has no provider entry");
1404
+ let outcome = await embedOnceForProbe(provider, modelId);
1405
+ if (!outcome.ok && RETRYABLE_PROBE_KINDS.has(outcome.kind)) {
1406
+ await new Promise((resolve) => setTimeout(resolve, EMBEDDING_PROBE_RETRY_DELAY_MS));
1407
+ outcome = await embedOnceForProbe(provider, modelId);
1408
+ }
1409
+ // The per-model verdict is what the operator acts on, and it travels in
1410
+ // droppedEmbeddingModelIds / unverifiedEmbeddingModelIds. passingCandidates drops the
1411
+ // rejection, which is the intended contract here: a failed candidate is not admitted.
1412
+ if (!outcome.ok || outcome.value.vector.length === 0) {
1413
+ throw new Error("embedding probe returned no usable vector");
1414
+ }
1415
+ }, SETUP_SMOKE_CONCURRENCY);
1416
+ }
1417
+ function gatewayEmbeddingProbe(deps) {
1418
+ return deps.gatewayEmbeddingProbe ?? defaultGatewayEmbeddingProbe;
1419
+ }
1275
1420
  function gatewaySetupTester(deps) {
1276
1421
  return deps.gatewaySetupTester ?? defaultGatewaySetupTester;
1277
1422
  }
@@ -2715,6 +2860,9 @@ function normalizeDiscoveryResult(result) {
2715
2860
  // so downstream setup can surface "N of M models discovered" instead of the
2716
2861
  // pre-fix silent drop past MAX_DISCOVERED_MODELS.
2717
2862
  ...(result.truncated === true ? { truncated: true } : {}),
2863
+ ...(result.unsupportedModels !== undefined
2864
+ ? { unsupportedModels: result.unsupportedModels }
2865
+ : {}),
2718
2866
  };
2719
2867
  }
2720
2868
  return normalizeLegacyDiscoveryResult(result);
@@ -2923,6 +3071,61 @@ function reportDiscoveryTruncation(diagnostics, candidateModels) {
2923
3071
  retainedModelCount: candidateModels.modelIds.length,
2924
3072
  });
2925
3073
  }
3074
+ function probeConfigForModels(input, modelIds, smokeTimeoutMs) {
3075
+ return parseGatewayConfig(withInheritedEgress(buildRawConfig(input.baseUrl, input.apiKey, modelIds, candidateProbeOptions(input, smokeTimeoutMs)), input.egress), input.env, linkLocalGatewayOverrideOptions(input.env));
3076
+ }
3077
+ // The candidate config carries only the chat models, so the probe needs its own provider view over
3078
+ // the embedding candidates — same endpoint, credential, protocol and timeout.
3079
+ function embeddingProbeConfigFor(input, candidateModels, smokeTimeoutMs, fallback) {
3080
+ if (candidateModels.embeddingModelIds.length === 0)
3081
+ return fallback;
3082
+ return probeConfigForModels(input, candidateModels.embeddingModelIds, smokeTimeoutMs);
3083
+ }
3084
+ // Probe-gated embedding admission. A NEW candidate must answer a real embedding request before it
3085
+ // is persisted as this gateway's embedding model. A STORED one that fails is RETAINED and reported
3086
+ // unverified: a transient endpoint outage during a re-save must never unpin the embedding model of
3087
+ // every working Knowledge Pod (that would be a worse failure than the one this closes).
3088
+ async function admitEmbeddingCandidates(input, probeConfig, candidates) {
3089
+ if (candidates.length === 0) {
3090
+ return { admitted: candidates, retainedUnverified: [], droppedUnverified: [] };
3091
+ }
3092
+ // Probe-gating applies to every model whose ROLE Keiko inferred. Only an explicit ROLE assertion
3093
+ // is exempt: a stored embedding capability, or an embedding id the client asserted. Deployment
3094
+ // NAMES are deliberately NOT exempt — naming a deployment states its identity, not its role; the
3095
+ // role there still comes from Keiko's own id heuristic, which is exactly what the probe corrects.
3096
+ const asserted = new Set([...input.storedEmbeddingModelIds, ...input.submittedEmbeddingModelIds]);
3097
+ const answered = new Set(await input.embeddingProbe(probeConfig, candidates));
3098
+ const admitted = candidates.filter((id) => answered.has(id) || asserted.has(id));
3099
+ // Split the failures: an asserted model stays configured and is flagged; an inferred one is gone.
3100
+ const failed = candidates.filter((id) => !answered.has(id));
3101
+ return {
3102
+ admitted,
3103
+ retainedUnverified: failed.filter((id) => asserted.has(id)),
3104
+ droppedUnverified: failed.filter((id) => !asserted.has(id)),
3105
+ };
3106
+ }
3107
+ // Body-free counterpart to reportDiscoveryTruncation: counts and reason codes only, never a model
3108
+ // id or an endpoint. Ids belong in the setup RESPONSE, which the operator sees; the diagnostic
3109
+ // channel stays free of gateway inventory.
3110
+ function reportUnusableDiscoveredModels(diagnostics, unsupported, admission) {
3111
+ const retained = admission.retainedUnverified.length;
3112
+ const dropped = admission.droppedUnverified.length;
3113
+ if (unsupported.length === 0 && retained === 0 && dropped === 0)
3114
+ return;
3115
+ emitServerDiagnostic(diagnostics, {
3116
+ correlationId: randomUUID(),
3117
+ timestamp: new Date().toISOString(),
3118
+ operation: "POST /api/gateway/setup",
3119
+ source: "gateway-setup.discovery",
3120
+ errorClass: "GatewayDiscoveryUnusableModels",
3121
+ message: "Setup skipped models the gateway declared as unsupported modes or that failed the embedding probe.",
3122
+ code: "GATEWAY_DISCOVERY_UNUSABLE_MODELS",
3123
+ unsupportedModelCount: unsupported.length,
3124
+ unsupportedReasons: [...new Set(unsupported.map((entry) => entry.reason))].sort((a, b) => a.localeCompare(b)),
3125
+ unverifiedEmbeddingModelCount: retained,
3126
+ droppedEmbeddingModelCount: dropped,
3127
+ });
3128
+ }
2926
3129
  async function verifySetupCandidate(input) {
2927
3130
  // Defence-in-depth: never send the credential to a candidate URL that has not passed the same
2928
3131
  // scheme/credential/loopback validation as the originally submitted base URL.
@@ -2933,17 +3136,36 @@ async function verifySetupCandidate(input) {
2933
3136
  const smokeTimeoutMs = input.deploymentNames.length > 0
2934
3137
  ? DEPLOYMENT_SMOKE_TIMEOUT_MS
2935
3138
  : DISCOVERED_MODEL_SMOKE_TIMEOUT_MS;
2936
- const candidateRawConfig = buildRawConfig(input.baseUrl, input.apiKey, candidateModels.chatModelIds, candidateProbeOptions(input, smokeTimeoutMs));
2937
- const candidateConfig = parseGatewayConfig(withInheritedEgress(candidateRawConfig, input.egress), input.env, linkLocalGatewayOverrideOptions(input.env));
3139
+ const candidateConfig = probeConfigForModels(input, candidateModels.chatModelIds, smokeTimeoutMs);
3140
+ const embeddingAdmission = await admitEmbeddingCandidates(input, embeddingProbeConfigFor(input, candidateModels, smokeTimeoutMs, candidateConfig), candidateModels.embeddingModelIds);
3141
+ const admittedModels = {
3142
+ ...candidateModels,
3143
+ embeddingModelIds: embeddingAdmission.admitted,
3144
+ };
3145
+ // Emitted BEFORE the chat smoke test: the tester throws on an all-rejected gateway, and the
3146
+ // record of what discovery refused is most valuable for exactly that failed attempt.
3147
+ reportUnusableDiscoveredModels(input.diagnostics, candidateModels.unsupportedModels ?? [], embeddingAdmission);
2938
3148
  const testResult = normalizeSetupTestResult(await input.tester(candidateConfig, candidateModels.chatModelIds));
2939
3149
  assertImageInputModelsWereTested(input.imageInputModelIds, testResult.testedModelIds);
2940
- const rawConfigWithOptionalBlocks = finalRawConfigForTestedSetup(input, testResult, candidateModels);
3150
+ const rawConfigWithOptionalBlocks = finalRawConfigForTestedSetup(input, testResult, admittedModels);
2941
3151
  const config = parseGatewayConfig(withInheritedEgress(rawConfigWithOptionalBlocks, input.egress), input.env, linkLocalGatewayOverrideOptions(input.env));
3152
+ return verifiedSetupResult(rawConfigWithOptionalBlocks, config, testResult, candidateModels, embeddingAdmission);
3153
+ }
3154
+ function verifiedSetupResult(rawConfig, config, testResult, candidateModels, embeddingAdmission) {
2942
3155
  return {
2943
- rawConfig: rawConfigWithOptionalBlocks,
3156
+ rawConfig,
2944
3157
  config,
2945
3158
  testedModelIds: testResult.testedModelIds,
2946
- skippedModelIds: skippedModelIdsForSetup(candidateModels.modelIds, testResult.testedModelIds, candidateModels.embeddingModelIds),
3159
+ skippedModelIds: skippedModelIdsForSetup(candidateModels.modelIds, testResult.testedModelIds, embeddingAdmission.admitted),
3160
+ ...(candidateModels.unsupportedModels !== undefined
3161
+ ? { unsupportedModels: candidateModels.unsupportedModels }
3162
+ : {}),
3163
+ ...(embeddingAdmission.retainedUnverified.length > 0
3164
+ ? { unverifiedEmbeddingModelIds: embeddingAdmission.retainedUnverified }
3165
+ : {}),
3166
+ ...(embeddingAdmission.droppedUnverified.length > 0
3167
+ ? { droppedEmbeddingModelIds: embeddingAdmission.droppedUnverified }
3168
+ : {}),
2947
3169
  };
2948
3170
  }
2949
3171
  // KEIKO-0497 (#2901): configuring the gateway points the product at an outbound endpoint and can
@@ -3034,7 +3256,7 @@ function recordGatewaySetupAudit(deps, request, config, outcome) {
3034
3256
  }));
3035
3257
  }
3036
3258
  }
3037
- function setupSuccessResult(config, testedModelIds, skippedModelIds) {
3259
+ function setupSuccessResult(config, testedModelIds, skippedModelIds, discoveryReport = {}) {
3038
3260
  const testedModelId = testedModelIds[0] ?? "unknown";
3039
3261
  return {
3040
3262
  status: 200,
@@ -3043,6 +3265,17 @@ function setupSuccessResult(config, testedModelIds, skippedModelIds) {
3043
3265
  testedModelId,
3044
3266
  testedModelIds,
3045
3267
  skippedModelIds,
3268
+ // The operator learns which models the gateway offered that Keiko will not use, and why —
3269
+ // silence here is what made a misconfigured gateway undiagnosable in the field.
3270
+ ...(discoveryReport.unsupportedModels !== undefined
3271
+ ? { unsupportedModels: discoveryReport.unsupportedModels }
3272
+ : {}),
3273
+ ...(discoveryReport.unverifiedEmbeddingModelIds !== undefined
3274
+ ? { unverifiedEmbeddingModelIds: discoveryReport.unverifiedEmbeddingModelIds }
3275
+ : {}),
3276
+ ...(discoveryReport.droppedEmbeddingModelIds !== undefined
3277
+ ? { droppedEmbeddingModelIds: discoveryReport.droppedEmbeddingModelIds }
3278
+ : {}),
3046
3279
  providerCount: config.providers.length,
3047
3280
  models: listConfiguredCapabilities(config),
3048
3281
  config: toSafeObject(config),
@@ -3204,10 +3437,21 @@ function finalizeVerifiedCandidate(verified, current, deps, gatewayConfig, reque
3204
3437
  : withDiskGatewayEgress(verified.rawConfig, gatewayConfig.storagePath, deps), gatewayConfig.storagePath, deps);
3205
3438
  gatewayConfig.set(verified.config, true);
3206
3439
  recordGatewaySetupAudit(deps, request, verified.config, "candidate-accepted");
3207
- return setupSuccessResult(verified.config, verified.testedModelIds, verified.skippedModelIds);
3440
+ return setupSuccessResult(verified.config, verified.testedModelIds, verified.skippedModelIds, {
3441
+ ...(verified.unsupportedModels !== undefined
3442
+ ? { unsupportedModels: verified.unsupportedModels }
3443
+ : {}),
3444
+ ...(verified.unverifiedEmbeddingModelIds !== undefined
3445
+ ? { unverifiedEmbeddingModelIds: verified.unverifiedEmbeddingModelIds }
3446
+ : {}),
3447
+ ...(verified.droppedEmbeddingModelIds !== undefined
3448
+ ? { droppedEmbeddingModelIds: verified.droppedEmbeddingModelIds }
3449
+ : {}),
3450
+ });
3208
3451
  }
3209
- async function trySetupCandidate(baseUrl, request, deps, gatewayConfig, tester, discovery, current) {
3452
+ async function trySetupCandidate(baseUrl, request, deps, gatewayConfig, seams, current) {
3210
3453
  const verified = await verifySetupCandidate({
3454
+ embeddingProbe: seams.embeddingProbe,
3211
3455
  preserveExisting: request.preserveExisting,
3212
3456
  baseUrl,
3213
3457
  apiKey: request.apiKey,
@@ -3228,8 +3472,8 @@ async function trySetupCandidate(baseUrl, request, deps, gatewayConfig, tester,
3228
3472
  ? request.workflowEligibleModelIds
3229
3473
  : undefined,
3230
3474
  voiceProviders: request.voiceProviders,
3231
- tester,
3232
- discovery,
3475
+ tester: seams.tester,
3476
+ discovery: seams.discovery,
3233
3477
  env: deps.env,
3234
3478
  egress: egressForCandidateValidation(deps),
3235
3479
  figmaAccessToken: request.figmaAccessToken,
@@ -3467,8 +3711,11 @@ function shouldRequireDeploymentNames(request, baseUrlCandidates, env) {
3467
3711
  return baseUrlCandidates.some((baseUrl) => isAzureFoundryBaseUrl(baseUrl));
3468
3712
  }
3469
3713
  async function verifyAndSaveGatewaySetup(request, current, deps, gatewayConfig) {
3470
- const tester = gatewaySetupTester(deps);
3471
- const discovery = deps.gatewayModelDiscovery ?? defaultGatewayModelDiscovery;
3714
+ const seams = {
3715
+ tester: gatewaySetupTester(deps),
3716
+ embeddingProbe: gatewayEmbeddingProbe(deps),
3717
+ discovery: deps.gatewayModelDiscovery ?? defaultGatewayModelDiscovery,
3718
+ };
3472
3719
  const figmaFailure = await verifySubmittedFigmaCredential(request, deps);
3473
3720
  if (figmaFailure !== undefined) {
3474
3721
  return figmaFailure;
@@ -3480,7 +3727,7 @@ async function verifyAndSaveGatewaySetup(request, current, deps, gatewayConfig)
3480
3727
  const errors = [];
3481
3728
  for (const baseUrl of baseUrlCandidates) {
3482
3729
  try {
3483
- return await trySetupCandidate(baseUrl, request, deps, gatewayConfig, tester, discovery, current);
3730
+ return await trySetupCandidate(baseUrl, request, deps, gatewayConfig, seams, current);
3484
3731
  }
3485
3732
  catch (error) {
3486
3733
  reportSetupVerificationFailure(deps, error, request.correlationId, "gateway.setup.provider-verify");
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oscharko-dev/keiko-server",
3
- "version": "0.3.12",
3
+ "version": "0.3.13",
4
4
  "type": "module",
5
5
  "license": "Apache-2.0",
6
6
  "description": "Internal server package: local loopback BFF runtime (HTTP/SSE/WebSocket router, CSP, host check, CSRF gate, terminal, browser, files, run engine, SQLite-backed UI store) that mediates the browser presentation tier and the Node-side domain packages (ADR-0019). Not published independently.",
@@ -31,25 +31,25 @@
31
31
  },
32
32
  "private": true,
33
33
  "peerDependencies": {
34
- "@oscharko-dev/keiko-connectors": "0.3.12",
35
- "@oscharko-dev/keiko-contracts": "0.3.12",
36
- "@oscharko-dev/keiko-evidence": "0.3.12",
37
- "@oscharko-dev/keiko-git": "0.3.12",
38
- "@oscharko-dev/keiko-harness": "0.3.12",
39
- "@oscharko-dev/keiko-local-knowledge": "0.3.12",
40
- "@oscharko-dev/keiko-memory-capture": "0.3.12",
41
- "@oscharko-dev/keiko-memory-consolidation": "0.3.12",
42
- "@oscharko-dev/keiko-memory-governance": "0.3.12",
43
- "@oscharko-dev/keiko-memory-retrieval": "0.3.12",
44
- "@oscharko-dev/keiko-memory-vault": "0.3.12",
45
- "@oscharko-dev/keiko-model-gateway": "0.3.12",
46
- "@oscharko-dev/keiko-quality-intelligence": "0.3.12",
47
- "@oscharko-dev/keiko-sandbox": "0.3.12",
48
- "@oscharko-dev/keiko-sdk": "0.3.12",
49
- "@oscharko-dev/keiko-security": "0.3.12",
50
- "@oscharko-dev/keiko-tools": "0.3.12",
51
- "@oscharko-dev/keiko-verification": "0.3.12",
52
- "@oscharko-dev/keiko-workflows": "0.3.12",
53
- "@oscharko-dev/keiko-workspace": "0.3.12"
34
+ "@oscharko-dev/keiko-connectors": "0.3.13",
35
+ "@oscharko-dev/keiko-contracts": "0.3.13",
36
+ "@oscharko-dev/keiko-evidence": "0.3.13",
37
+ "@oscharko-dev/keiko-git": "0.3.13",
38
+ "@oscharko-dev/keiko-harness": "0.3.13",
39
+ "@oscharko-dev/keiko-local-knowledge": "0.3.13",
40
+ "@oscharko-dev/keiko-memory-capture": "0.3.13",
41
+ "@oscharko-dev/keiko-memory-consolidation": "0.3.13",
42
+ "@oscharko-dev/keiko-memory-governance": "0.3.13",
43
+ "@oscharko-dev/keiko-memory-retrieval": "0.3.13",
44
+ "@oscharko-dev/keiko-memory-vault": "0.3.13",
45
+ "@oscharko-dev/keiko-model-gateway": "0.3.13",
46
+ "@oscharko-dev/keiko-quality-intelligence": "0.3.13",
47
+ "@oscharko-dev/keiko-sandbox": "0.3.13",
48
+ "@oscharko-dev/keiko-sdk": "0.3.13",
49
+ "@oscharko-dev/keiko-security": "0.3.13",
50
+ "@oscharko-dev/keiko-tools": "0.3.13",
51
+ "@oscharko-dev/keiko-verification": "0.3.13",
52
+ "@oscharko-dev/keiko-workflows": "0.3.13",
53
+ "@oscharko-dev/keiko-workspace": "0.3.13"
54
54
  }
55
55
  }
@@ -1,2 +1,2 @@
1
- export declare const KEIKO_TOOLS_VERSION: "0.3.12";
1
+ export declare const KEIKO_TOOLS_VERSION: "0.3.13";
2
2
  //# sourceMappingURL=version.d.ts.map
@@ -1,3 +1,3 @@
1
1
  // Package version constant. Bumped in lockstep with the package.json version so consumers can
2
2
  // detect divergence in tests without parsing package metadata at runtime.
3
- export const KEIKO_TOOLS_VERSION = "0.3.12";
3
+ export const KEIKO_TOOLS_VERSION = "0.3.13";
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oscharko-dev/keiko-tools",
3
- "version": "0.3.12",
3
+ "version": "0.3.13",
4
4
  "type": "module",
5
5
  "license": "Apache-2.0",
6
6
  "description": "Internal tools package: Keiko safe tool-execution layer — terminal-policy command allowlist, env-isolated no-shell spawn, atomic patch workflow, browser CDP adapter, and the WorkspaceWriter boundary (ADR-0006 / ADR-0017). Not published independently.",
@@ -36,9 +36,9 @@
36
36
  },
37
37
  "private": true,
38
38
  "peerDependencies": {
39
- "@oscharko-dev/keiko-contracts": "0.3.12",
40
- "@oscharko-dev/keiko-sandbox": "0.3.12",
41
- "@oscharko-dev/keiko-security": "0.3.12",
42
- "@oscharko-dev/keiko-workspace": "0.3.12"
39
+ "@oscharko-dev/keiko-contracts": "0.3.13",
40
+ "@oscharko-dev/keiko-sandbox": "0.3.13",
41
+ "@oscharko-dev/keiko-security": "0.3.13",
42
+ "@oscharko-dev/keiko-workspace": "0.3.13"
43
43
  }
44
44
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oscharko-dev/keiko-verification",
3
- "version": "0.3.12",
3
+ "version": "0.3.13",
4
4
  "type": "module",
5
5
  "license": "Apache-2.0",
6
6
  "description": "Internal verification package: deterministic verification orchestrator — plan construction, resource-limit policy, best-effort memory monitoring, command classification, and audit/Markdown summaries (ADR-0007, ADR-0019). Not published independently.",
@@ -21,9 +21,9 @@
21
21
  },
22
22
  "private": true,
23
23
  "peerDependencies": {
24
- "@oscharko-dev/keiko-contracts": "0.3.12",
25
- "@oscharko-dev/keiko-security": "0.3.12",
26
- "@oscharko-dev/keiko-tools": "0.3.12",
27
- "@oscharko-dev/keiko-workspace": "0.3.12"
24
+ "@oscharko-dev/keiko-contracts": "0.3.13",
25
+ "@oscharko-dev/keiko-security": "0.3.13",
26
+ "@oscharko-dev/keiko-tools": "0.3.13",
27
+ "@oscharko-dev/keiko-workspace": "0.3.13"
28
28
  }
29
29
  }