@undefineds.co/xpod 0.4.11 → 0.4.12
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.
- package/config/components-ignore.json +5 -1
- package/config/notifications.json +68 -0
- package/config/xpod.base.json +9 -11
- package/dist/ai/service/AiCredentialSecret.d.ts +30 -0
- package/dist/ai/service/AiCredentialSecret.js +120 -0
- package/dist/ai/service/CredentialReaderImpl.d.ts +18 -0
- package/dist/ai/service/CredentialReaderImpl.js +81 -5
- package/dist/ai/service/CredentialReaderImpl.jsonld +42 -2
- package/dist/ai/service/EmbeddingModelPolicy.d.ts +79 -0
- package/dist/ai/service/EmbeddingModelPolicy.js +134 -0
- package/dist/ai/service/EmbeddingProviderError.js +6 -0
- package/dist/ai/service/EmbeddingServiceImpl.d.ts +13 -1
- package/dist/ai/service/EmbeddingServiceImpl.js +18 -5
- package/dist/ai/service/EmbeddingServiceImpl.jsonld +35 -0
- package/dist/ai/service/index.d.ts +2 -0
- package/dist/ai/service/index.js +2 -0
- package/dist/api/ai-gateway/connect/index.d.ts +20 -2
- package/dist/api/ai-gateway/connect/index.js +162 -16
- package/dist/api/ai-gateway/credentials/AiCredentialSecretDecoder.d.ts +12 -0
- package/dist/api/ai-gateway/credentials/AiCredentialSecretDecoder.js +30 -0
- package/dist/api/ai-gateway/errors.d.ts +1 -1
- package/dist/api/ai-gateway/models/GatewayEmbeddingModelCatalog.d.ts +11 -0
- package/dist/api/ai-gateway/models/GatewayEmbeddingModelCatalog.js +31 -0
- package/dist/api/ai-gateway/models/PodModelSelectionRepository.js +7 -3
- package/dist/api/ai-gateway/models/ProviderCustomModelsService.d.ts +18 -0
- package/dist/api/ai-gateway/models/ProviderCustomModelsService.js +23 -0
- package/dist/api/ai-gateway/models/ProviderModelDiscoveryAdapters.d.ts +3 -1
- package/dist/api/ai-gateway/models/ProviderModelDiscoveryAdapters.js +2 -45
- package/dist/api/ai-gateway/models/ProviderModelSelectionService.d.ts +10 -0
- package/dist/api/ai-gateway/models/ProviderModelSelectionService.js +57 -20
- package/dist/api/ai-gateway/models/ProviderModelType.d.ts +28 -0
- package/dist/api/ai-gateway/models/ProviderModelType.js +34 -0
- package/dist/api/ai-gateway/models/ProviderModelsAdapter.d.ts +10 -0
- package/dist/api/ai-gateway/models/ProviderModelsAdapter.js +3 -4
- package/dist/api/ai-gateway/models/index.d.ts +1 -0
- package/dist/api/ai-gateway/models/index.js +3 -1
- package/dist/api/ai-gateway/providers/CustomRuntimeAdapter.d.ts +7 -0
- package/dist/api/ai-gateway/providers/CustomRuntimeAdapter.js +9 -2
- package/dist/api/ai-gateway/providers/ModelsDevCatalog.d.ts +7 -1
- package/dist/api/ai-gateway/providers/ModelsDevCatalog.js +4 -10
- package/dist/api/ai-gateway/providers/ProviderRegistry.d.ts +107 -0
- package/dist/api/ai-gateway/providers/ProviderRegistry.js +244 -21
- package/dist/api/ai-gateway/providers/ProviderRuntimeRegistry.d.ts +5 -0
- package/dist/api/ai-gateway/providers/ProviderRuntimeRegistry.js +5 -1
- package/dist/api/ai-gateway/quota/SubscriptionQuotaAdapters.d.ts +12 -4
- package/dist/api/ai-gateway/quota/SubscriptionQuotaAdapters.js +11 -11
- package/dist/api/ai-gateway/routing/ModelRouter.d.ts +14 -0
- package/dist/api/ai-gateway/routing/ModelRouter.js +43 -4
- package/dist/api/ai-gateway/service-access/AiConnectionsServiceAccess.d.ts +9 -1
- package/dist/api/ai-gateway/service-access/AiConnectionsServiceAccess.js +3 -27
- package/dist/api/chatkit/pod-store.d.ts +31 -0
- package/dist/api/chatkit/pod-store.js +132 -8
- package/dist/api/container/common.js +24 -4
- package/dist/api/container/routes.js +17 -2
- package/dist/api/container/types.d.ts +3 -1
- package/dist/api/handlers/AdminHandler.d.ts +13 -0
- package/dist/api/handlers/AdminHandler.js +47 -18
- package/dist/api/handlers/AiConfigHandler.d.ts +6 -0
- package/dist/api/handlers/AiConfigHandler.js +28 -0
- package/dist/api/handlers/AiGatewayManagementHandler.js +36 -0
- package/dist/api/runs/RdfRunContextRetriever.d.ts +14 -0
- package/dist/api/runs/RdfRunContextRetriever.js +41 -5
- package/dist/api/runtime.js +2 -1
- package/dist/cli/commands/secret.d.ts +1 -0
- package/dist/cli/commands/secret.js +25 -7
- package/dist/components/components.jsonld +3 -1
- package/dist/components/context.jsonld +53 -1
- package/dist/http/SubgraphSparqlHttpHandler.d.ts +59 -2
- package/dist/http/SubgraphSparqlHttpHandler.js +145 -13
- package/dist/http/SubgraphSparqlHttpHandler.jsonld +37 -0
- package/dist/identity/drizzle/EdgeNodeRepository.d.ts +0 -12
- package/dist/identity/drizzle/EdgeNodeRepository.js +5 -13
- package/dist/index.d.ts +2 -1
- package/dist/index.js +7 -3
- package/dist/logging/log-file.d.ts +17 -0
- package/dist/logging/log-file.js +69 -0
- package/dist/main.js +2 -1
- package/dist/notifications/NotificationChannelSweeper.d.ts +50 -0
- package/dist/notifications/NotificationChannelSweeper.js +131 -0
- package/dist/notifications/NotificationChannelSweeper.jsonld +136 -0
- package/dist/notifications/ReclaimingWebSocket2023Storer.d.ts +25 -0
- package/dist/notifications/ReclaimingWebSocket2023Storer.js +56 -0
- package/dist/notifications/ReclaimingWebSocket2023Storer.jsonld +77 -0
- package/dist/notifications/index.d.ts +2 -0
- package/dist/notifications/index.js +2 -0
- package/dist/runtime/Proxy.d.ts +37 -0
- package/dist/runtime/Proxy.js +88 -16
- package/dist/runtime/bootstrap.js +2 -1
- package/dist/runtime/upgrade/BunNativeUpgradeRelay.d.ts +116 -0
- package/dist/runtime/upgrade/BunNativeUpgradeRelay.js +423 -0
- package/dist/runtime/upgrade/UpgradeHandshake.d.ts +63 -0
- package/dist/runtime/upgrade/UpgradeHandshake.js +199 -0
- package/dist/runtime/upgrade/WebSocketFrames.d.ts +67 -0
- package/dist/runtime/upgrade/WebSocketFrames.js +224 -0
- package/node_modules/@undefineds.co/ai-connections/dist/AiApiKeyPool.js +8 -1
- package/node_modules/@undefineds.co/ai-connections/dist/AiAuthorizationActions.d.ts +11 -2
- package/node_modules/@undefineds.co/ai-connections/dist/AiAuthorizationActions.js +27 -10
- package/node_modules/@undefineds.co/ai-connections/dist/AiClientConfigurationSection.d.ts +7 -0
- package/node_modules/@undefineds.co/ai-connections/dist/AiClientConfigurationSection.js +13 -11
- package/node_modules/@undefineds.co/ai-connections/dist/AiConnectDialog.js +1 -1
- package/node_modules/@undefineds.co/ai-connections/dist/AiConnectionsList.js +10 -6
- package/node_modules/@undefineds.co/ai-connections/dist/AiConnectionsMain.d.ts +15 -0
- package/node_modules/@undefineds.co/ai-connections/dist/AiConnectionsMain.js +29 -3
- package/node_modules/@undefineds.co/ai-connections/dist/AiConnectionsMainHeader.js +18 -3
- package/node_modules/@undefineds.co/ai-connections/dist/AiConnectionsPanel.d.ts +16 -1
- package/node_modules/@undefineds.co/ai-connections/dist/AiConnectionsPanel.js +92 -20
- package/node_modules/@undefineds.co/ai-connections/dist/AiCopyButton.d.ts +35 -0
- package/node_modules/@undefineds.co/ai-connections/dist/AiCopyButton.js +45 -0
- package/node_modules/@undefineds.co/ai-connections/dist/AiCredentialPoolSection.js +71 -11
- package/node_modules/@undefineds.co/ai-connections/dist/AiCredentialRow.js +9 -7
- package/node_modules/@undefineds.co/ai-connections/dist/AiEndpointList.d.ts +23 -0
- package/node_modules/@undefineds.co/ai-connections/dist/AiEndpointList.js +24 -0
- package/node_modules/@undefineds.co/ai-connections/dist/AiGatewayKeysSection.d.ts +13 -4
- package/node_modules/@undefineds.co/ai-connections/dist/AiGatewayKeysSection.js +35 -38
- package/node_modules/@undefineds.co/ai-connections/dist/AiGatewayModelsSection.d.ts +21 -0
- package/node_modules/@undefineds.co/ai-connections/dist/AiGatewayModelsSection.js +51 -0
- package/node_modules/@undefineds.co/ai-connections/dist/AiInfoTooltip.d.ts +15 -0
- package/node_modules/@undefineds.co/ai-connections/dist/AiInfoTooltip.js +16 -0
- package/node_modules/@undefineds.co/ai-connections/dist/AiModelCatalog.d.ts +175 -0
- package/node_modules/@undefineds.co/ai-connections/dist/AiModelCatalog.js +133 -0
- package/node_modules/@undefineds.co/ai-connections/dist/AiOfferingDetails.js +2 -2
- package/node_modules/@undefineds.co/ai-connections/dist/AiProviderCard.js +13 -64
- package/node_modules/@undefineds.co/ai-connections/dist/AiProviderHeader.d.ts +21 -0
- package/node_modules/@undefineds.co/ai-connections/dist/AiProviderHeader.js +12 -0
- package/node_modules/@undefineds.co/ai-connections/dist/AiRowAction.d.ts +15 -0
- package/node_modules/@undefineds.co/ai-connections/dist/AiRowAction.js +12 -0
- package/node_modules/@undefineds.co/ai-connections/dist/AiSortableCredentialList.js +2 -1
- package/node_modules/@undefineds.co/ai-connections/dist/ai-connections-client.d.ts +7 -0
- package/node_modules/@undefineds.co/ai-connections/dist/ai-connections-client.js +6 -0
- package/node_modules/@undefineds.co/ai-connections/dist/authorization-methods.d.ts +36 -5
- package/node_modules/@undefineds.co/ai-connections/dist/authorization-methods.js +52 -9
- package/node_modules/@undefineds.co/ai-connections/dist/client/normalize.js +30 -3
- package/node_modules/@undefineds.co/ai-connections/dist/client/types.d.ts +21 -1
- package/node_modules/@undefineds.co/ai-connections/dist/client-config/base-adapter.d.ts +1 -3
- package/node_modules/@undefineds.co/ai-connections/dist/client-config/base-adapter.js +3 -7
- package/node_modules/@undefineds.co/ai-connections/dist/client-config/index.cjs +9 -7
- package/node_modules/@undefineds.co/ai-connections/dist/collection-runtime.d.ts +46 -0
- package/node_modules/@undefineds.co/ai-connections/dist/collection-runtime.js +231 -0
- package/node_modules/@undefineds.co/ai-connections/dist/collections.d.ts +119 -0
- package/node_modules/@undefineds.co/ai-connections/dist/collections.js +173 -0
- package/node_modules/@undefineds.co/ai-connections/dist/controller.d.ts +71 -5
- package/node_modules/@undefineds.co/ai-connections/dist/controller.js +285 -16
- package/node_modules/@undefineds.co/ai-connections/dist/credential-labels.d.ts +5 -0
- package/node_modules/@undefineds.co/ai-connections/dist/credential-labels.js +8 -3
- package/node_modules/@undefineds.co/ai-connections/dist/credential-storage.d.ts +59 -0
- package/node_modules/@undefineds.co/ai-connections/dist/credential-storage.js +131 -0
- package/node_modules/@undefineds.co/ai-connections/dist/endpoint-urls.d.ts +15 -0
- package/node_modules/@undefineds.co/ai-connections/dist/endpoint-urls.js +20 -0
- package/node_modules/@undefineds.co/ai-connections/dist/gateway-endpoints.d.ts +14 -0
- package/node_modules/@undefineds.co/ai-connections/dist/gateway-endpoints.js +20 -0
- package/node_modules/@undefineds.co/ai-connections/dist/index.d.ts +8 -0
- package/node_modules/@undefineds.co/ai-connections/dist/index.js +8 -0
- package/node_modules/@undefineds.co/ai-connections/dist/manifest.js +1 -1
- package/node_modules/@undefineds.co/ai-connections/dist/offering-endpoints.d.ts +14 -0
- package/node_modules/@undefineds.co/ai-connections/dist/offering-endpoints.js +17 -0
- package/node_modules/@undefineds.co/ai-connections/dist/provider-catalog.cjs +68 -1
- package/node_modules/@undefineds.co/ai-connections/dist/provider-catalog.d.ts +75 -1
- package/node_modules/@undefineds.co/ai-connections/dist/provider-catalog.js +119 -0
- package/node_modules/@undefineds.co/ai-connections/dist/provider-visuals.d.ts +5 -0
- package/node_modules/@undefineds.co/ai-connections/dist/provider-visuals.js +5 -0
- package/node_modules/@undefineds.co/ai-connections/dist/service-access.js +2 -27
- package/node_modules/@undefineds.co/ai-connections/package.json +1 -0
- package/node_modules/@undefineds.co/extension-sdk/dist/manifest.d.ts +1 -1
- package/node_modules/@undefineds.co/extension-sdk/dist/manifest.js +2 -0
- package/node_modules/@undefineds.co/extension-sdk/dist/web.d.ts +150 -0
- package/node_modules/@undefineds.co/extension-sdk/package.json +2 -1
- package/node_modules/@undefineds.co/models/README.md +1 -1
- package/node_modules/@undefineds.co/models/dist/ai-config/index.d.ts +3 -3
- package/node_modules/@undefineds.co/models/dist/ai-gateway.schema.d.ts +5 -0
- package/node_modules/@undefineds.co/models/dist/ai-gateway.schema.js +9 -0
- package/node_modules/@undefineds.co/models/dist/ai-runtime.repository.d.ts +1 -1
- package/node_modules/@undefineds.co/models/dist/approval.repository.d.ts +2 -2
- package/node_modules/@undefineds.co/models/dist/audit.presentation.d.ts +2 -2
- package/node_modules/@undefineds.co/models/dist/capture.repository.d.ts +1 -1
- package/node_modules/@undefineds.co/models/dist/chat-project.repository.d.ts +1 -1
- package/node_modules/@undefineds.co/models/dist/chat.repository.d.ts +2 -2
- package/node_modules/@undefineds.co/models/dist/control-request.repository.d.ts +2 -2
- package/node_modules/@undefineds.co/models/dist/conversation-share.repository.d.ts +1 -1
- package/node_modules/@undefineds.co/models/dist/credential.schema.d.ts +12 -0
- package/node_modules/@undefineds.co/models/dist/credential.schema.js +15 -1
- package/node_modules/@undefineds.co/models/dist/discovery/index.d.ts +2 -2
- package/node_modules/@undefineds.co/models/dist/discovery/providers.json +248 -7
- package/node_modules/@undefineds.co/models/dist/discovery/types.d.ts +31 -0
- package/node_modules/@undefineds.co/models/dist/extension/index.d.ts +1 -1
- package/node_modules/@undefineds.co/models/dist/favorite/index.d.ts +2 -2
- package/node_modules/@undefineds.co/models/dist/fixtures/contracts-chat-contact.d.ts +5 -5
- package/node_modules/@undefineds.co/models/dist/import/index.d.ts +1 -1
- package/node_modules/@undefineds.co/models/dist/index.d.ts +73 -73
- package/node_modules/@undefineds.co/models/dist/index.js +1 -1
- package/node_modules/@undefineds.co/models/dist/input-request.repository.d.ts +2 -2
- package/node_modules/@undefineds.co/models/dist/knowledge/index.d.ts +1 -1
- package/node_modules/@undefineds.co/models/dist/message.repository.d.ts +1 -1
- package/node_modules/@undefineds.co/models/dist/namespaces.js +5 -0
- package/node_modules/@undefineds.co/models/dist/pod-storage-descriptor.d.ts +4815 -26
- package/node_modules/@undefineds.co/models/dist/pod-storage-descriptor.js +482 -132
- package/node_modules/@undefineds.co/models/dist/schema.d.ts +4 -0
- package/node_modules/@undefineds.co/models/dist/session/index.d.ts +1 -1
- package/node_modules/@undefineds.co/models/dist/settings/index.d.ts +1 -1
- package/node_modules/@undefineds.co/models/dist/sidecar/persistence-mapping.d.ts +5 -5
- package/node_modules/@undefineds.co/models/dist/thread.repository.d.ts +2 -2
- package/node_modules/@undefineds.co/models/dist/types/message-block.d.ts +1 -1
- package/node_modules/@undefineds.co/models/dist/vocab/_namespaces.d.ts +1 -1
- package/node_modules/@undefineds.co/models/dist/vocab/index.d.ts +10 -10
- package/node_modules/@undefineds.co/models/dist/vocab/sidecar.vocab.d.ts +1 -0
- package/node_modules/@undefineds.co/models/dist/vocab/sidecar.vocab.js +1 -0
- package/node_modules/@undefineds.co/models/package.json +4 -2
- package/node_modules/@undefineds.co/pod-collections/README.md +71 -0
- package/node_modules/@undefineds.co/pod-collections/dist/diff.d.ts +85 -0
- package/node_modules/@undefineds.co/pod-collections/dist/diff.js +166 -0
- package/node_modules/@undefineds.co/pod-collections/dist/feed.d.ts +17 -0
- package/node_modules/@undefineds.co/pod-collections/dist/feed.js +27 -0
- package/node_modules/@undefineds.co/pod-collections/dist/index.cjs +1042 -0
- package/node_modules/@undefineds.co/pod-collections/dist/index.d.ts +37 -0
- package/node_modules/@undefineds.co/pod-collections/dist/index.js +89 -0
- package/node_modules/@undefineds.co/pod-collections/dist/layout.d.ts +75 -0
- package/node_modules/@undefineds.co/pod-collections/dist/layout.js +173 -0
- package/node_modules/@undefineds.co/pod-collections/dist/mapping.d.ts +78 -0
- package/node_modules/@undefineds.co/pod-collections/dist/mapping.js +287 -0
- package/node_modules/@undefineds.co/pod-collections/dist/mutations.d.ts +83 -0
- package/node_modules/@undefineds.co/pod-collections/dist/mutations.js +273 -0
- package/node_modules/@undefineds.co/pod-collections/dist/react.d.ts +21 -0
- package/node_modules/@undefineds.co/pod-collections/dist/react.js +22 -0
- package/node_modules/@undefineds.co/pod-collections/dist/read.d.ts +65 -0
- package/node_modules/@undefineds.co/pod-collections/dist/read.js +31 -0
- package/node_modules/@undefineds.co/pod-collections/dist/sync.d.ts +66 -0
- package/node_modules/@undefineds.co/pod-collections/dist/sync.js +260 -0
- package/node_modules/@undefineds.co/pod-collections/dist/types.d.ts +155 -0
- package/node_modules/@undefineds.co/pod-collections/dist/types.js +9 -0
- package/node_modules/@undefineds.co/pod-collections/package.json +42 -0
- package/package.json +15 -7
- package/static/app/assets/main.css +1 -1
- package/static/auth-callback/assets/AiConfigContext-DnQs1ZpW.js +1 -0
- package/static/auth-callback/assets/AiConfigPage-DOtvlxH0.js +1 -0
- package/static/auth-callback/assets/DocumentProcessingPanel-BS2voQgL.js +1 -0
- package/static/auth-callback/assets/IndexLifecyclePanel-Cvt0cJtN.js +1 -0
- package/static/auth-callback/assets/{IndexSubjectPanel-BbUqop4b.js → IndexSubjectPanel-Dhf01GqF.js} +1 -1
- package/static/auth-callback/assets/ModelAssignmentsPanel-BJutWaAF.js +1 -0
- package/static/auth-callback/assets/ModelsPage-BRS0sje3.js +11 -0
- package/static/auth-callback/assets/{NetworkPage-Vp2PrMxs.js → NetworkPage-B3qBfANA.js} +2 -2
- package/static/auth-callback/assets/{PaneListHeader-DY7baSFl.js → PaneListHeader-QQeJGTp4.js} +1 -1
- package/static/auth-callback/assets/SearchIndexingPanel-MyNUSEwT.js +1 -0
- package/static/auth-callback/assets/{StatusSubjectPanel-ArIS-TxT.js → StatusSubjectPanel-DQkEVsFs.js} +1 -1
- package/static/{settings/assets/StatusWorkspace-CoMFRXoV.js → auth-callback/assets/StatusWorkspace-Dkv63Uwk.js} +1 -1
- package/static/auth-callback/assets/{SystemSettingsPage-BDvT1NUz.js → SystemSettingsPage-TIsUfX5d.js} +1 -1
- package/static/{dashboard/assets/SystemSettingsSubjectPanel-WaE8mTQi.js → auth-callback/assets/SystemSettingsSubjectPanel-BJWEt2-7.js} +5 -5
- package/static/auth-callback/assets/XpodAiConnectionsPodStore-BJiXm-PF.js +3 -0
- package/static/auth-callback/assets/{activity-D1Dsfa_0.js → activity-5hNeNKnL.js} +1 -1
- package/static/auth-callback/assets/ai-connections-CryuHGKW.js +1 -0
- package/static/auth-callback/assets/{auth-callback-Cmf4hXVZ.js → auth-callback-CAFZ3R0B.js} +6 -6
- package/static/auth-callback/assets/auth-callback-rk080mvG.css +1 -0
- package/static/auth-callback/assets/{badge-CZsHq3Ih.js → badge-CAIPI0CB.js} +1 -1
- package/static/auth-callback/assets/collection-runtime-D9s7h9YA.js +1 -0
- package/static/auth-callback/assets/dialog-BjA109aX.js +1 -0
- package/static/auth-callback/assets/{download-DU9ntlHw.js → download-B3Up5W2G.js} +1 -1
- package/static/auth-callback/assets/{external-link-BfzaaZDx.js → external-link-BTXgSPzB.js} +1 -1
- package/static/auth-callback/assets/index-BppXlxcp.js +41 -0
- package/static/auth-callback/assets/index-CirW4CJf.js +1 -0
- package/static/auth-callback/assets/index-DlLYWOhw.js +4 -0
- package/static/auth-callback/assets/{index-browser-BNFqqC74.js → index-browser-DtU38ni3.js} +1 -1
- package/static/auth-callback/assets/{key-round-BwP3DBWo.js → key-round-CQCOrZ7x.js} +1 -1
- package/static/auth-callback/assets/layout-DB3pMyTl.js +1 -0
- package/static/auth-callback/assets/pod-collections-host-KnnGFZHL.js +8 -0
- package/static/auth-callback/assets/{rotate-ccw-VMwnmyab.js → rotate-ccw-C1zM2KtS.js} +1 -1
- package/static/auth-callback/assets/{skeleton-CoD55rBT.js → skeleton-Cqp7_M9-.js} +1 -1
- package/static/auth-callback/assets/{waypoints-DRo_1Ca7.js → waypoints-Bj6gAUSQ.js} +1 -1
- package/static/auth-callback/assets/{workspace-layout--mcXl3My.js → workspace-layout-DK8mDzrY.js} +1 -1
- package/static/auth-callback/auth-callback.html +2 -2
- package/static/dashboard/assets/AiConfigContext-BsE7MqX8.js +1 -0
- package/static/dashboard/assets/AiConfigPage-DvM-lRXa.js +1 -0
- package/static/dashboard/assets/DocumentProcessingPanel-BPfdlfuf.js +1 -0
- package/static/dashboard/assets/IndexLifecyclePanel--m0AGxvh.js +1 -0
- package/static/dashboard/assets/{IndexSubjectPanel-B2cXwl8X.js → IndexSubjectPanel-Bb7m1k3d.js} +1 -1
- package/static/dashboard/assets/ModelAssignmentsPanel-BLi_zbMa.js +1 -0
- package/static/dashboard/assets/ModelsPage-CxdpgnfR.js +11 -0
- package/static/dashboard/assets/{NetworkPage-DV2V0qWO.js → NetworkPage-BAIPw-D_.js} +2 -2
- package/static/dashboard/assets/{PaneListHeader-D0c1yCFH.js → PaneListHeader-BBCMei0r.js} +1 -1
- package/static/dashboard/assets/SearchIndexingPanel-Ck4Y-xjR.js +1 -0
- package/static/dashboard/assets/{StatusSubjectPanel-oPSECj7i.js → StatusSubjectPanel-D1KWfAXE.js} +1 -1
- package/static/dashboard/assets/{StatusWorkspace-PdovQPKa.js → StatusWorkspace-JbA5gzXx.js} +1 -1
- package/static/dashboard/assets/{SystemSettingsPage-CtNDklkx.js → SystemSettingsPage-BbwQWsSR.js} +1 -1
- package/static/{settings/assets/SystemSettingsSubjectPanel-DExjDo_v.js → dashboard/assets/SystemSettingsSubjectPanel-N117nMt5.js} +5 -5
- package/static/dashboard/assets/XpodAiConnectionsPodStore-CdDOb4SV.js +18 -0
- package/static/dashboard/assets/{activity-B9ylSoyr.js → activity-DX1I96o_.js} +1 -1
- package/static/dashboard/assets/ai-connections-DwCRqOQa.js +1 -0
- package/static/dashboard/assets/{badge-BNbFbpIb.js → badge-k2vhtDqH.js} +1 -1
- package/static/dashboard/assets/collection-runtime-BFQ8teQJ.js +1 -0
- package/static/dashboard/assets/{dashboard-CD-FFVRD.js → dashboard-DWZ-fmCT.js} +4 -4
- package/static/dashboard/assets/dashboard-rk080mvG.css +1 -0
- package/static/dashboard/assets/dialog-1CCw-iHT.js +1 -0
- package/static/dashboard/assets/{download-nOP38LtW.js → download-C6-SNY1q.js} +1 -1
- package/static/dashboard/assets/{external-link-Bh2ewN9E.js → external-link-BgPcZ_j2.js} +1 -1
- package/static/dashboard/assets/index-6LcIUIYO.js +1 -0
- package/static/dashboard/assets/index-D7A8U6Pt.js +41 -0
- package/static/dashboard/assets/index-UD6QOE7H.js +4 -0
- package/static/dashboard/assets/{key-round-bGmguBLv.js → key-round-BOd7Jo0Q.js} +1 -1
- package/static/dashboard/assets/layout-DB3pMyTl.js +1 -0
- package/static/dashboard/assets/pod-collections-host-KnnGFZHL.js +8 -0
- package/static/dashboard/assets/{rotate-ccw-D2x__ODW.js → rotate-ccw-CCgJqsvx.js} +1 -1
- package/static/dashboard/assets/{skeleton-VOqft8WS.js → skeleton-Bc7abAn5.js} +1 -1
- package/static/dashboard/assets/{waypoints-fgRqm4oH.js → waypoints-s-opmJxx.js} +1 -1
- package/static/dashboard/assets/{workspace-layout-DV4dgeHX.js → workspace-layout-DqIQeTBV.js} +1 -1
- package/static/dashboard/dashboard.html +2 -2
- package/static/settings/assets/AiConfigContext-BB9KZySa.js +1 -0
- package/static/settings/assets/AiConfigPage-DGSXUkLs.js +1 -0
- package/static/settings/assets/DocumentProcessingPanel-Da2Re6Rg.js +1 -0
- package/static/settings/assets/IndexLifecyclePanel-BSZuIzgr.js +1 -0
- package/static/settings/assets/{IndexSubjectPanel-BgbI9c-a.js → IndexSubjectPanel-CFd0ay-r.js} +1 -1
- package/static/settings/assets/ModelAssignmentsPanel-CSAryvWJ.js +1 -0
- package/static/settings/assets/ModelsPage-BQwCwLHU.js +11 -0
- package/static/settings/assets/{NetworkPage-C8OA9Mtp.js → NetworkPage-BKymvsQc.js} +2 -2
- package/static/settings/assets/{PaneListHeader-COvlPJWj.js → PaneListHeader-Bjh3hRdQ.js} +1 -1
- package/static/settings/assets/SearchIndexingPanel-MjKL5QLU.js +1 -0
- package/static/settings/assets/{StatusSubjectPanel-BuLml7qn.js → StatusSubjectPanel-Bvl6K4mx.js} +1 -1
- package/static/settings/assets/StatusWorkspace-B0NzrP--.js +1 -0
- package/static/settings/assets/{SystemSettingsPage-DlzmaWV-.js → SystemSettingsPage-D2z6Z4FE.js} +1 -1
- package/static/{auth-callback/assets/SystemSettingsSubjectPanel-CDqRuC4t.js → settings/assets/SystemSettingsSubjectPanel-4sxma4X4.js} +5 -5
- package/static/settings/assets/XpodAiConnectionsPodStore-BkNQ8fZx.js +3 -0
- package/static/settings/assets/{activity-TLerXgMs.js → activity-CgJJGpjx.js} +1 -1
- package/static/settings/assets/ai-connections-CryuHGKW.js +1 -0
- package/static/settings/assets/{badge-Bcs8iWrH.js → badge-C4NypVyT.js} +1 -1
- package/static/settings/assets/collection-runtime-CTLCDxAi.js +1 -0
- package/static/settings/assets/dialog-Csq0vWUi.js +1 -0
- package/static/settings/assets/{download-Ct3QmHPt.js → download-DaLJJ-Wp.js} +1 -1
- package/static/settings/assets/{external-link-C8KiHbss.js → external-link--w_iW5Au.js} +1 -1
- package/static/settings/assets/index-B0mQa59b.js +4 -0
- package/static/settings/assets/index-BukHiu4y.js +1 -0
- package/static/settings/assets/index-COmVnZi2.js +41 -0
- package/static/settings/assets/{index-browser-CazX1pc2.js → index-browser-BGpvHwD0.js} +1 -1
- package/static/settings/assets/{key-round-B19YD1GA.js → key-round-Bk4YRjBu.js} +1 -1
- package/static/settings/assets/layout-DB3pMyTl.js +1 -0
- package/static/settings/assets/pod-collections-host-KnnGFZHL.js +8 -0
- package/static/settings/assets/{rotate-ccw-AQm2kMgU.js → rotate-ccw-TCabbqsr.js} +1 -1
- package/static/settings/assets/{settings-C-VBtt9r.js → settings-CJWpdbNC.js} +5 -5
- package/static/settings/assets/settings-rk080mvG.css +1 -0
- package/static/settings/assets/{skeleton-DyZ1OBYf.js → skeleton-JDHYVe7t.js} +1 -1
- package/static/settings/assets/{waypoints-CC3wq-SU.js → waypoints-DDvEl-MU.js} +1 -1
- package/static/settings/assets/{workspace-layout-BxXNKgf9.js → workspace-layout-DV5QU30U.js} +1 -1
- package/static/settings/settings.html +2 -2
- package/static/auth-callback/assets/AiConfigContext-DqWRSm7n.js +0 -1
- package/static/auth-callback/assets/AiConfigPage-C5YYyvzl.js +0 -1
- package/static/auth-callback/assets/DocumentProcessingPanel-DZCiacBz.js +0 -1
- package/static/auth-callback/assets/IndexLifecyclePanel-CCLeOljB.js +0 -1
- package/static/auth-callback/assets/ModelAssignmentsPanel-jUUTDKuh.js +0 -1
- package/static/auth-callback/assets/ModelsPage-B08zdtff.js +0 -10
- package/static/auth-callback/assets/SearchIndexingPanel-D4YRg1-8.js +0 -1
- package/static/auth-callback/assets/StatusWorkspace-Cp5LQ9Yx.js +0 -1
- package/static/auth-callback/assets/ai-connections-CHNTKemd.js +0 -1
- package/static/auth-callback/assets/auth-callback-DWMMiFjh.css +0 -1
- package/static/auth-callback/assets/index-DSNnLUbU.js +0 -4
- package/static/auth-callback/assets/index-FHhHoKgp.js +0 -41
- package/static/dashboard/assets/AiConfigContext-BpPDKSzI.js +0 -1
- package/static/dashboard/assets/AiConfigPage-wsqEZDIX.js +0 -1
- package/static/dashboard/assets/DocumentProcessingPanel-CDSy3juc.js +0 -1
- package/static/dashboard/assets/IndexLifecyclePanel-CVd6vQCX.js +0 -1
- package/static/dashboard/assets/ModelAssignmentsPanel-BeBZhnQd.js +0 -1
- package/static/dashboard/assets/ModelsPage-B6McSCJw.js +0 -25
- package/static/dashboard/assets/SearchIndexingPanel-CGs0OZ12.js +0 -1
- package/static/dashboard/assets/ai-connections-CHNTKemd.js +0 -1
- package/static/dashboard/assets/dashboard-DWMMiFjh.css +0 -1
- package/static/dashboard/assets/index-PgS-Bt7X.js +0 -41
- package/static/dashboard/assets/index-QN2QgEwr.js +0 -4
- package/static/settings/assets/AiConfigContext-zKQYdfai.js +0 -1
- package/static/settings/assets/AiConfigPage-Bs1EE3Ei.js +0 -1
- package/static/settings/assets/DocumentProcessingPanel-CSFfdOXS.js +0 -1
- package/static/settings/assets/IndexLifecyclePanel-BR9Su49B.js +0 -1
- package/static/settings/assets/ModelAssignmentsPanel-C0BE7nbk.js +0 -1
- package/static/settings/assets/ModelsPage-CU-YQ8_7.js +0 -10
- package/static/settings/assets/SearchIndexingPanel-Bdd46mIV.js +0 -1
- package/static/settings/assets/ai-connections-CHNTKemd.js +0 -1
- package/static/settings/assets/index-1Q2cRjZd.js +0 -41
- package/static/settings/assets/index-DBO_Vq0P.js +0 -4
- package/static/settings/assets/settings-DWMMiFjh.css +0 -1
|
@@ -1,13 +1,49 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DEFAULT_PROVIDER_DESCRIPTORS = exports.DEFAULT_PROVIDER_PRODUCT_DESCRIPTORS = exports.ProviderRegistry = exports.OPENAI_SUBSCRIPTION_BASE_URL = void 0;
|
|
3
|
+
exports.DEFAULT_PROVIDER_DESCRIPTORS = exports.DEFAULT_PROVIDER_PRODUCT_DESCRIPTORS = exports.ProviderRegistry = exports.XPOD_PROVIDER_TO_MODELS_DEV = exports.MANAGED_PROVIDER_ALIASES = exports.MANAGED_PROVIDER_VOCABULARY = exports.OPENAI_SUBSCRIPTION_BASE_URL = void 0;
|
|
4
|
+
exports.discoveryProviderSlug = discoveryProviderSlug;
|
|
4
5
|
exports.createDefaultProviderRegistry = createDefaultProviderRegistry;
|
|
5
6
|
exports.providerProductsForDeployment = providerProductsForDeployment;
|
|
7
|
+
exports.offeringDeclaresUpstreamCapability = offeringDeclaresUpstreamCapability;
|
|
6
8
|
exports.normalizeProviderId = normalizeProviderId;
|
|
7
9
|
const models_1 = require("@undefineds.co/models");
|
|
10
|
+
const defaultEmbeddingProfile_1 = require("../../../ai/service/defaultEmbeddingProfile");
|
|
8
11
|
const provider_catalog_1 = require("@undefineds.co/ai-connections/provider-catalog");
|
|
9
12
|
const OfferingAuthorization_1 = require("./OfferingAuthorization");
|
|
10
13
|
exports.OPENAI_SUBSCRIPTION_BASE_URL = 'https://chatgpt.com/backend-api/codex';
|
|
14
|
+
exports.MANAGED_PROVIDER_VOCABULARY = [
|
|
15
|
+
{ id: 'openai', runtimeIds: ['codex'], modelsDevId: 'openai' },
|
|
16
|
+
{ id: 'anthropic', runtimeIds: ['claude'], modelsDevId: 'anthropic' },
|
|
17
|
+
{ id: 'kimi', runtimeIds: ['moonshot', 'moonshotai'], discoverySlug: 'moonshot', modelsDevId: 'moonshotai' },
|
|
18
|
+
{
|
|
19
|
+
id: 'bailian',
|
|
20
|
+
runtimeIds: ['dashscope', 'dashscope-cn', 'dashscope-intl', 'qwen', 'alibaba'],
|
|
21
|
+
discoverySlug: 'qwen',
|
|
22
|
+
modelsDevId: 'alibaba-cn',
|
|
23
|
+
},
|
|
24
|
+
{ id: 'deepseek', runtimeIds: [], modelsDevId: 'deepseek' },
|
|
25
|
+
{ id: 'zhipu', runtimeIds: ['zhipuai', 'bigmodel', 'glm'], modelsDevId: 'zhipuai' },
|
|
26
|
+
{ id: 'ollama', runtimeIds: [] },
|
|
27
|
+
];
|
|
28
|
+
/**
|
|
29
|
+
* Runtime vocabulary to canonical provider id, derived from
|
|
30
|
+
* `MANAGED_PROVIDER_VOCABULARY`.
|
|
31
|
+
*
|
|
32
|
+
* `ProviderRegistry.resolveManagedProviderId` is the translation entry point:
|
|
33
|
+
* it validates the canonical id against the registered catalog, which a raw
|
|
34
|
+
* table lookup cannot do.
|
|
35
|
+
*/
|
|
36
|
+
exports.MANAGED_PROVIDER_ALIASES = Object.fromEntries(exports.MANAGED_PROVIDER_VOCABULARY.flatMap((provider) => [provider.id, ...provider.runtimeIds].map((runtimeId) => [runtimeId, provider.id])));
|
|
37
|
+
/** Discovery-catalog slug of a gateway catalog provider id (identity when undeclared). */
|
|
38
|
+
function discoveryProviderSlug(providerId) {
|
|
39
|
+
return managedProviderVocabulary(providerId)?.discoverySlug ?? providerId;
|
|
40
|
+
}
|
|
41
|
+
/** models.dev provider ids keyed by gateway catalog provider id, derived from the vocabulary block. */
|
|
42
|
+
exports.XPOD_PROVIDER_TO_MODELS_DEV = Object.fromEntries(exports.MANAGED_PROVIDER_VOCABULARY.flatMap((provider) => provider.modelsDevId ? [[provider.id, provider.modelsDevId]] : []));
|
|
43
|
+
function managedProviderVocabulary(providerId) {
|
|
44
|
+
const canonical = exports.MANAGED_PROVIDER_ALIASES[normalizeProviderId(providerId)] ?? normalizeProviderId(providerId);
|
|
45
|
+
return exports.MANAGED_PROVIDER_VOCABULARY.find((provider) => provider.id === canonical);
|
|
46
|
+
}
|
|
11
47
|
const RESERVED_DISCOVERY_METADATA_KEYS = new Set([
|
|
12
48
|
'baseUrl',
|
|
13
49
|
'base_url',
|
|
@@ -77,6 +113,63 @@ class ProviderRegistry {
|
|
|
77
113
|
listProviders() {
|
|
78
114
|
return Array.from(this.providers.values());
|
|
79
115
|
}
|
|
116
|
+
/**
|
|
117
|
+
* Resolve a runtime provider vocabulary entry to the catalog provider that
|
|
118
|
+
* owns it. Unknown providers stay unresolved so a deployment can never treat
|
|
119
|
+
* a Pod-invented provider id as a catalog provider.
|
|
120
|
+
*/
|
|
121
|
+
resolveManagedProviderId(provider) {
|
|
122
|
+
const normalized = normalizeProviderId(provider);
|
|
123
|
+
if (!normalized) {
|
|
124
|
+
return undefined;
|
|
125
|
+
}
|
|
126
|
+
const canonical = exports.MANAGED_PROVIDER_ALIASES[normalized] ?? normalized;
|
|
127
|
+
return this.providers.has(canonical) ? canonical : undefined;
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Whether this deployment offers the provider at all.
|
|
131
|
+
*
|
|
132
|
+
* Cloud only offers the operator-designated providers with the endpoints the
|
|
133
|
+
* catalog names: a self-hosted `custom` endpoint or a local-daemon provider
|
|
134
|
+
* such as Ollama is a Local-only capability, because there the user owns the
|
|
135
|
+
* endpoint.
|
|
136
|
+
*/
|
|
137
|
+
isProvidedInDeployment(provider, deployment) {
|
|
138
|
+
if (deployment !== 'cloud') {
|
|
139
|
+
return true;
|
|
140
|
+
}
|
|
141
|
+
const providerId = normalizeProviderId(provider);
|
|
142
|
+
if (!providerId || providerId === 'custom') {
|
|
143
|
+
return false;
|
|
144
|
+
}
|
|
145
|
+
if (!this.providers.has(providerId)) {
|
|
146
|
+
return false;
|
|
147
|
+
}
|
|
148
|
+
return this.products.get(providerId)?.offerings.some((offering) => offering.kind !== 'local') === true;
|
|
149
|
+
}
|
|
150
|
+
listProvidedProviders(deployment) {
|
|
151
|
+
return this.listProviders().filter((provider) => this.isProvidedInDeployment(provider.id, deployment));
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Embedding models this catalog provides for a provider. This is the authority
|
|
155
|
+
* for embedding model policy; anything absent is not provided by the gateway.
|
|
156
|
+
*/
|
|
157
|
+
listManagedEmbeddingModels(provider) {
|
|
158
|
+
const providerId = this.resolveManagedProviderId(provider);
|
|
159
|
+
const descriptor = providerId ? this.providers.get(providerId) : undefined;
|
|
160
|
+
if (!descriptor) {
|
|
161
|
+
return [];
|
|
162
|
+
}
|
|
163
|
+
return descriptor.models.filter((model) => model.capabilities?.embedding === true);
|
|
164
|
+
}
|
|
165
|
+
isManagedEmbeddingModel(provider, modelId) {
|
|
166
|
+
const model = normalizeKey(modelId);
|
|
167
|
+
if (!model) {
|
|
168
|
+
return false;
|
|
169
|
+
}
|
|
170
|
+
return this.listManagedEmbeddingModels(provider).some((candidate) => normalizeKey(candidate.id) === model
|
|
171
|
+
|| (candidate.aliases ?? []).some((alias) => normalizeKey(alias) === model));
|
|
172
|
+
}
|
|
80
173
|
getProduct(product) {
|
|
81
174
|
const normalized = normalizeProviderId(product);
|
|
82
175
|
return this.products.get(normalized) ?? this.productByRuntimeProvider.get(normalized);
|
|
@@ -103,6 +196,24 @@ class ProviderRegistry {
|
|
|
103
196
|
resolveAlias(model) {
|
|
104
197
|
return this.aliases.get(normalizeKey(model));
|
|
105
198
|
}
|
|
199
|
+
/**
|
|
200
|
+
* Catalog descriptor for one model of one provider, matched by id or alias.
|
|
201
|
+
*
|
|
202
|
+
* Provider vocabularies differ between the Pod configuration and the catalog,
|
|
203
|
+
* so the runtime id is resolved through the same alias table the model-policy
|
|
204
|
+
* checks use. An unknown provider stays unresolved rather than falling back to
|
|
205
|
+
* another provider's catalog entry.
|
|
206
|
+
*/
|
|
207
|
+
getModelDescriptor(provider, modelId) {
|
|
208
|
+
const providerId = this.resolveManagedProviderId(provider);
|
|
209
|
+
const descriptor = providerId ? this.providers.get(providerId) : undefined;
|
|
210
|
+
const normalizedModel = normalizeKey(modelId);
|
|
211
|
+
if (!descriptor || !normalizedModel) {
|
|
212
|
+
return undefined;
|
|
213
|
+
}
|
|
214
|
+
return descriptor.models.find((candidate) => normalizeKey(candidate.id) === normalizedModel
|
|
215
|
+
|| (candidate.aliases ?? []).some((alias) => normalizeKey(alias) === normalizedModel));
|
|
216
|
+
}
|
|
106
217
|
findModel(model) {
|
|
107
218
|
const normalizedModel = normalizeKey(model);
|
|
108
219
|
const matches = [];
|
|
@@ -134,6 +245,27 @@ exports.ProviderRegistry = ProviderRegistry;
|
|
|
134
245
|
function createDefaultProviderRegistry(options = {}) {
|
|
135
246
|
return new ProviderRegistry(exports.DEFAULT_PROVIDER_DESCRIPTORS, options);
|
|
136
247
|
}
|
|
248
|
+
/**
|
|
249
|
+
* An offering's own connect entry, narrowed to the server's descriptor type.
|
|
250
|
+
* The catalog owns the declaration (id, mode, label); this deployment only says
|
|
251
|
+
* whether the offering it belongs to is usable at all, the same way the derived
|
|
252
|
+
* api-key entry does.
|
|
253
|
+
*/
|
|
254
|
+
function catalogAuthorizationMethod(method, offeringLifecycle) {
|
|
255
|
+
const connectMode = method.connectMode === 'browserAssistedApiKey'
|
|
256
|
+
|| method.connectMode === 'deviceCodeOAuth'
|
|
257
|
+
|| method.connectMode === 'authorizationCodeOAuth'
|
|
258
|
+
? method.connectMode
|
|
259
|
+
: undefined;
|
|
260
|
+
return {
|
|
261
|
+
id: method.id,
|
|
262
|
+
authMode: method.authMode,
|
|
263
|
+
...(connectMode ? { connectMode } : {}),
|
|
264
|
+
label: method.label,
|
|
265
|
+
lifecycle: offeringLifecycle === 'unavailable' ? 'unavailable' : method.lifecycle ?? 'active',
|
|
266
|
+
...(method.reason ? { reason: method.reason } : {}),
|
|
267
|
+
};
|
|
268
|
+
}
|
|
137
269
|
function providerProductsForDeployment(deployment) {
|
|
138
270
|
return exports.DEFAULT_PROVIDER_PRODUCT_DESCRIPTORS.map((product) => ({
|
|
139
271
|
...product,
|
|
@@ -141,10 +273,7 @@ function providerProductsForDeployment(deployment) {
|
|
|
141
273
|
const binding = OfferingAuthorization_1.SUBSCRIPTION_AUTHORIZATION_BINDINGS.find((candidate) => candidate.provider === product.id && candidate.offeringId === offering.id);
|
|
142
274
|
const authorizationMethods = [];
|
|
143
275
|
if (offering.authModes.includes('apiKey')) {
|
|
144
|
-
authorizationMethods.push(
|
|
145
|
-
id: 'api-key', authMode: 'apiKey', label: '添加 API Key',
|
|
146
|
-
lifecycle: offering.lifecycle === 'unavailable' ? 'unavailable' : 'active',
|
|
147
|
-
});
|
|
276
|
+
authorizationMethods.push(catalogAuthorizationMethod(provider_catalog_1.API_KEY_METHOD, offering.lifecycle));
|
|
148
277
|
}
|
|
149
278
|
if (binding) {
|
|
150
279
|
authorizationMethods.push(...(0, OfferingAuthorization_1.subscriptionAuthorizationMethods)(deployment, binding));
|
|
@@ -155,11 +284,20 @@ function providerProductsForDeployment(deployment) {
|
|
|
155
284
|
lifecycle: offering.lifecycle === 'unavailable' ? 'unavailable' : 'active',
|
|
156
285
|
});
|
|
157
286
|
}
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
287
|
+
// An oauth/deviceCode mode with no integration binding is a capability this
|
|
288
|
+
// build has not implemented, and it is omitted rather than published as a
|
|
289
|
+
// disabled entry: a button that cannot be pressed together with an internal
|
|
290
|
+
// reason is noise, and the offering's own lifecycle already says it is not
|
|
291
|
+
// available here. Entries that are merely unavailable in this deployment
|
|
292
|
+
// (cloud without a local callback, cloud without session import) come from
|
|
293
|
+
// the binding above and keep their place and their reason.
|
|
294
|
+
//
|
|
295
|
+
// The catalog's own connect entries, such as the browser-assisted console
|
|
296
|
+
// login, supplement the derived ones instead of replacing them.
|
|
297
|
+
for (const declared of offering.authorizationMethods ?? []) {
|
|
298
|
+
if (authorizationMethods.some((method) => method.id === declared.id))
|
|
299
|
+
continue;
|
|
300
|
+
authorizationMethods.push(catalogAuthorizationMethod(declared, offering.lifecycle));
|
|
163
301
|
}
|
|
164
302
|
return {
|
|
165
303
|
...offering,
|
|
@@ -181,7 +319,7 @@ function providerProductsForDeployment(deployment) {
|
|
|
181
319
|
}),
|
|
182
320
|
}));
|
|
183
321
|
}
|
|
184
|
-
function catalogOffering(productLabel, input) {
|
|
322
|
+
function catalogOffering(productId, productLabel, input) {
|
|
185
323
|
const consoleUrl = input.consoleUrl ?? input.subscriptionUrl;
|
|
186
324
|
if (!consoleUrl)
|
|
187
325
|
throw new Error(`Provider offering "${input.id}" requires a console URL`);
|
|
@@ -260,12 +398,20 @@ const PROVIDER_UPSTREAM_OVERRIDES = {
|
|
|
260
398
|
openai: {
|
|
261
399
|
'official-subscription': [
|
|
262
400
|
{ capability: 'models', protocol: 'codex-models' },
|
|
263
|
-
{
|
|
401
|
+
{
|
|
402
|
+
capability: 'quota',
|
|
403
|
+
protocol: 'rolling-quota-windows',
|
|
404
|
+
options: { profile: 'codex', credentialAuthModes: ['deviceCodeOAuth'] },
|
|
405
|
+
},
|
|
264
406
|
],
|
|
265
407
|
},
|
|
266
408
|
anthropic: {
|
|
267
409
|
'official-subscription': [
|
|
268
|
-
{
|
|
410
|
+
{
|
|
411
|
+
capability: 'quota',
|
|
412
|
+
protocol: 'rolling-quota-windows',
|
|
413
|
+
options: { profile: 'claude-code', credentialAuthModes: ['deviceCodeOAuth'] },
|
|
414
|
+
},
|
|
269
415
|
],
|
|
270
416
|
},
|
|
271
417
|
kimi: {
|
|
@@ -273,7 +419,23 @@ const PROVIDER_UPSTREAM_OVERRIDES = {
|
|
|
273
419
|
{ capability: 'models', protocol: 'openai-models', options: { path: '/models', endpointProtocol: 'chatCompletions' } },
|
|
274
420
|
{ capability: 'inference', protocol: 'chatCompletions', options: { baseUrl: 'https://api.kimi.com/coding/v1' } },
|
|
275
421
|
{ capability: 'inference', protocol: 'anthropic', options: { baseUrl: 'https://api.kimi.com/coding/' } },
|
|
276
|
-
{
|
|
422
|
+
{
|
|
423
|
+
capability: 'quota',
|
|
424
|
+
protocol: 'rolling-quota-windows',
|
|
425
|
+
options: { profile: 'kimi-code', credentialAuthModes: ['apiKey', 'deviceCodeOAuth'] },
|
|
426
|
+
},
|
|
427
|
+
],
|
|
428
|
+
// MIGRATION WINDOW: Kimi credentials written before the offering rename name
|
|
429
|
+
// the coding-plan quota by the generic subscription id, and only ever hold a
|
|
430
|
+
// device-code token. The declaration owns both facts so the quota handler
|
|
431
|
+
// never has to compare offering ids itself; delete this row once no stored
|
|
432
|
+
// credential carries the old id.
|
|
433
|
+
'official-subscription': [
|
|
434
|
+
{
|
|
435
|
+
capability: 'quota',
|
|
436
|
+
protocol: 'rolling-quota-windows',
|
|
437
|
+
options: { profile: 'kimi-code', credentialAuthModes: ['deviceCodeOAuth'] },
|
|
438
|
+
},
|
|
277
439
|
],
|
|
278
440
|
'api-platform': [
|
|
279
441
|
{ capability: 'models', protocol: 'openai-models', options: { path: '/models', endpointProtocol: 'chatCompletions' } },
|
|
@@ -289,6 +451,40 @@ const PROVIDER_UPSTREAM_OVERRIDES = {
|
|
|
289
451
|
],
|
|
290
452
|
},
|
|
291
453
|
};
|
|
454
|
+
/**
|
|
455
|
+
* Whether one declared upstream capability assigns a protocol+profile to a
|
|
456
|
+
* product offering under the credential kind that would use it.
|
|
457
|
+
*
|
|
458
|
+
* `PROVIDER_UPSTREAM_OVERRIDES` is the axis's single authority for the
|
|
459
|
+
* offering→capability mapping and `QuotaCapabilityRegistry` dispatches handlers
|
|
460
|
+
* from the protocol+profile declared here. A handler that needs to know whether
|
|
461
|
+
* an offering is its own asks the declaration instead of comparing offering id
|
|
462
|
+
* literals in `supports()`, which would be a second copy of this table.
|
|
463
|
+
*
|
|
464
|
+
* A capability may narrow itself to the credential auth modes it serves
|
|
465
|
+
* (`options.credentialAuthModes`); without that option every credential kind the
|
|
466
|
+
* Offering publishes is served. When the declaration narrows the kinds and the
|
|
467
|
+
* caller does not know the credential kind, the offering cannot be claimed.
|
|
468
|
+
*/
|
|
469
|
+
function offeringDeclaresUpstreamCapability(product, offeringId, capability, credentialAuthMode) {
|
|
470
|
+
if (!offeringId) {
|
|
471
|
+
return false;
|
|
472
|
+
}
|
|
473
|
+
const declared = PROVIDER_UPSTREAM_OVERRIDES[normalizeProviderId(product)]?.[offeringId];
|
|
474
|
+
return declared?.some((candidate) => {
|
|
475
|
+
if (candidate.protocol !== capability.protocol) {
|
|
476
|
+
return false;
|
|
477
|
+
}
|
|
478
|
+
if (capability.profile !== undefined && candidate.options?.profile !== capability.profile) {
|
|
479
|
+
return false;
|
|
480
|
+
}
|
|
481
|
+
const credentialAuthModes = candidate.options?.credentialAuthModes;
|
|
482
|
+
if (!Array.isArray(credentialAuthModes)) {
|
|
483
|
+
return true;
|
|
484
|
+
}
|
|
485
|
+
return credentialAuthMode !== undefined && credentialAuthModes.includes(credentialAuthMode);
|
|
486
|
+
}) ?? false;
|
|
487
|
+
}
|
|
292
488
|
function offeringsForProduct(provider) {
|
|
293
489
|
if (provider === 'custom')
|
|
294
490
|
return provider_catalog_1.CUSTOM_DEFAULT_OFFERINGS;
|
|
@@ -301,7 +497,7 @@ const LEGACY_PROVIDER_PRODUCT_DESCRIPTORS = Object.keys(PROVIDER_PRODUCT_LABELS)
|
|
|
301
497
|
// The shared catalog is the source of the offering content; the server's
|
|
302
498
|
// descriptor type narrows the same fields, so the projection converts at
|
|
303
499
|
// this boundary rather than duplicating the values.
|
|
304
|
-
catalogOffering(PROVIDER_PRODUCT_LABELS[provider], {
|
|
500
|
+
catalogOffering(provider, PROVIDER_PRODUCT_LABELS[provider], {
|
|
305
501
|
...offering,
|
|
306
502
|
endpoints: offering.endpoints ?? [],
|
|
307
503
|
...(PROVIDER_UPSTREAM_OVERRIDES[provider]?.[offering.id]
|
|
@@ -309,10 +505,6 @@ const LEGACY_PROVIDER_PRODUCT_DESCRIPTORS = Object.keys(PROVIDER_PRODUCT_LABELS)
|
|
|
309
505
|
: {}),
|
|
310
506
|
})),
|
|
311
507
|
}));
|
|
312
|
-
const CANONICAL_PROVIDER_SLUGS = {
|
|
313
|
-
kimi: 'moonshot',
|
|
314
|
-
bailian: 'qwen',
|
|
315
|
-
};
|
|
316
508
|
/**
|
|
317
509
|
* The provider/offering catalog belongs to `@undefineds.co/ai-connections`: it
|
|
318
510
|
* is content rather than schema, and it carries endpoints, console links and
|
|
@@ -324,7 +516,7 @@ exports.DEFAULT_PROVIDER_PRODUCT_DESCRIPTORS = canonicalProviderProducts(LEGACY_
|
|
|
324
516
|
.map(normalizeOpenAiSubscriptionProduct);
|
|
325
517
|
function canonicalProviderProducts(legacy) {
|
|
326
518
|
return legacy.map((fallback) => {
|
|
327
|
-
const canonicalSlug =
|
|
519
|
+
const canonicalSlug = discoveryProviderSlug(fallback.id);
|
|
328
520
|
const provider = (0, models_1.getBuiltinProvider)(canonicalSlug);
|
|
329
521
|
if (!provider?.offerings?.length)
|
|
330
522
|
return fallback;
|
|
@@ -398,6 +590,9 @@ function canonicalOfferingDescriptor(provider, offering, fallback) {
|
|
|
398
590
|
productLabel: offering.productLabel ?? provider.displayName,
|
|
399
591
|
kind: offering.kind,
|
|
400
592
|
authModes: offering.authModes,
|
|
593
|
+
// The canonical source carries schema, not actions: which connect entries an
|
|
594
|
+
// offering declares stays with the catalog that declared them.
|
|
595
|
+
...(fallback?.authorizationMethods ? { authorizationMethods: fallback.authorizationMethods } : {}),
|
|
401
596
|
auth: fallback?.auth ?? defaultAuthCapabilities(offering.kind, offering.authModes),
|
|
402
597
|
upstream: fallback?.upstream ?? defaultUpstreamCapabilities(endpoints, modelDiscovery, quota),
|
|
403
598
|
endpoints,
|
|
@@ -444,6 +639,8 @@ exports.DEFAULT_PROVIDER_DESCRIPTORS = [
|
|
|
444
639
|
models: [
|
|
445
640
|
{ id: 'gpt-5', contextWindow: 400_000, capabilities: { toolCalls: true, reasoningEffort: true, imageInput: true } },
|
|
446
641
|
{ id: 'gpt-4.1', capabilities: { toolCalls: true, imageInput: true } },
|
|
642
|
+
embeddingModel('text-embedding-3-small', 1536),
|
|
643
|
+
embeddingModel('text-embedding-3-large', 3072),
|
|
447
644
|
],
|
|
448
645
|
},
|
|
449
646
|
{
|
|
@@ -525,6 +722,8 @@ exports.DEFAULT_PROVIDER_DESCRIPTORS = [
|
|
|
525
722
|
models: [
|
|
526
723
|
{ id: 'qwen-max', capabilities: { toolCalls: true, imageInput: true } },
|
|
527
724
|
{ id: 'qwen-coder-plus', capabilities: { toolCalls: true } },
|
|
725
|
+
// The DashScope-compatible endpoint the default embedding profile uses.
|
|
726
|
+
embeddingModel(defaultEmbeddingProfile_1.DEFAULT_EMBEDDING_MODEL_ID, 1024),
|
|
528
727
|
],
|
|
529
728
|
},
|
|
530
729
|
{
|
|
@@ -550,6 +749,15 @@ exports.DEFAULT_PROVIDER_DESCRIPTORS = [
|
|
|
550
749
|
{ id: 'deepseek-chat', capabilities: { toolCalls: true } },
|
|
551
750
|
{ id: 'deepseek-reasoner', capabilities: { toolCalls: true, reasoningEffort: true } },
|
|
552
751
|
{ id: 'deepseek-flash', capabilities: { toolCalls: true, reasoningEffort: true } },
|
|
752
|
+
// models.dev lists this model under the third-party aggregators that serve
|
|
753
|
+
// it, not under the first-party DeepSeek entry, so the catalog seeds it
|
|
754
|
+
// here. `fast` is a curated tier claim, not a measurement.
|
|
755
|
+
{
|
|
756
|
+
id: 'deepseek-v4.1-flash',
|
|
757
|
+
contextWindow: 1_048_576,
|
|
758
|
+
inputModalities: ['text', 'image'],
|
|
759
|
+
capabilities: { toolCalls: true, reasoningEffort: true, imageInput: true, fast: true },
|
|
760
|
+
},
|
|
553
761
|
{ id: 'deepseek-v4-flash', capabilities: { toolCalls: true, reasoningEffort: true } },
|
|
554
762
|
{ id: 'deepseek-v4-pro', capabilities: { toolCalls: true, reasoningEffort: true } },
|
|
555
763
|
],
|
|
@@ -580,6 +788,7 @@ exports.DEFAULT_PROVIDER_DESCRIPTORS = [
|
|
|
580
788
|
models: [
|
|
581
789
|
{ id: 'glm-4.5', capabilities: { toolCalls: true, reasoningEffort: true } },
|
|
582
790
|
{ id: 'glm-4.5-air', capabilities: { toolCalls: true, reasoningEffort: true } },
|
|
791
|
+
embeddingModel('embedding-2', 1024),
|
|
583
792
|
],
|
|
584
793
|
},
|
|
585
794
|
{
|
|
@@ -599,7 +808,9 @@ exports.DEFAULT_PROVIDER_DESCRIPTORS = [
|
|
|
599
808
|
capabilities: {
|
|
600
809
|
toolCalls: true,
|
|
601
810
|
},
|
|
602
|
-
models: [
|
|
811
|
+
models: [
|
|
812
|
+
embeddingModel('nomic-embed-text', 768),
|
|
813
|
+
],
|
|
603
814
|
},
|
|
604
815
|
{
|
|
605
816
|
id: 'custom',
|
|
@@ -623,6 +834,18 @@ exports.DEFAULT_PROVIDER_DESCRIPTORS = [
|
|
|
623
834
|
models: [],
|
|
624
835
|
},
|
|
625
836
|
];
|
|
837
|
+
/**
|
|
838
|
+
* Registers an embedding model in the provided catalog. Embedding models exist
|
|
839
|
+
* here (not in the chat lists) so that provider/model capability and the
|
|
840
|
+
* deployment embedding policy read from one source.
|
|
841
|
+
*/
|
|
842
|
+
function embeddingModel(id, dimension) {
|
|
843
|
+
return {
|
|
844
|
+
id,
|
|
845
|
+
capabilities: { embedding: true },
|
|
846
|
+
metadata: { modelType: 'embedding', dimension },
|
|
847
|
+
};
|
|
848
|
+
}
|
|
626
849
|
function mergeModelDescriptor(existing, discovered, provider) {
|
|
627
850
|
return {
|
|
628
851
|
...existing,
|
|
@@ -4,6 +4,11 @@ import type { ProviderRuntimeAdapter } from './ProviderRuntimeAdapter';
|
|
|
4
4
|
export interface ProviderRuntimeRegistryOptions {
|
|
5
5
|
registry?: ProviderRegistry;
|
|
6
6
|
transport?: ProviderHttpTransport;
|
|
7
|
+
/**
|
|
8
|
+
* Whether a credential may supply its own base URL. Only a Local deployment
|
|
9
|
+
* may; Cloud resolves every provider against the catalog endpoint.
|
|
10
|
+
*/
|
|
11
|
+
allowCredentialBaseUrl?: boolean;
|
|
7
12
|
}
|
|
8
13
|
export declare class ProviderRuntimeRegistry {
|
|
9
14
|
private readonly adapters;
|
|
@@ -60,7 +60,11 @@ class ProviderRuntimeRegistry {
|
|
|
60
60
|
allowToolChoiceRequired: true,
|
|
61
61
|
}));
|
|
62
62
|
const custom = registry.requireProvider('custom');
|
|
63
|
-
this.adapters.set('custom', new CustomRuntimeAdapter_1.CustomRuntimeAdapter({
|
|
63
|
+
this.adapters.set('custom', new CustomRuntimeAdapter_1.CustomRuntimeAdapter({
|
|
64
|
+
transport,
|
|
65
|
+
descriptor: custom,
|
|
66
|
+
allowCredentialBaseUrl: options.allowCredentialBaseUrl,
|
|
67
|
+
}));
|
|
64
68
|
}
|
|
65
69
|
get(provider) {
|
|
66
70
|
const adapter = this.adapters.get((0, ProviderRegistry_1.normalizeProviderId)(provider));
|
|
@@ -6,10 +6,21 @@ interface SubscriptionQuotaAdapterOptions {
|
|
|
6
6
|
}
|
|
7
7
|
declare abstract class SubscriptionQuotaAdapter implements ProviderQuotaAdapter {
|
|
8
8
|
abstract readonly provider: string;
|
|
9
|
+
abstract readonly capability: {
|
|
10
|
+
protocol: string;
|
|
11
|
+
profile?: string;
|
|
12
|
+
};
|
|
9
13
|
protected readonly fetchFn: typeof fetch;
|
|
10
14
|
protected readonly transport?: ProviderHttpTransport;
|
|
11
15
|
constructor(options?: SubscriptionQuotaAdapterOptions);
|
|
12
|
-
|
|
16
|
+
/**
|
|
17
|
+
* Whether the credential's Offering is one the runtime declaration assigns
|
|
18
|
+
* this handler's quota capability to, under the credential kind it holds. The
|
|
19
|
+
* declaration is the axis's single authority for offering→capability, so the
|
|
20
|
+
* handler asks it instead of re-typing the offering ids and auth modes it was
|
|
21
|
+
* bound to.
|
|
22
|
+
*/
|
|
23
|
+
supports(credential: QuotaCredentialRecord): boolean;
|
|
13
24
|
abstract fetch(input: ProviderQuotaFetchInput): Promise<NormalizedQuotaSnapshot>;
|
|
14
25
|
protected snapshot(input: ProviderQuotaFetchInput, source: string, windows: QuotaWindow[]): NormalizedQuotaSnapshot;
|
|
15
26
|
protected error(input: ProviderQuotaFetchInput, source: string, status?: number, retryAfter?: string | null): NormalizedQuotaSnapshot;
|
|
@@ -20,7 +31,6 @@ export declare class CodexSubscriptionQuotaAdapter extends SubscriptionQuotaAdap
|
|
|
20
31
|
readonly protocol: "rolling-quota-windows";
|
|
21
32
|
readonly profile: "codex";
|
|
22
33
|
};
|
|
23
|
-
supports(credential: QuotaCredentialRecord): boolean;
|
|
24
34
|
fetch(input: ProviderQuotaFetchInput): Promise<NormalizedQuotaSnapshot>;
|
|
25
35
|
}
|
|
26
36
|
export declare class ClaudeSubscriptionQuotaAdapter extends SubscriptionQuotaAdapter {
|
|
@@ -29,7 +39,6 @@ export declare class ClaudeSubscriptionQuotaAdapter extends SubscriptionQuotaAda
|
|
|
29
39
|
readonly protocol: "rolling-quota-windows";
|
|
30
40
|
readonly profile: "claude-code";
|
|
31
41
|
};
|
|
32
|
-
supports(credential: QuotaCredentialRecord): boolean;
|
|
33
42
|
fetch(input: ProviderQuotaFetchInput): Promise<NormalizedQuotaSnapshot>;
|
|
34
43
|
}
|
|
35
44
|
export declare class KimiCodeSubscriptionQuotaAdapter extends SubscriptionQuotaAdapter {
|
|
@@ -38,7 +47,6 @@ export declare class KimiCodeSubscriptionQuotaAdapter extends SubscriptionQuotaA
|
|
|
38
47
|
readonly protocol: "rolling-quota-windows";
|
|
39
48
|
readonly profile: "kimi-code";
|
|
40
49
|
};
|
|
41
|
-
supports(credential: QuotaCredentialRecord): boolean;
|
|
42
50
|
fetch(input: ProviderQuotaFetchInput): Promise<NormalizedQuotaSnapshot>;
|
|
43
51
|
}
|
|
44
52
|
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.KimiCodeSubscriptionQuotaAdapter = exports.ClaudeSubscriptionQuotaAdapter = exports.CodexSubscriptionQuotaAdapter = void 0;
|
|
4
|
+
const ProviderRegistry_1 = require("../providers/ProviderRegistry");
|
|
4
5
|
const ProviderQuotaAdapter_1 = require("./ProviderQuotaAdapter");
|
|
5
6
|
const CODEX_USAGE_URL = 'https://chatgpt.com/backend-api/wham/usage';
|
|
6
7
|
const CLAUDE_USAGE_URL = 'https://api.anthropic.com/api/oauth/usage';
|
|
@@ -11,6 +12,16 @@ class SubscriptionQuotaAdapter {
|
|
|
11
12
|
this.fetchFn = options.fetch ?? fetch;
|
|
12
13
|
this.transport = options.transport;
|
|
13
14
|
}
|
|
15
|
+
/**
|
|
16
|
+
* Whether the credential's Offering is one the runtime declaration assigns
|
|
17
|
+
* this handler's quota capability to, under the credential kind it holds. The
|
|
18
|
+
* declaration is the axis's single authority for offering→capability, so the
|
|
19
|
+
* handler asks it instead of re-typing the offering ids and auth modes it was
|
|
20
|
+
* bound to.
|
|
21
|
+
*/
|
|
22
|
+
supports(credential) {
|
|
23
|
+
return (0, ProviderRegistry_1.offeringDeclaresUpstreamCapability)(credential.provider, credential.offeringId, this.capability, credential.authMode);
|
|
24
|
+
}
|
|
14
25
|
snapshot(input, source, windows) {
|
|
15
26
|
return {
|
|
16
27
|
credential: input.credential.credentialIri,
|
|
@@ -38,9 +49,6 @@ class CodexSubscriptionQuotaAdapter extends SubscriptionQuotaAdapter {
|
|
|
38
49
|
this.provider = 'openai';
|
|
39
50
|
this.capability = { protocol: 'rolling-quota-windows', profile: 'codex' };
|
|
40
51
|
}
|
|
41
|
-
supports(credential) {
|
|
42
|
-
return credential.offeringId === 'official-subscription' && credential.authMode === 'deviceCodeOAuth';
|
|
43
|
-
}
|
|
44
52
|
async fetch(input) {
|
|
45
53
|
const token = bearerFromSecret(input.secret);
|
|
46
54
|
if (!token)
|
|
@@ -62,9 +70,6 @@ class ClaudeSubscriptionQuotaAdapter extends SubscriptionQuotaAdapter {
|
|
|
62
70
|
this.provider = 'anthropic';
|
|
63
71
|
this.capability = { protocol: 'rolling-quota-windows', profile: 'claude-code' };
|
|
64
72
|
}
|
|
65
|
-
supports(credential) {
|
|
66
|
-
return credential.offeringId === 'official-subscription' && credential.authMode === 'deviceCodeOAuth';
|
|
67
|
-
}
|
|
68
73
|
async fetch(input) {
|
|
69
74
|
const token = bearerFromSecret(input.secret);
|
|
70
75
|
if (!token)
|
|
@@ -86,11 +91,6 @@ class KimiCodeSubscriptionQuotaAdapter extends SubscriptionQuotaAdapter {
|
|
|
86
91
|
this.provider = 'kimi';
|
|
87
92
|
this.capability = { protocol: 'rolling-quota-windows', profile: 'kimi-code' };
|
|
88
93
|
}
|
|
89
|
-
supports(credential) {
|
|
90
|
-
return (credential.offeringId === 'official-subscription' && credential.authMode === 'deviceCodeOAuth')
|
|
91
|
-
|| (credential.offeringId === 'subscription-key'
|
|
92
|
-
&& (credential.authMode === 'apiKey' || credential.authMode === 'deviceCodeOAuth'));
|
|
93
|
-
}
|
|
94
94
|
async fetch(input) {
|
|
95
95
|
const token = bearerFromSecret(input.secret);
|
|
96
96
|
if (!token)
|
|
@@ -3,6 +3,7 @@ import { type ProviderAuthMode, type ProviderCapabilities, type ProviderDescript
|
|
|
3
3
|
import { type SessionAffinityStore } from './SessionAffinityStore';
|
|
4
4
|
import type { AuthContext } from '../../auth/AuthContext';
|
|
5
5
|
import type { GatewayProtocol } from '../types';
|
|
6
|
+
import { EmbeddingModelPolicy } from '../../../ai/service/EmbeddingModelPolicy';
|
|
6
7
|
export type GatewayCredentialHealth = 'healthy' | 'reauthRequired' | 'disabled' | 'error' | 'invalid' | 'unknown';
|
|
7
8
|
export type GatewayQuotaStatus = 'available' | 'unsupported' | 'exhausted' | 'error';
|
|
8
9
|
export type ModelRouteSource = 'alias' | 'explicit-provider' | 'exact-model' | 'default-provider' | 'default-model';
|
|
@@ -14,6 +15,8 @@ export interface GatewayCredentialCandidate {
|
|
|
14
15
|
enabled: boolean;
|
|
15
16
|
priority?: number;
|
|
16
17
|
models?: string[];
|
|
18
|
+
/** Display names the Pod recorded for `models`, keyed by model id. */
|
|
19
|
+
modelNames?: Record<string, string>;
|
|
17
20
|
customModels?: CustomProviderModel[];
|
|
18
21
|
defaultModel?: string;
|
|
19
22
|
health?: GatewayCredentialHealth;
|
|
@@ -35,6 +38,8 @@ export interface ModelRouterOptions {
|
|
|
35
38
|
selectionRepository?: GatewayModelSelectionRepository;
|
|
36
39
|
defaultProvider?: string;
|
|
37
40
|
defaultModel?: string;
|
|
41
|
+
/** Deployment policy for embedding models; defaults to allow-all (Local). */
|
|
42
|
+
embeddingModelPolicy?: EmbeddingModelPolicy;
|
|
38
43
|
now?: () => Date;
|
|
39
44
|
}
|
|
40
45
|
export interface GatewayModelSelection {
|
|
@@ -43,6 +48,7 @@ export interface GatewayModelSelection {
|
|
|
43
48
|
id: string;
|
|
44
49
|
modelType?: string;
|
|
45
50
|
status?: 'active' | 'inactive';
|
|
51
|
+
displayName?: string;
|
|
46
52
|
}>;
|
|
47
53
|
version?: string;
|
|
48
54
|
defaultModel?: string;
|
|
@@ -102,6 +108,7 @@ export declare class ModelRouter {
|
|
|
102
108
|
private readonly selectionRepository?;
|
|
103
109
|
private readonly defaultProvider?;
|
|
104
110
|
private readonly defaultModel?;
|
|
111
|
+
private readonly embeddingModelPolicy;
|
|
105
112
|
private readonly now;
|
|
106
113
|
constructor(options: ModelRouterOptions);
|
|
107
114
|
route(input: ModelRouteInput, excludeCredentialIds?: ReadonlySet<string>): Promise<ModelRouteResult>;
|
|
@@ -133,4 +140,11 @@ export declare class ModelRouter {
|
|
|
133
140
|
private routeProviderIdForCredential;
|
|
134
141
|
private credentialVisibleModels;
|
|
135
142
|
private isCredentialModelVisible;
|
|
143
|
+
/**
|
|
144
|
+
* A Pod can declare any capability on a custom model. Embedding is the one
|
|
145
|
+
* capability a deployment gates through its own catalog, so never advertise an
|
|
146
|
+
* embedding model the catalog does not provide. Other declared capabilities
|
|
147
|
+
* keep their existing behavior.
|
|
148
|
+
*/
|
|
149
|
+
private visibleCustomCapabilities;
|
|
136
150
|
}
|