Compare commits

...
Author SHA1 Message Date
yiling 0899a7e59d feat(provider): refresh models from the public Pi catalog 2026-11-29 18:49:27 +08:00
34 changed files with 1560 additions and 4404 deletions
+2
View File
@@ -12,6 +12,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
### Changed ### Changed
- **provider**: Refresh models for individual AI providers in Settings and choose which models to add. Use Add Provider to set up a new provider.
## [0.7.2] - 2026-11-27 ## [0.7.2] - 2026-11-27
### Added ### Added
+1
View File
@@ -68,6 +68,7 @@ apps/web/e2e/
| Owner manages resource quotas in settings and resets usage from the dashboard | `tests/team/quotas-settings.spec.ts` | | Owner manages resource quotas in settings and resets usage from the dashboard | `tests/team/quotas-settings.spec.ts` |
| Owner creates an API token that is shown once, listed by hint, and authenticates API calls | `tests/team/api-tokens.spec.ts` | | Owner creates an API token that is shown once, listed by hint, and authenticates API calls | `tests/team/api-tokens.spec.ts` |
| Session logs stay within the dialog and scroll through long messages and expanded records on desktop and narrow screens | `tests/team/agent-session-logs.spec.ts` | | Session logs stay within the dialog and scroll through long messages and expanded records on desktop and narrow screens | `tests/team/agent-session-logs.spec.ts` |
| Provider cards show credential status, and the selected provider's model preview scrolls on desktop and mobile | `tests/team/provider-model-refresh.spec.ts` |
### project ### project
| Test | File | | Test | File |
@@ -0,0 +1,104 @@
import type { RefreshedProviderModel } from '@shumai/dtos'
import { expect, test } from '../../fixtures'
test('provider cards show credential status and open a scrollable preview for the selected provider', async ({
owner,
prisma,
}) => {
const { page, teamId } = owner
const provider = await prisma.provider.create({
data: {
teamId,
name: 'OpenAI production',
config: {
api: 'openai-responses',
baseUrl: 'https://api.openai.com/v1',
apiKey: 'saved-test-key',
},
},
})
const missing = await prisma.provider.create({
data: {
teamId,
name: 'Anthropic staging',
config: {
api: 'anthropic-messages',
baseUrl: 'https://api.anthropic.com',
apiKey: 'UNSET_E2E_ANTHROPIC_KEY',
},
},
})
const models = Array.from({ length: 48 }, (_, index): RefreshedProviderModel => ({
modelId: `test-model-${index + 1}`,
name: `Test Model ${index + 1}`,
config: {
reasoning: false,
input: ['text'],
contextWindow: 128000,
maxTokens: 4096,
cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
},
}))
const releasePreview = Promise.withResolvers<void>()
await page.route(
`**/api/teams/${teamId}/providers/${provider.id}/models/refresh`,
async (route) => {
await releasePreview.promise
await route.fulfill({
json: { status: 'ready', providerUpdatedAt: provider.updatedAt.toISOString(), models },
})
},
)
await page.goto(`/teams/${teamId}/settings#providers`)
const cards = page.locator('main [data-slot="card"]')
const openai = cards.filter({ hasText: provider.name })
const anthropic = cards.filter({ hasText: missing.name })
const refresh = openai.getByRole('button', { name: /Refresh models for OpenAI production/ })
await expect(cards.first()).toContainText(provider.name)
await expect(openai.getByText('Configured', { exact: true })).toBeVisible()
await expect(anthropic.getByText('Configured', { exact: true })).toHaveCount(0)
await expect(anthropic.getByRole('button', { name: /Refresh models/ })).toBeEnabled()
await refresh.focus()
await page.keyboard.press('Enter')
await expect(refresh).toHaveAttribute('aria-busy', 'true')
await expect(anthropic.getByRole('button', { name: /Refresh models/ })).toHaveAttribute(
'aria-busy',
'false',
)
releasePreview.resolve()
const dialog = page.getByRole('dialog', { name: 'New models for OpenAI production' })
await expect(dialog).toBeVisible()
await expect(dialog.getByRole('checkbox', { name: 'Test Model 1 test-model-1' })).toBeVisible()
for (const viewport of [
{ width: 1280, height: 800 },
{ width: 390, height: 640 },
]) {
await page.setViewportSize(viewport)
await expect
.poll(() =>
dialog.locator('[data-slot="scroll-area-viewport"]').evaluate((element) => {
const scrollAreaBounds = element.getBoundingClientRect()
const dialogBounds = element.closest('[role="dialog"]')?.getBoundingClientRect()
return (
dialogBounds !== undefined &&
dialogBounds.left >= 0 &&
dialogBounds.right <= window.innerWidth &&
dialogBounds.top >= 0 &&
dialogBounds.bottom <= window.innerHeight &&
scrollAreaBounds.bottom < dialogBounds.bottom &&
element.scrollHeight > element.clientHeight
)
}),
)
.toBe(true)
}
await dialog.getByRole('button', { name: 'Cancel' }).click()
await expect(dialog).toBeHidden()
await expect(refresh).toBeFocused()
})
+185 -121
View File
@@ -147,9 +147,9 @@
"name": "@shumai/agent", "name": "@shumai/agent",
"version": "0.7.2", "version": "0.7.2",
"dependencies": { "dependencies": {
"@earendil-works/chord": "1.5.0", "@earendil-works/chord": "1.7.0",
"@earendil-works/pi-ai": "1.5.0", "@earendil-works/pi-ai": "1.7.0",
"@earendil-works/pi-durable": "1.5.0", "@earendil-works/pi-durable": "1.7.0",
"@google/genai": "2.28.0", "@google/genai": "2.28.0",
"@shumai/core": "workspace:*", "@shumai/core": "workspace:*",
"@shumai/db": "workspace:*", "@shumai/db": "workspace:*",
@@ -172,7 +172,7 @@
"version": "0.7.2", "version": "0.7.2",
"dependencies": { "dependencies": {
"@better-auth/mcp": "1.7.12", "@better-auth/mcp": "1.7.12",
"@earendil-works/pi-durable": "1.5.0", "@earendil-works/pi-durable": "1.7.0",
"@hono/zod-validator": "0.7.6", "@hono/zod-validator": "0.7.6",
"@modelcontextprotocol/server": "2.0.0", "@modelcontextprotocol/server": "2.0.0",
"@shumai/core": "workspace:*", "@shumai/core": "workspace:*",
@@ -214,9 +214,9 @@
"@aws-sdk/s3-request-presigner": "3.1121.0", "@aws-sdk/s3-request-presigner": "3.1121.0",
"@better-auth/mcp": "1.7.12", "@better-auth/mcp": "1.7.12",
"@better-auth/oauth-provider": "1.7.12", "@better-auth/oauth-provider": "1.7.12",
"@earendil-works/chord": "1.5.0", "@earendil-works/chord": "1.7.0",
"@earendil-works/pi-ai": "1.5.0", "@earendil-works/pi-ai": "1.7.0",
"@earendil-works/pi-durable": "1.5.0", "@earendil-works/pi-durable": "1.7.0",
"@google/genai": "2.28.0", "@google/genai": "2.28.0",
"@modelcontextprotocol/client": "2.0.0", "@modelcontextprotocol/client": "2.0.0",
"@shumai/db": "workspace:*", "@shumai/db": "workspace:*",
@@ -271,8 +271,8 @@
"name": "@shumai/dtos", "name": "@shumai/dtos",
"version": "0.7.2", "version": "0.7.2",
"dependencies": { "dependencies": {
"@earendil-works/pi-ai": "1.5.0", "@earendil-works/pi-ai": "1.7.0",
"@earendil-works/pi-durable": "1.5.0", "@earendil-works/pi-durable": "1.7.0",
"zod": "4.5.4", "zod": "4.5.4",
}, },
}, },
@@ -280,8 +280,8 @@
"name": "@shumai/e2e", "name": "@shumai/e2e",
"version": "0.7.2", "version": "0.7.2",
"dependencies": { "dependencies": {
"@earendil-works/pi-ai": "1.5.0", "@earendil-works/pi-ai": "1.7.0",
"@earendil-works/pi-durable": "1.5.0", "@earendil-works/pi-durable": "1.7.0",
"@google/genai": "2.28.0", "@google/genai": "2.28.0",
"@shumai/agent": "workspace:*", "@shumai/agent": "workspace:*",
"@shumai/core": "workspace:*", "@shumai/core": "workspace:*",
@@ -323,8 +323,8 @@
"@dnd-kit/abstract": "0.5.0", "@dnd-kit/abstract": "0.5.0",
"@dnd-kit/dom": "0.5.0", "@dnd-kit/dom": "0.5.0",
"@dnd-kit/react": "0.5.0", "@dnd-kit/react": "0.5.0",
"@earendil-works/pi-ai": "1.5.0", "@earendil-works/pi-ai": "1.7.0",
"@earendil-works/pi-durable": "1.5.0", "@earendil-works/pi-durable": "1.7.0",
"@ferrucc-io/emoji-picker": "0.1.2", "@ferrucc-io/emoji-picker": "0.1.2",
"@hookform/resolvers": "5.9.1", "@hookform/resolvers": "5.9.1",
"@lexical/code": "0.49.0", "@lexical/code": "0.49.0",
@@ -496,21 +496,21 @@
"@aws-sdk/core": ["@aws-sdk/core@3.977.9", "", { "dependencies": { "@aws-sdk/types": "^3.974.5", "@aws-sdk/xml-builder": "^3.972.40", "@aws/lambda-invoke-store": "^0.3.0", "@smithy/core": "^3.33.3", "@smithy/signature-v4": "^5.6.12", "@smithy/types": "^4.17.2", "bowser": "^2.11.0", "tslib": "^2.6.2" } }, "sha512-reqPFEQrZxDZpeGj4PFMepBeR5LGYHRqq/L0motTzgFkCRBA4rFdaVXDSLYyGHhxVz7sT2PDnPN9CluGSfgyJA=="], "@aws-sdk/core": ["@aws-sdk/core@3.977.9", "", { "dependencies": { "@aws-sdk/types": "^3.974.5", "@aws-sdk/xml-builder": "^3.972.40", "@aws/lambda-invoke-store": "^0.3.0", "@smithy/core": "^3.33.3", "@smithy/signature-v4": "^5.6.12", "@smithy/types": "^4.17.2", "bowser": "^2.11.0", "tslib": "^2.6.2" } }, "sha512-reqPFEQrZxDZpeGj4PFMepBeR5LGYHRqq/L0motTzgFkCRBA4rFdaVXDSLYyGHhxVz7sT2PDnPN9CluGSfgyJA=="],
"@aws-sdk/credential-provider-env": ["@aws-sdk/credential-provider-env@3.972.70", "", { "dependencies": { "@aws-sdk/core": "^3.977.9", "@aws-sdk/types": "^3.974.5", "@smithy/core": "^3.33.3", "@smithy/types": "^4.17.2", "tslib": "^2.6.2" } }, "sha512-H404B7dJl2mCrBqahDEYsanB0xhdDp6tXnXcTUnXmmpy2Q3J0Ho0bUajZ2jr/RdwzCyS59Gi8xXIFwPLGBl6Uw=="], "@aws-sdk/credential-provider-env": ["@aws-sdk/credential-provider-env@3.972.80", "", { "dependencies": { "@aws-sdk/core": "^3.979.1", "@aws-sdk/types": "^3.975.0", "@smithy/core": "^3.38.0", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-uO5TiSvb6j1w9RTe5z28OaOmsrOxVQUPaC5+wZl50RfOXcrYD/KgnS8I9lfyGXc7sGbkCopK6VnhNIAoLqfewQ=="],
"@aws-sdk/credential-provider-http": ["@aws-sdk/credential-provider-http@3.972.72", "", { "dependencies": { "@aws-sdk/core": "^3.977.9", "@aws-sdk/types": "^3.974.5", "@smithy/core": "^3.33.3", "@smithy/fetch-http-handler": "^5.7.2", "@smithy/node-http-handler": "^4.11.3", "@smithy/types": "^4.17.2", "tslib": "^2.6.2" } }, "sha512-X98zYOrVOeuosCX+6ktf29FC2N2GHPLia7qv6mzPzTc+RPAuHWCDS++Z6JK7eGYqb/v6uaW7bAXaOvDBfol+0w=="], "@aws-sdk/credential-provider-http": ["@aws-sdk/credential-provider-http@3.972.82", "", { "dependencies": { "@aws-sdk/core": "^3.979.1", "@aws-sdk/types": "^3.975.0", "@smithy/core": "^3.38.0", "@smithy/fetch-http-handler": "^5.8.0", "@smithy/node-http-handler": "^4.14.0", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-vQzlDHlC24Yz42p+rT4NBoP/5VdetkBoujbOLq9h6QYWC8THuZSPYnXIR9OP3XcOrdMgPBBipOrdssfxnIiWUg=="],
"@aws-sdk/credential-provider-ini": ["@aws-sdk/credential-provider-ini@3.973.15", "", { "dependencies": { "@aws-sdk/core": "^3.977.9", "@aws-sdk/credential-provider-env": "^3.972.70", "@aws-sdk/credential-provider-http": "^3.972.72", "@aws-sdk/credential-provider-login": "^3.972.77", "@aws-sdk/credential-provider-process": "^3.972.70", "@aws-sdk/credential-provider-sso": "^3.973.14", "@aws-sdk/credential-provider-web-identity": "^3.972.76", "@aws-sdk/nested-clients": "^3.997.44", "@aws-sdk/types": "^3.974.5", "@smithy/core": "^3.33.3", "@smithy/credential-provider-imds": "^4.4.16", "@smithy/types": "^4.17.2", "tslib": "^2.6.2" } }, "sha512-Rykg6s5ceBuynMOGWgoowO4N+27JfnqXAnVaSunZl0hOO1XodSrxGNz6sCEbnmS0lAfQZDKyb3fbr46gSuv6Sg=="], "@aws-sdk/credential-provider-ini": ["@aws-sdk/credential-provider-ini@3.973.25", "", { "dependencies": { "@aws-sdk/core": "^3.979.1", "@aws-sdk/credential-provider-env": "^3.972.80", "@aws-sdk/credential-provider-http": "^3.972.82", "@aws-sdk/credential-provider-login": "^3.972.87", "@aws-sdk/credential-provider-process": "^3.972.80", "@aws-sdk/credential-provider-sso": "^3.973.24", "@aws-sdk/credential-provider-web-identity": "^3.972.86", "@aws-sdk/nested-clients": "^3.997.54", "@aws-sdk/types": "^3.975.0", "@smithy/core": "^3.38.0", "@smithy/credential-provider-imds": "^4.5.2", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-b5xl71uCRdWsu7P1VeGpiGuCf6zfYETsSNOv8AmYVTrsgbvTJRXdmmOPVfxkvGGVNsiKkGctClQW3jAn0SZLug=="],
"@aws-sdk/credential-provider-login": ["@aws-sdk/credential-provider-login@3.972.77", "", { "dependencies": { "@aws-sdk/core": "^3.977.9", "@aws-sdk/nested-clients": "^3.997.44", "@aws-sdk/types": "^3.974.5", "@smithy/core": "^3.33.3", "@smithy/types": "^4.17.2", "tslib": "^2.6.2" } }, "sha512-Jb59xfEISoN5mmbnA+HYqdtrSX3CgCtJoof+V5D8/TgUI56W63GEEd5Y58WijU3Ou6+WEgaLD1feVzaRXV5IDQ=="], "@aws-sdk/credential-provider-login": ["@aws-sdk/credential-provider-login@3.972.87", "", { "dependencies": { "@aws-sdk/core": "^3.979.1", "@aws-sdk/nested-clients": "^3.997.54", "@aws-sdk/types": "^3.975.0", "@smithy/core": "^3.38.0", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-C4ZFmcwM+Zj14Z8huVUk54Gv4uzT1ZdzG9cY3Gdh8FePakq7Bss1OFsgZjAhWFOkFOGpBvFBeu0OWjWf8HNKRQ=="],
"@aws-sdk/credential-provider-node": ["@aws-sdk/credential-provider-node@3.972.81", "", { "dependencies": { "@aws-sdk/credential-provider-env": "^3.972.70", "@aws-sdk/credential-provider-http": "^3.972.72", "@aws-sdk/credential-provider-ini": "^3.973.15", "@aws-sdk/credential-provider-process": "^3.972.70", "@aws-sdk/credential-provider-sso": "^3.973.14", "@aws-sdk/credential-provider-web-identity": "^3.972.76", "@aws-sdk/types": "^3.974.5", "@smithy/core": "^3.33.3", "@smithy/credential-provider-imds": "^4.4.16", "@smithy/types": "^4.17.2", "tslib": "^2.6.2" } }, "sha512-Rml+WitoFvXmv6JZ18U/xGdGDGGvB/mOin0ya0lTnTrdC0Z1lrVxTYh7iNklZBcvcRMrs4DoEf6xy1KWyrLQQw=="], "@aws-sdk/credential-provider-node": ["@aws-sdk/credential-provider-node@3.972.82", "", { "dependencies": { "@aws-sdk/credential-provider-env": "^3.972.70", "@aws-sdk/credential-provider-http": "^3.972.72", "@aws-sdk/credential-provider-ini": "^3.973.15", "@aws-sdk/credential-provider-process": "^3.972.70", "@aws-sdk/credential-provider-sso": "^3.973.14", "@aws-sdk/credential-provider-web-identity": "^3.972.76", "@aws-sdk/types": "^3.974.5", "@smithy/core": "^3.33.3", "@smithy/credential-provider-imds": "^4.4.16", "@smithy/types": "^4.17.2", "tslib": "^2.6.2" } }, "sha512-znDkEOGXB8W3kG1LJUKP3foBZY/9qLM0eil/DxWXSp37XsdsRLQHE/d/OaCGGVgKpA6znR38h/+INk8do1FjiA=="],
"@aws-sdk/credential-provider-process": ["@aws-sdk/credential-provider-process@3.972.70", "", { "dependencies": { "@aws-sdk/core": "^3.977.9", "@aws-sdk/types": "^3.974.5", "@smithy/core": "^3.33.3", "@smithy/types": "^4.17.2", "tslib": "^2.6.2" } }, "sha512-2ry03fGRJr4sV3jI+ocjj5JqALnFD6ymM5KiNCDZMvq8bX2GSbE0vji4aM43TVCl2nXqqLRZaUxdq/KeWRAY4Q=="], "@aws-sdk/credential-provider-process": ["@aws-sdk/credential-provider-process@3.972.80", "", { "dependencies": { "@aws-sdk/core": "^3.979.1", "@aws-sdk/types": "^3.975.0", "@smithy/core": "^3.38.0", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-xqfixO5aclje7tbQJDias+iNND5wp/3QZixCdZcVQpgWPTZ0V5DfTW9A804A5Z7ezu7sH3WRO+vzUjtiJBA8yg=="],
"@aws-sdk/credential-provider-sso": ["@aws-sdk/credential-provider-sso@3.973.14", "", { "dependencies": { "@aws-sdk/core": "^3.977.9", "@aws-sdk/nested-clients": "^3.997.44", "@aws-sdk/token-providers": "3.1116.0", "@aws-sdk/types": "^3.974.5", "@smithy/core": "^3.33.3", "@smithy/types": "^4.17.2", "tslib": "^2.6.2" } }, "sha512-jkhg/8ocAAoc0RFyLMhCw+/zZh7gystQgd4F4hznNa8P4Cc501PQmxd+jGLiMHodPJ+7Zv/3znM62gZojyasmA=="], "@aws-sdk/credential-provider-sso": ["@aws-sdk/credential-provider-sso@3.973.24", "", { "dependencies": { "@aws-sdk/core": "^3.979.1", "@aws-sdk/nested-clients": "^3.997.54", "@aws-sdk/token-providers": "3.1161.0", "@aws-sdk/types": "^3.975.0", "@smithy/core": "^3.38.0", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-nlg3BKG03Cgzvv/dMnhxvDJPhAhQSpaN0RUdwgU7ziwkasoev7iI8el8Xy4Rd5sqzgaDUbV269fOXck5SargqA=="],
"@aws-sdk/credential-provider-web-identity": ["@aws-sdk/credential-provider-web-identity@3.972.76", "", { "dependencies": { "@aws-sdk/core": "^3.977.9", "@aws-sdk/nested-clients": "^3.997.44", "@aws-sdk/types": "^3.974.5", "@smithy/core": "^3.33.3", "@smithy/types": "^4.17.2", "tslib": "^2.6.2" } }, "sha512-d3AGyVu759PGr35mEB2s22xxlNEA5rpdxtSPJthfPFJvoQ8dt357iVPECqWfUxXp1toJAvKmbtcIYVGigaGsCA=="], "@aws-sdk/credential-provider-web-identity": ["@aws-sdk/credential-provider-web-identity@3.972.86", "", { "dependencies": { "@aws-sdk/core": "^3.979.1", "@aws-sdk/nested-clients": "^3.997.54", "@aws-sdk/types": "^3.975.0", "@smithy/core": "^3.38.0", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-zKTyLJBEyfQBVlYqT6Jt+mYV4r8kGbWM7dn6v4Y4MRARizhYafjDXP/iMu76UMRhToSPNmIKX1XAb24gtpBFIA=="],
"@aws-sdk/eventstream-handler-node": ["@aws-sdk/eventstream-handler-node@3.972.34", "", { "dependencies": { "@aws-sdk/types": "^3.974.5", "@smithy/core": "^3.33.3", "@smithy/types": "^4.17.2", "tslib": "^2.6.2" } }, "sha512-cTeVzpu1xEAkryTZBYhGwnQ6gOGyp8ZYZvmn0Sg/nI/ABmy/CRHHxPDJDUi9PxwxUtGGaatvfRUB3FCgT/rSWw=="], "@aws-sdk/eventstream-handler-node": ["@aws-sdk/eventstream-handler-node@3.972.34", "", { "dependencies": { "@aws-sdk/types": "^3.974.5", "@smithy/core": "^3.33.3", "@smithy/types": "^4.17.2", "tslib": "^2.6.2" } }, "sha512-cTeVzpu1xEAkryTZBYhGwnQ6gOGyp8ZYZvmn0Sg/nI/ABmy/CRHHxPDJDUi9PxwxUtGGaatvfRUB3FCgT/rSWw=="],
@@ -618,17 +618,17 @@
"@dnd-kit/state": ["@dnd-kit/state@0.5.0", "", { "dependencies": { "@preact/signals-core": "^1.10.0", "tslib": "^2.6.2" } }, "sha512-y7XbabQqjF58Lk8YmDQuR8l6QjN+Kh4qlGEjUvHuIeasLk1QP+9L5diXS98VMxQIivyMmUtX2//f+3N7qPJX4w=="], "@dnd-kit/state": ["@dnd-kit/state@0.5.0", "", { "dependencies": { "@preact/signals-core": "^1.10.0", "tslib": "^2.6.2" } }, "sha512-y7XbabQqjF58Lk8YmDQuR8l6QjN+Kh4qlGEjUvHuIeasLk1QP+9L5diXS98VMxQIivyMmUtX2//f+3N7qPJX4w=="],
"@earendil-works/chord": ["@earendil-works/chord@1.5.0", "", { "dependencies": { "@earendil-works/pi-schema": "1.5.0", "@earendil-works/pi-telemetry": "1.5.0" }, "peerDependencies": { "esbuild": "0.28.2", "ws": "8.21.0" }, "optionalPeers": ["esbuild", "ws"] }, "sha512-jf555zbCM21E03DVBDPD/Tuae0lz64YjaHx/athUxNZ/H7phVVb0dWfZsaYnxaXPQ1odW8iHEoVLOlE/prvUPg=="], "@earendil-works/chord": ["@earendil-works/chord@1.7.0", "", { "dependencies": { "@earendil-works/pi-schema": "1.7.0", "@earendil-works/pi-telemetry": "1.7.0" }, "peerDependencies": { "esbuild": "^0.28.2", "react": "^19.3.0", "ws": "^8.21.0" }, "optionalPeers": ["esbuild", "react", "ws"] }, "sha512-/zBlRrJkNbw0dJ4OrUzk08PC48mzOIFZQKTUE1qxQUWoPlf/xms95lEigzC30MllS+k5qqih7Clg0cTzYgPs1w=="],
"@earendil-works/pi-ai": ["@earendil-works/pi-ai@1.5.0", "", { "dependencies": { "@anthropic-ai/sdk": "0.129.0", "@aws-sdk/client-bedrock-runtime": "3.1127.0", "@earendil-works/pi-schema": "1.5.0", "@earendil-works/pi-telemetry": "1.5.0", "@google/genai": "2.21.0", "@smithy/node-http-handler": "4.12.1", "http-proxy-agent": "9.1.0", "https-proxy-agent": "9.1.0", "openai": "7.19.0", "partial-json": "0.1.7" }, "bin": { "pi-ai": "dist/cli.js" } }, "sha512-VeWxNqTHSqRCf8AcY/6kvNwh+neRL6MPxZPePVztIQy6qqK9MR/YoCSN/ZgDnIyCD3pqEXgRyQbzk4KV4uvjbg=="], "@earendil-works/pi-ai": ["@earendil-works/pi-ai@1.7.0", "", { "dependencies": { "@anthropic-ai/sdk": "0.129.0", "@aws-sdk/client-bedrock-runtime": "3.1127.0", "@aws-sdk/credential-provider-node": "3.972.82", "@earendil-works/pi-schema": "1.7.0", "@earendil-works/pi-telemetry": "1.7.0", "@google/genai": "3.6.1", "@smithy/node-http-handler": "4.12.1", "http-proxy-agent": "9.1.0", "https-proxy-agent": "9.1.0", "openai": "7.59.0", "partial-json": "0.1.7" }, "bin": { "pi-ai": "dist/cli.js" } }, "sha512-iKryMlUYniwWbU7YU0uS7W0+cGd9c6oJ6PzRLOn8j4+1njG4c+BQq1cNawctx/npDqGeOx8ME7Gkgl6K6arPuw=="],
"@earendil-works/pi-codemode": ["@earendil-works/pi-codemode@1.5.0", "", { "dependencies": { "quickjs-wasi": "3.6.2" } }, "sha512-PLBJZ17AEWGzOlAAcFuOkw3PxkOti0JlFuZQyeF2GRTqbpuYo4k9t8YqUV2uOQVzrUnKdxahwaFUqc1eNS1WAg=="], "@earendil-works/pi-codemode": ["@earendil-works/pi-codemode@1.7.0", "", { "dependencies": { "quickjs-wasi": "3.6.2" } }, "sha512-fhCoh8TLxhdRTOWSEplwp39Uv+JTsu9pCqtgu9gorO8zcaw92vsbVI/G89yFs92csTo2+yB7EsJq/+725Vj+eA=="],
"@earendil-works/pi-durable": ["@earendil-works/pi-durable@1.5.0", "", { "dependencies": { "@earendil-works/chord": "1.5.0", "@earendil-works/pi-ai": "1.5.0", "@earendil-works/pi-codemode": "1.5.0", "@earendil-works/pi-schema": "1.5.0", "@earendil-works/pi-telemetry": "1.5.0", "@silvia-odwyer/photon": "0.3.3", "diff": "8.0.4" } }, "sha512-xeBP2vIo5NvsCMQ4Y/V+Z164xQEi9JWiBWHdjn4Z15EnFqV3c0FxJAX26FqyyyintrYyk+Enre94GNcvRlBA5g=="], "@earendil-works/pi-durable": ["@earendil-works/pi-durable@1.7.0", "", { "dependencies": { "@earendil-works/chord": "1.7.0", "@earendil-works/pi-ai": "1.7.0", "@earendil-works/pi-codemode": "1.7.0", "@earendil-works/pi-schema": "1.7.0", "@earendil-works/pi-telemetry": "1.7.0", "@silvia-odwyer/photon": "0.3.3", "diff": "8.0.4" } }, "sha512-qL9PlFfXrirBNt7QR2bjZfviN6ZVcsGTHEqaj6U4Lxqqx9Vtth7LyIuGNlG2chDKMr3/ABamH8qZ9ggMgTGDOQ=="],
"@earendil-works/pi-schema": ["@earendil-works/pi-schema@1.5.0", "", {}, "sha512-RW0MbT2tR65OY6xMsgB/yVBb7m/RTNwA+9hurSN1vVXfHZRVmVnXbruBPrx/PzbrQnW5yLVlMRWxErGDQtF1Hg=="], "@earendil-works/pi-schema": ["@earendil-works/pi-schema@1.7.0", "", {}, "sha512-skji4McLg9jum3NFWzFa/4QRGEZhMGnSi3QL8b9VljJkc/QopH2/BFuGKI+VcEwYzKGwsd0I8RzvXGnZGfGltQ=="],
"@earendil-works/pi-telemetry": ["@earendil-works/pi-telemetry@1.5.0", "", {}, "sha512-VW3tcVdnNfl/Vk8wHPTzZdKkxcsCOM12ppiO4DXnd9wMxUCmOfLt/wvUnWeKWbTVlVSRg0uqKtnnhE2UCsG2Bw=="], "@earendil-works/pi-telemetry": ["@earendil-works/pi-telemetry@1.7.0", "", {}, "sha512-QZkngqktohuFZ2TZuJSXDuUntld4sCMW1tkUPaD4moMEX/z1lwcjycXnd9ChO9HNxm/Jfo+UTiC+N2hkAF9b0w=="],
"@electric-sql/pglite": ["@electric-sql/pglite@0.4.3", "", {}, "sha512-ichuWTgtd4mOM1G4SpyGJa5trT03lWbMypDV0fUXUCXg5hiHqVAz/bZyV68NqmkLB7WcYmj1RMJVSp8HV/v/ZQ=="], "@electric-sql/pglite": ["@electric-sql/pglite@0.4.3", "", {}, "sha512-ichuWTgtd4mOM1G4SpyGJa5trT03lWbMypDV0fUXUCXg5hiHqVAz/bZyV68NqmkLB7WcYmj1RMJVSp8HV/v/ZQ=="],
@@ -2498,7 +2498,7 @@
"once": ["once@1.4.0", "", { "dependencies": { "wrappy": "1" } }, "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w=="], "once": ["once@1.4.0", "", { "dependencies": { "wrappy": "1" } }, "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w=="],
"openai": ["openai@7.19.0", "", { "peerDependencies": { "@aws-sdk/credential-provider-node": ">=3.972.0 <4", "@smithy/hash-node": ">=4.3.0 <5", "@smithy/signature-v4": ">=5.4.0 <6", "undici": ">=5 <9", "ws": "^8.21.0", "zod": "^3.25 || ^4.0" }, "optionalPeers": ["@aws-sdk/credential-provider-node", "@smithy/hash-node", "@smithy/signature-v4", "undici", "ws", "zod"] }, "sha512-MX2s3u2L5racTO0CC/SWpCOasJQBCJrqLKXK+l82cAhdeF8mPMBEe/gxMm0ZFa2xpKpOFLRjxv5afYEZbBXmbQ=="], "openai": ["openai@7.59.0", "", { "peerDependencies": { "@aws-sdk/credential-provider-node": ">=3.972.0 <4", "@smithy/hash-node": ">=4.3.0 <5", "@smithy/signature-v4": ">=5.4.0 <6", "google-auth-library": ">=9.15.1 <12", "undici": ">=5 <9", "ws": "^8.21.0", "zod": "^3.25 || ^4.0" }, "optionalPeers": ["@aws-sdk/credential-provider-node", "@smithy/hash-node", "@smithy/signature-v4", "google-auth-library", "undici", "ws", "zod"] }, "sha512-wPYKJkLPFEdNJ2tThSg4jE1Ptsv4X3u8g8LIvu0Qz/UIhsKeCzl73rl48PtQsDVrJL/ku0liXOsbyd2TsRsPJw=="],
"optionator": ["optionator@0.9.4", "", { "dependencies": { "deep-is": "^0.1.3", "fast-levenshtein": "^2.0.6", "levn": "^0.4.1", "prelude-ls": "^1.2.1", "type-check": "^0.4.0", "word-wrap": "^1.2.5" } }, "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g=="], "optionator": ["optionator@0.9.4", "", { "dependencies": { "deep-is": "^0.1.3", "fast-levenshtein": "^2.0.6", "levn": "^0.4.1", "prelude-ls": "^1.2.1", "type-check": "^0.4.0", "word-wrap": "^1.2.5" } }, "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g=="],
@@ -3046,11 +3046,85 @@
"@aws-sdk/client-bedrock-runtime/@smithy/node-http-handler": ["@smithy/node-http-handler@4.11.3", "", { "dependencies": { "@smithy/core": "^3.33.3", "@smithy/types": "^4.17.2", "tslib": "^2.6.2" } }, "sha512-2jY1tSpERfPfWqyBV2pH+iGFaghVsIJszJNsT7hxtQYhVJpWDyc0LqOWI+nXOxOAHaEfZ4PXXtp1wW1TGpHhkA=="], "@aws-sdk/client-bedrock-runtime/@smithy/node-http-handler": ["@smithy/node-http-handler@4.11.3", "", { "dependencies": { "@smithy/core": "^3.33.3", "@smithy/types": "^4.17.2", "tslib": "^2.6.2" } }, "sha512-2jY1tSpERfPfWqyBV2pH+iGFaghVsIJszJNsT7hxtQYhVJpWDyc0LqOWI+nXOxOAHaEfZ4PXXtp1wW1TGpHhkA=="],
"@aws-sdk/client-s3/@aws-sdk/credential-provider-node": ["@aws-sdk/credential-provider-node@3.972.81", "", { "dependencies": { "@aws-sdk/credential-provider-env": "^3.972.70", "@aws-sdk/credential-provider-http": "^3.972.72", "@aws-sdk/credential-provider-ini": "^3.973.15", "@aws-sdk/credential-provider-process": "^3.972.70", "@aws-sdk/credential-provider-sso": "^3.973.14", "@aws-sdk/credential-provider-web-identity": "^3.972.76", "@aws-sdk/types": "^3.974.5", "@smithy/core": "^3.33.3", "@smithy/credential-provider-imds": "^4.4.16", "@smithy/types": "^4.17.2", "tslib": "^2.6.2" } }, "sha512-Rml+WitoFvXmv6JZ18U/xGdGDGGvB/mOin0ya0lTnTrdC0Z1lrVxTYh7iNklZBcvcRMrs4DoEf6xy1KWyrLQQw=="],
"@aws-sdk/client-s3/@smithy/node-http-handler": ["@smithy/node-http-handler@4.11.3", "", { "dependencies": { "@smithy/core": "^3.33.3", "@smithy/types": "^4.17.2", "tslib": "^2.6.2" } }, "sha512-2jY1tSpERfPfWqyBV2pH+iGFaghVsIJszJNsT7hxtQYhVJpWDyc0LqOWI+nXOxOAHaEfZ4PXXtp1wW1TGpHhkA=="], "@aws-sdk/client-s3/@smithy/node-http-handler": ["@smithy/node-http-handler@4.11.3", "", { "dependencies": { "@smithy/core": "^3.33.3", "@smithy/types": "^4.17.2", "tslib": "^2.6.2" } }, "sha512-2jY1tSpERfPfWqyBV2pH+iGFaghVsIJszJNsT7hxtQYhVJpWDyc0LqOWI+nXOxOAHaEfZ4PXXtp1wW1TGpHhkA=="],
"@aws-sdk/credential-provider-http/@smithy/node-http-handler": ["@smithy/node-http-handler@4.11.3", "", { "dependencies": { "@smithy/core": "^3.33.3", "@smithy/types": "^4.17.2", "tslib": "^2.6.2" } }, "sha512-2jY1tSpERfPfWqyBV2pH+iGFaghVsIJszJNsT7hxtQYhVJpWDyc0LqOWI+nXOxOAHaEfZ4PXXtp1wW1TGpHhkA=="], "@aws-sdk/credential-provider-env/@aws-sdk/core": ["@aws-sdk/core@3.979.1", "", { "dependencies": { "@aws-sdk/types": "^3.975.0", "@aws-sdk/xml-builder": "^3.972.42", "@aws/lambda-invoke-store": "^0.3.0", "@smithy/core": "^3.38.0", "@smithy/signature-v4": "^5.7.5", "@smithy/types": "^4.19.0", "bowser": "^2.11.0", "tslib": "^2.6.2" } }, "sha512-ayOlV1VhLNMiq8PW9ZkVobG4gkldnUoHjG69yy2b8j+VYFlhz/uAL7ZdYQAoQ+eShtGUdNDnnG5rxDg6yUJrOg=="],
"@aws-sdk/credential-provider-sso/@aws-sdk/token-providers": ["@aws-sdk/token-providers@3.1116.0", "", { "dependencies": { "@aws-sdk/core": "^3.977.9", "@aws-sdk/nested-clients": "^3.997.44", "@aws-sdk/types": "^3.974.5", "@smithy/core": "^3.33.3", "@smithy/types": "^4.17.2", "tslib": "^2.6.2" } }, "sha512-ygIivKqh8aHzNkucOCXHyIBgBpLPfrSI0mCqXF+vLBsPTUKqj0VSqAY0GFPe7lQl4HntjOcQ+KSyS7oUV2C54Q=="], "@aws-sdk/credential-provider-env/@aws-sdk/types": ["@aws-sdk/types@3.975.0", "", { "dependencies": { "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-WQlhs6juByzWOzj5fwxOx0mPJaEqMcG/sDpl3Id61B3XhKE63xY+0QWcnG+sWR/sCfprmreyUo1lM7IKZmHMzw=="],
"@aws-sdk/credential-provider-env/@smithy/core": ["@smithy/core@3.38.1", "", { "dependencies": { "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-U/mB2XiwTLaf+NSgLSWwJfptsMT/H8aBi0aTAA/E5e2/TagFeGCqAyhKGG0w0A9IWTkm4qYEmLoD/HB6aYfnRA=="],
"@aws-sdk/credential-provider-env/@smithy/types": ["@smithy/types@4.19.0", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-r7jh49VJxGerfAcTQA6gXcKc+98zOp/tqRwzYjgOE+iSQsP6cEU1hq2QzbuipmP68QtYdY9wKEhiCQZIzHgZ4Q=="],
"@aws-sdk/credential-provider-http/@aws-sdk/core": ["@aws-sdk/core@3.979.1", "", { "dependencies": { "@aws-sdk/types": "^3.975.0", "@aws-sdk/xml-builder": "^3.972.42", "@aws/lambda-invoke-store": "^0.3.0", "@smithy/core": "^3.38.0", "@smithy/signature-v4": "^5.7.5", "@smithy/types": "^4.19.0", "bowser": "^2.11.0", "tslib": "^2.6.2" } }, "sha512-ayOlV1VhLNMiq8PW9ZkVobG4gkldnUoHjG69yy2b8j+VYFlhz/uAL7ZdYQAoQ+eShtGUdNDnnG5rxDg6yUJrOg=="],
"@aws-sdk/credential-provider-http/@aws-sdk/types": ["@aws-sdk/types@3.975.0", "", { "dependencies": { "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-WQlhs6juByzWOzj5fwxOx0mPJaEqMcG/sDpl3Id61B3XhKE63xY+0QWcnG+sWR/sCfprmreyUo1lM7IKZmHMzw=="],
"@aws-sdk/credential-provider-http/@smithy/core": ["@smithy/core@3.38.1", "", { "dependencies": { "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-U/mB2XiwTLaf+NSgLSWwJfptsMT/H8aBi0aTAA/E5e2/TagFeGCqAyhKGG0w0A9IWTkm4qYEmLoD/HB6aYfnRA=="],
"@aws-sdk/credential-provider-http/@smithy/fetch-http-handler": ["@smithy/fetch-http-handler@5.8.0", "", { "dependencies": { "@smithy/core": "^3.33.3", "@smithy/types": "^4.18.0", "tslib": "^2.6.2" } }, "sha512-ycSJu3tFAQ4v04CBB0agqFMVsSQ1iG3yw+SpgxRqKfaURpQD4CZ8Wn0zPMmSnOuTpTh65Vz+EA0rMrw089wvkA=="],
"@aws-sdk/credential-provider-http/@smithy/node-http-handler": ["@smithy/node-http-handler@4.14.1", "", { "dependencies": { "@smithy/core": "^3.38.1", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-/T6E1jzCL0fErS9uq8JqES/5yYQQ4ppVmmYHwXw2nlov8KFzLb+3QqHR5iAun1BsuAB50IPxZliV8YMgghLwhA=="],
"@aws-sdk/credential-provider-http/@smithy/types": ["@smithy/types@4.19.0", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-r7jh49VJxGerfAcTQA6gXcKc+98zOp/tqRwzYjgOE+iSQsP6cEU1hq2QzbuipmP68QtYdY9wKEhiCQZIzHgZ4Q=="],
"@aws-sdk/credential-provider-ini/@aws-sdk/core": ["@aws-sdk/core@3.979.1", "", { "dependencies": { "@aws-sdk/types": "^3.975.0", "@aws-sdk/xml-builder": "^3.972.42", "@aws/lambda-invoke-store": "^0.3.0", "@smithy/core": "^3.38.0", "@smithy/signature-v4": "^5.7.5", "@smithy/types": "^4.19.0", "bowser": "^2.11.0", "tslib": "^2.6.2" } }, "sha512-ayOlV1VhLNMiq8PW9ZkVobG4gkldnUoHjG69yy2b8j+VYFlhz/uAL7ZdYQAoQ+eShtGUdNDnnG5rxDg6yUJrOg=="],
"@aws-sdk/credential-provider-ini/@aws-sdk/nested-clients": ["@aws-sdk/nested-clients@3.997.54", "", { "dependencies": { "@aws-sdk/core": "^3.979.1", "@aws-sdk/signature-v4-multi-region": "^3.996.51", "@aws-sdk/types": "^3.975.0", "@smithy/core": "^3.38.0", "@smithy/fetch-http-handler": "^5.8.0", "@smithy/node-http-handler": "^4.14.0", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-/OczlavsS7U5sOodRO10Ug4R/AKFVZiXTstKipWe68EfjPkmdDFNXNl9FCJyXWkg1DG6RBm3qAuVB8FNW9O8KQ=="],
"@aws-sdk/credential-provider-ini/@aws-sdk/types": ["@aws-sdk/types@3.975.0", "", { "dependencies": { "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-WQlhs6juByzWOzj5fwxOx0mPJaEqMcG/sDpl3Id61B3XhKE63xY+0QWcnG+sWR/sCfprmreyUo1lM7IKZmHMzw=="],
"@aws-sdk/credential-provider-ini/@smithy/core": ["@smithy/core@3.38.1", "", { "dependencies": { "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-U/mB2XiwTLaf+NSgLSWwJfptsMT/H8aBi0aTAA/E5e2/TagFeGCqAyhKGG0w0A9IWTkm4qYEmLoD/HB6aYfnRA=="],
"@aws-sdk/credential-provider-ini/@smithy/types": ["@smithy/types@4.19.0", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-r7jh49VJxGerfAcTQA6gXcKc+98zOp/tqRwzYjgOE+iSQsP6cEU1hq2QzbuipmP68QtYdY9wKEhiCQZIzHgZ4Q=="],
"@aws-sdk/credential-provider-login/@aws-sdk/core": ["@aws-sdk/core@3.979.1", "", { "dependencies": { "@aws-sdk/types": "^3.975.0", "@aws-sdk/xml-builder": "^3.972.42", "@aws/lambda-invoke-store": "^0.3.0", "@smithy/core": "^3.38.0", "@smithy/signature-v4": "^5.7.5", "@smithy/types": "^4.19.0", "bowser": "^2.11.0", "tslib": "^2.6.2" } }, "sha512-ayOlV1VhLNMiq8PW9ZkVobG4gkldnUoHjG69yy2b8j+VYFlhz/uAL7ZdYQAoQ+eShtGUdNDnnG5rxDg6yUJrOg=="],
"@aws-sdk/credential-provider-login/@aws-sdk/nested-clients": ["@aws-sdk/nested-clients@3.997.54", "", { "dependencies": { "@aws-sdk/core": "^3.979.1", "@aws-sdk/signature-v4-multi-region": "^3.996.51", "@aws-sdk/types": "^3.975.0", "@smithy/core": "^3.38.0", "@smithy/fetch-http-handler": "^5.8.0", "@smithy/node-http-handler": "^4.14.0", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-/OczlavsS7U5sOodRO10Ug4R/AKFVZiXTstKipWe68EfjPkmdDFNXNl9FCJyXWkg1DG6RBm3qAuVB8FNW9O8KQ=="],
"@aws-sdk/credential-provider-login/@aws-sdk/types": ["@aws-sdk/types@3.975.0", "", { "dependencies": { "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-WQlhs6juByzWOzj5fwxOx0mPJaEqMcG/sDpl3Id61B3XhKE63xY+0QWcnG+sWR/sCfprmreyUo1lM7IKZmHMzw=="],
"@aws-sdk/credential-provider-login/@smithy/core": ["@smithy/core@3.38.1", "", { "dependencies": { "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-U/mB2XiwTLaf+NSgLSWwJfptsMT/H8aBi0aTAA/E5e2/TagFeGCqAyhKGG0w0A9IWTkm4qYEmLoD/HB6aYfnRA=="],
"@aws-sdk/credential-provider-login/@smithy/types": ["@smithy/types@4.19.0", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-r7jh49VJxGerfAcTQA6gXcKc+98zOp/tqRwzYjgOE+iSQsP6cEU1hq2QzbuipmP68QtYdY9wKEhiCQZIzHgZ4Q=="],
"@aws-sdk/credential-provider-node/@aws-sdk/types": ["@aws-sdk/types@3.975.0", "", { "dependencies": { "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-WQlhs6juByzWOzj5fwxOx0mPJaEqMcG/sDpl3Id61B3XhKE63xY+0QWcnG+sWR/sCfprmreyUo1lM7IKZmHMzw=="],
"@aws-sdk/credential-provider-node/@smithy/core": ["@smithy/core@3.38.1", "", { "dependencies": { "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-U/mB2XiwTLaf+NSgLSWwJfptsMT/H8aBi0aTAA/E5e2/TagFeGCqAyhKGG0w0A9IWTkm4qYEmLoD/HB6aYfnRA=="],
"@aws-sdk/credential-provider-node/@smithy/types": ["@smithy/types@4.19.0", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-r7jh49VJxGerfAcTQA6gXcKc+98zOp/tqRwzYjgOE+iSQsP6cEU1hq2QzbuipmP68QtYdY9wKEhiCQZIzHgZ4Q=="],
"@aws-sdk/credential-provider-process/@aws-sdk/core": ["@aws-sdk/core@3.979.1", "", { "dependencies": { "@aws-sdk/types": "^3.975.0", "@aws-sdk/xml-builder": "^3.972.42", "@aws/lambda-invoke-store": "^0.3.0", "@smithy/core": "^3.38.0", "@smithy/signature-v4": "^5.7.5", "@smithy/types": "^4.19.0", "bowser": "^2.11.0", "tslib": "^2.6.2" } }, "sha512-ayOlV1VhLNMiq8PW9ZkVobG4gkldnUoHjG69yy2b8j+VYFlhz/uAL7ZdYQAoQ+eShtGUdNDnnG5rxDg6yUJrOg=="],
"@aws-sdk/credential-provider-process/@aws-sdk/types": ["@aws-sdk/types@3.975.0", "", { "dependencies": { "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-WQlhs6juByzWOzj5fwxOx0mPJaEqMcG/sDpl3Id61B3XhKE63xY+0QWcnG+sWR/sCfprmreyUo1lM7IKZmHMzw=="],
"@aws-sdk/credential-provider-process/@smithy/core": ["@smithy/core@3.38.1", "", { "dependencies": { "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-U/mB2XiwTLaf+NSgLSWwJfptsMT/H8aBi0aTAA/E5e2/TagFeGCqAyhKGG0w0A9IWTkm4qYEmLoD/HB6aYfnRA=="],
"@aws-sdk/credential-provider-process/@smithy/types": ["@smithy/types@4.19.0", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-r7jh49VJxGerfAcTQA6gXcKc+98zOp/tqRwzYjgOE+iSQsP6cEU1hq2QzbuipmP68QtYdY9wKEhiCQZIzHgZ4Q=="],
"@aws-sdk/credential-provider-sso/@aws-sdk/core": ["@aws-sdk/core@3.979.1", "", { "dependencies": { "@aws-sdk/types": "^3.975.0", "@aws-sdk/xml-builder": "^3.972.42", "@aws/lambda-invoke-store": "^0.3.0", "@smithy/core": "^3.38.0", "@smithy/signature-v4": "^5.7.5", "@smithy/types": "^4.19.0", "bowser": "^2.11.0", "tslib": "^2.6.2" } }, "sha512-ayOlV1VhLNMiq8PW9ZkVobG4gkldnUoHjG69yy2b8j+VYFlhz/uAL7ZdYQAoQ+eShtGUdNDnnG5rxDg6yUJrOg=="],
"@aws-sdk/credential-provider-sso/@aws-sdk/nested-clients": ["@aws-sdk/nested-clients@3.997.54", "", { "dependencies": { "@aws-sdk/core": "^3.979.1", "@aws-sdk/signature-v4-multi-region": "^3.996.51", "@aws-sdk/types": "^3.975.0", "@smithy/core": "^3.38.0", "@smithy/fetch-http-handler": "^5.8.0", "@smithy/node-http-handler": "^4.14.0", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-/OczlavsS7U5sOodRO10Ug4R/AKFVZiXTstKipWe68EfjPkmdDFNXNl9FCJyXWkg1DG6RBm3qAuVB8FNW9O8KQ=="],
"@aws-sdk/credential-provider-sso/@aws-sdk/token-providers": ["@aws-sdk/token-providers@3.1161.0", "", { "dependencies": { "@aws-sdk/core": "^3.979.1", "@aws-sdk/nested-clients": "^3.997.54", "@aws-sdk/types": "^3.975.0", "@smithy/core": "^3.38.0", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-ypbXSofNcSHwf/KA40bFCXJb0MLaAKrfT7sot4dFaA+2lsuXNah4zLRJIAU7Qmvs9PFJ6rnY0bZFEC+mE7attA=="],
"@aws-sdk/credential-provider-sso/@aws-sdk/types": ["@aws-sdk/types@3.975.0", "", { "dependencies": { "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-WQlhs6juByzWOzj5fwxOx0mPJaEqMcG/sDpl3Id61B3XhKE63xY+0QWcnG+sWR/sCfprmreyUo1lM7IKZmHMzw=="],
"@aws-sdk/credential-provider-sso/@smithy/core": ["@smithy/core@3.38.1", "", { "dependencies": { "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-U/mB2XiwTLaf+NSgLSWwJfptsMT/H8aBi0aTAA/E5e2/TagFeGCqAyhKGG0w0A9IWTkm4qYEmLoD/HB6aYfnRA=="],
"@aws-sdk/credential-provider-sso/@smithy/types": ["@smithy/types@4.19.0", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-r7jh49VJxGerfAcTQA6gXcKc+98zOp/tqRwzYjgOE+iSQsP6cEU1hq2QzbuipmP68QtYdY9wKEhiCQZIzHgZ4Q=="],
"@aws-sdk/credential-provider-web-identity/@aws-sdk/core": ["@aws-sdk/core@3.979.1", "", { "dependencies": { "@aws-sdk/types": "^3.975.0", "@aws-sdk/xml-builder": "^3.972.42", "@aws/lambda-invoke-store": "^0.3.0", "@smithy/core": "^3.38.0", "@smithy/signature-v4": "^5.7.5", "@smithy/types": "^4.19.0", "bowser": "^2.11.0", "tslib": "^2.6.2" } }, "sha512-ayOlV1VhLNMiq8PW9ZkVobG4gkldnUoHjG69yy2b8j+VYFlhz/uAL7ZdYQAoQ+eShtGUdNDnnG5rxDg6yUJrOg=="],
"@aws-sdk/credential-provider-web-identity/@aws-sdk/nested-clients": ["@aws-sdk/nested-clients@3.997.54", "", { "dependencies": { "@aws-sdk/core": "^3.979.1", "@aws-sdk/signature-v4-multi-region": "^3.996.51", "@aws-sdk/types": "^3.975.0", "@smithy/core": "^3.38.0", "@smithy/fetch-http-handler": "^5.8.0", "@smithy/node-http-handler": "^4.14.0", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-/OczlavsS7U5sOodRO10Ug4R/AKFVZiXTstKipWe68EfjPkmdDFNXNl9FCJyXWkg1DG6RBm3qAuVB8FNW9O8KQ=="],
"@aws-sdk/credential-provider-web-identity/@aws-sdk/types": ["@aws-sdk/types@3.975.0", "", { "dependencies": { "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-WQlhs6juByzWOzj5fwxOx0mPJaEqMcG/sDpl3Id61B3XhKE63xY+0QWcnG+sWR/sCfprmreyUo1lM7IKZmHMzw=="],
"@aws-sdk/credential-provider-web-identity/@smithy/core": ["@smithy/core@3.38.1", "", { "dependencies": { "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-U/mB2XiwTLaf+NSgLSWwJfptsMT/H8aBi0aTAA/E5e2/TagFeGCqAyhKGG0w0A9IWTkm4qYEmLoD/HB6aYfnRA=="],
"@aws-sdk/credential-provider-web-identity/@smithy/types": ["@smithy/types@4.19.0", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-r7jh49VJxGerfAcTQA6gXcKc+98zOp/tqRwzYjgOE+iSQsP6cEU1hq2QzbuipmP68QtYdY9wKEhiCQZIzHgZ4Q=="],
"@aws-sdk/nested-clients/@smithy/node-http-handler": ["@smithy/node-http-handler@4.11.3", "", { "dependencies": { "@smithy/core": "^3.33.3", "@smithy/types": "^4.17.2", "tslib": "^2.6.2" } }, "sha512-2jY1tSpERfPfWqyBV2pH+iGFaghVsIJszJNsT7hxtQYhVJpWDyc0LqOWI+nXOxOAHaEfZ4PXXtp1wW1TGpHhkA=="], "@aws-sdk/nested-clients/@smithy/node-http-handler": ["@smithy/node-http-handler@4.11.3", "", { "dependencies": { "@smithy/core": "^3.33.3", "@smithy/types": "^4.17.2", "tslib": "^2.6.2" } }, "sha512-2jY1tSpERfPfWqyBV2pH+iGFaghVsIJszJNsT7hxtQYhVJpWDyc0LqOWI+nXOxOAHaEfZ4PXXtp1wW1TGpHhkA=="],
@@ -3060,9 +3134,7 @@
"@dbos-inc/dbos-sdk/ws": ["ws@8.21.3", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-201TZ/kPWxoPr/OKWjquZR1SWKXcvxdH+e1xrx89b3YbmzLMFCLfnaG1HFIgWzJOEWZ7MvpK++odZufgYR50Rw=="], "@dbos-inc/dbos-sdk/ws": ["ws@8.21.3", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-201TZ/kPWxoPr/OKWjquZR1SWKXcvxdH+e1xrx89b3YbmzLMFCLfnaG1HFIgWzJOEWZ7MvpK++odZufgYR50Rw=="],
"@earendil-works/chord/ws": ["ws@8.21.3", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-201TZ/kPWxoPr/OKWjquZR1SWKXcvxdH+e1xrx89b3YbmzLMFCLfnaG1HFIgWzJOEWZ7MvpK++odZufgYR50Rw=="], "@earendil-works/pi-ai/@google/genai": ["@google/genai@3.6.1", "", { "dependencies": { "google-auth-library": "^10.3.0", "p-retry": "^4.6.2", "protobufjs": "^7.6.5", "ws": "^8.21.0" }, "peerDependencies": { "@modelcontextprotocol/sdk": "^1.25.2" }, "optionalPeers": ["@modelcontextprotocol/sdk"] }, "sha512-DQIkZkl+VoZc+RUSaJ41vRuywjQDpP0t/oUf5/ddQhNW6JsPjVULW2EgHmuJ1mrr6ACtrmUdPlqtNXF1yfKySg=="],
"@earendil-works/pi-ai/@google/genai": ["@google/genai@2.21.0", "", { "dependencies": { "google-auth-library": "^10.3.0", "p-retry": "^4.6.2", "protobufjs": "^7.5.4", "ws": "^8.18.0" }, "peerDependencies": { "@modelcontextprotocol/sdk": "^1.25.2" }, "optionalPeers": ["@modelcontextprotocol/sdk"], "hasInstallScript": true }, "sha512-+PDtco2/Z0ONdzCGekCoCT+O1VJS9xJQNN4XzQpXG/t3El/SWWMkCWlFRO1KmivOHPa4Q0VjUYu1HBKCZ/v33Q=="],
"@eslint-community/eslint-utils/eslint-visitor-keys": ["eslint-visitor-keys@3.4.3", "", {}, "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag=="], "@eslint-community/eslint-utils/eslint-visitor-keys": ["eslint-visitor-keys@3.4.3", "", {}, "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag=="],
@@ -3320,25 +3392,77 @@
"wrap-ansi-cjs/ansi-styles": ["ansi-styles@4.3.0", "", { "dependencies": { "color-convert": "^2.0.1" } }, "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg=="], "wrap-ansi-cjs/ansi-styles": ["ansi-styles@4.3.0", "", { "dependencies": { "color-convert": "^2.0.1" } }, "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg=="],
"@aws-sdk/client-bedrock-runtime/@aws-sdk/credential-provider-node/@aws-sdk/credential-provider-env": ["@aws-sdk/credential-provider-env@3.972.80", "", { "dependencies": { "@aws-sdk/core": "^3.979.1", "@aws-sdk/types": "^3.975.0", "@smithy/core": "^3.38.0", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-uO5TiSvb6j1w9RTe5z28OaOmsrOxVQUPaC5+wZl50RfOXcrYD/KgnS8I9lfyGXc7sGbkCopK6VnhNIAoLqfewQ=="],
"@aws-sdk/client-bedrock-runtime/@aws-sdk/credential-provider-node/@aws-sdk/credential-provider-http": ["@aws-sdk/credential-provider-http@3.972.82", "", { "dependencies": { "@aws-sdk/core": "^3.979.1", "@aws-sdk/types": "^3.975.0", "@smithy/core": "^3.38.0", "@smithy/fetch-http-handler": "^5.8.0", "@smithy/node-http-handler": "^4.14.0", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-vQzlDHlC24Yz42p+rT4NBoP/5VdetkBoujbOLq9h6QYWC8THuZSPYnXIR9OP3XcOrdMgPBBipOrdssfxnIiWUg=="],
"@aws-sdk/client-bedrock-runtime/@aws-sdk/credential-provider-node/@aws-sdk/credential-provider-ini": ["@aws-sdk/credential-provider-ini@3.973.25", "", { "dependencies": { "@aws-sdk/core": "^3.979.1", "@aws-sdk/credential-provider-env": "^3.972.80", "@aws-sdk/credential-provider-http": "^3.972.82", "@aws-sdk/credential-provider-login": "^3.972.87", "@aws-sdk/credential-provider-process": "^3.972.80", "@aws-sdk/credential-provider-sso": "^3.973.24", "@aws-sdk/credential-provider-web-identity": "^3.972.86", "@aws-sdk/nested-clients": "^3.997.54", "@aws-sdk/types": "^3.975.0", "@smithy/core": "^3.38.0", "@smithy/credential-provider-imds": "^4.5.2", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-b5xl71uCRdWsu7P1VeGpiGuCf6zfYETsSNOv8AmYVTrsgbvTJRXdmmOPVfxkvGGVNsiKkGctClQW3jAn0SZLug=="],
"@aws-sdk/client-bedrock-runtime/@aws-sdk/credential-provider-node/@aws-sdk/credential-provider-process": ["@aws-sdk/credential-provider-process@3.972.80", "", { "dependencies": { "@aws-sdk/core": "^3.979.1", "@aws-sdk/types": "^3.975.0", "@smithy/core": "^3.38.0", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-xqfixO5aclje7tbQJDias+iNND5wp/3QZixCdZcVQpgWPTZ0V5DfTW9A804A5Z7ezu7sH3WRO+vzUjtiJBA8yg=="],
"@aws-sdk/client-bedrock-runtime/@aws-sdk/credential-provider-node/@aws-sdk/credential-provider-sso": ["@aws-sdk/credential-provider-sso@3.973.24", "", { "dependencies": { "@aws-sdk/core": "^3.979.1", "@aws-sdk/nested-clients": "^3.997.54", "@aws-sdk/token-providers": "3.1161.0", "@aws-sdk/types": "^3.975.0", "@smithy/core": "^3.38.0", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-nlg3BKG03Cgzvv/dMnhxvDJPhAhQSpaN0RUdwgU7ziwkasoev7iI8el8Xy4Rd5sqzgaDUbV269fOXck5SargqA=="],
"@aws-sdk/client-bedrock-runtime/@aws-sdk/credential-provider-node/@aws-sdk/credential-provider-web-identity": ["@aws-sdk/credential-provider-web-identity@3.972.86", "", { "dependencies": { "@aws-sdk/core": "^3.979.1", "@aws-sdk/nested-clients": "^3.997.54", "@aws-sdk/types": "^3.975.0", "@smithy/core": "^3.38.0", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-zKTyLJBEyfQBVlYqT6Jt+mYV4r8kGbWM7dn6v4Y4MRARizhYafjDXP/iMu76UMRhToSPNmIKX1XAb24gtpBFIA=="],
"@aws-sdk/client-bedrock-runtime/@aws-sdk/credential-provider-node/@aws-sdk/types": ["@aws-sdk/types@3.975.0", "", { "dependencies": { "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-WQlhs6juByzWOzj5fwxOx0mPJaEqMcG/sDpl3Id61B3XhKE63xY+0QWcnG+sWR/sCfprmreyUo1lM7IKZmHMzw=="], "@aws-sdk/client-bedrock-runtime/@aws-sdk/credential-provider-node/@aws-sdk/types": ["@aws-sdk/types@3.975.0", "", { "dependencies": { "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-WQlhs6juByzWOzj5fwxOx0mPJaEqMcG/sDpl3Id61B3XhKE63xY+0QWcnG+sWR/sCfprmreyUo1lM7IKZmHMzw=="],
"@aws-sdk/client-bedrock-runtime/@aws-sdk/credential-provider-node/@smithy/core": ["@smithy/core@3.38.1", "", { "dependencies": { "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-U/mB2XiwTLaf+NSgLSWwJfptsMT/H8aBi0aTAA/E5e2/TagFeGCqAyhKGG0w0A9IWTkm4qYEmLoD/HB6aYfnRA=="], "@aws-sdk/client-bedrock-runtime/@aws-sdk/credential-provider-node/@smithy/core": ["@smithy/core@3.38.1", "", { "dependencies": { "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-U/mB2XiwTLaf+NSgLSWwJfptsMT/H8aBi0aTAA/E5e2/TagFeGCqAyhKGG0w0A9IWTkm4qYEmLoD/HB6aYfnRA=="],
"@aws-sdk/client-bedrock-runtime/@aws-sdk/credential-provider-node/@smithy/types": ["@smithy/types@4.19.0", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-r7jh49VJxGerfAcTQA6gXcKc+98zOp/tqRwzYjgOE+iSQsP6cEU1hq2QzbuipmP68QtYdY9wKEhiCQZIzHgZ4Q=="], "@aws-sdk/client-bedrock-runtime/@aws-sdk/credential-provider-node/@smithy/types": ["@smithy/types@4.19.0", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-r7jh49VJxGerfAcTQA6gXcKc+98zOp/tqRwzYjgOE+iSQsP6cEU1hq2QzbuipmP68QtYdY9wKEhiCQZIzHgZ4Q=="],
"@earendil-works/pi-ai/@google/genai/ws": ["ws@8.21.3", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-201TZ/kPWxoPr/OKWjquZR1SWKXcvxdH+e1xrx89b3YbmzLMFCLfnaG1HFIgWzJOEWZ7MvpK++odZufgYR50Rw=="], "@aws-sdk/client-s3/@aws-sdk/credential-provider-node/@aws-sdk/credential-provider-env": ["@aws-sdk/credential-provider-env@3.972.70", "", { "dependencies": { "@aws-sdk/core": "^3.977.9", "@aws-sdk/types": "^3.974.5", "@smithy/core": "^3.33.3", "@smithy/types": "^4.17.2", "tslib": "^2.6.2" } }, "sha512-H404B7dJl2mCrBqahDEYsanB0xhdDp6tXnXcTUnXmmpy2Q3J0Ho0bUajZ2jr/RdwzCyS59Gi8xXIFwPLGBl6Uw=="],
"@aws-sdk/client-s3/@aws-sdk/credential-provider-node/@aws-sdk/credential-provider-http": ["@aws-sdk/credential-provider-http@3.972.72", "", { "dependencies": { "@aws-sdk/core": "^3.977.9", "@aws-sdk/types": "^3.974.5", "@smithy/core": "^3.33.3", "@smithy/fetch-http-handler": "^5.7.2", "@smithy/node-http-handler": "^4.11.3", "@smithy/types": "^4.17.2", "tslib": "^2.6.2" } }, "sha512-X98zYOrVOeuosCX+6ktf29FC2N2GHPLia7qv6mzPzTc+RPAuHWCDS++Z6JK7eGYqb/v6uaW7bAXaOvDBfol+0w=="],
"@aws-sdk/client-s3/@aws-sdk/credential-provider-node/@aws-sdk/credential-provider-ini": ["@aws-sdk/credential-provider-ini@3.973.15", "", { "dependencies": { "@aws-sdk/core": "^3.977.9", "@aws-sdk/credential-provider-env": "^3.972.70", "@aws-sdk/credential-provider-http": "^3.972.72", "@aws-sdk/credential-provider-login": "^3.972.77", "@aws-sdk/credential-provider-process": "^3.972.70", "@aws-sdk/credential-provider-sso": "^3.973.14", "@aws-sdk/credential-provider-web-identity": "^3.972.76", "@aws-sdk/nested-clients": "^3.997.44", "@aws-sdk/types": "^3.974.5", "@smithy/core": "^3.33.3", "@smithy/credential-provider-imds": "^4.4.16", "@smithy/types": "^4.17.2", "tslib": "^2.6.2" } }, "sha512-Rykg6s5ceBuynMOGWgoowO4N+27JfnqXAnVaSunZl0hOO1XodSrxGNz6sCEbnmS0lAfQZDKyb3fbr46gSuv6Sg=="],
"@aws-sdk/client-s3/@aws-sdk/credential-provider-node/@aws-sdk/credential-provider-process": ["@aws-sdk/credential-provider-process@3.972.70", "", { "dependencies": { "@aws-sdk/core": "^3.977.9", "@aws-sdk/types": "^3.974.5", "@smithy/core": "^3.33.3", "@smithy/types": "^4.17.2", "tslib": "^2.6.2" } }, "sha512-2ry03fGRJr4sV3jI+ocjj5JqALnFD6ymM5KiNCDZMvq8bX2GSbE0vji4aM43TVCl2nXqqLRZaUxdq/KeWRAY4Q=="],
"@aws-sdk/client-s3/@aws-sdk/credential-provider-node/@aws-sdk/credential-provider-sso": ["@aws-sdk/credential-provider-sso@3.973.14", "", { "dependencies": { "@aws-sdk/core": "^3.977.9", "@aws-sdk/nested-clients": "^3.997.44", "@aws-sdk/token-providers": "3.1116.0", "@aws-sdk/types": "^3.974.5", "@smithy/core": "^3.33.3", "@smithy/types": "^4.17.2", "tslib": "^2.6.2" } }, "sha512-jkhg/8ocAAoc0RFyLMhCw+/zZh7gystQgd4F4hznNa8P4Cc501PQmxd+jGLiMHodPJ+7Zv/3znM62gZojyasmA=="],
"@aws-sdk/client-s3/@aws-sdk/credential-provider-node/@aws-sdk/credential-provider-web-identity": ["@aws-sdk/credential-provider-web-identity@3.972.76", "", { "dependencies": { "@aws-sdk/core": "^3.977.9", "@aws-sdk/nested-clients": "^3.997.44", "@aws-sdk/types": "^3.974.5", "@smithy/core": "^3.33.3", "@smithy/types": "^4.17.2", "tslib": "^2.6.2" } }, "sha512-d3AGyVu759PGr35mEB2s22xxlNEA5rpdxtSPJthfPFJvoQ8dt357iVPECqWfUxXp1toJAvKmbtcIYVGigaGsCA=="],
"@aws-sdk/credential-provider-env/@aws-sdk/core/@aws-sdk/xml-builder": ["@aws-sdk/xml-builder@3.972.42", "", { "dependencies": { "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-smX8/gNP8Kjq+CWTBMZQLQ912vOQjiWExzwzvMO+eujPB5RY8IbtF0AGdUUXHKN7KoDWK9dIcuW0WG269kiP6w=="],
"@aws-sdk/credential-provider-env/@aws-sdk/core/@smithy/signature-v4": ["@smithy/signature-v4@5.7.5", "", { "dependencies": { "@smithy/core": "^3.38.0", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-WPjdr5oWOk1LArpI4pavu+fSo+/evi0Re1olxGvqwuZopd4gYR1UGCi+Soyn/IjmafqbWs+ZC+3AKxJS3ZpwUg=="],
"@aws-sdk/credential-provider-http/@aws-sdk/core/@aws-sdk/xml-builder": ["@aws-sdk/xml-builder@3.972.42", "", { "dependencies": { "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-smX8/gNP8Kjq+CWTBMZQLQ912vOQjiWExzwzvMO+eujPB5RY8IbtF0AGdUUXHKN7KoDWK9dIcuW0WG269kiP6w=="],
"@aws-sdk/credential-provider-http/@aws-sdk/core/@smithy/signature-v4": ["@smithy/signature-v4@5.7.5", "", { "dependencies": { "@smithy/core": "^3.38.0", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-WPjdr5oWOk1LArpI4pavu+fSo+/evi0Re1olxGvqwuZopd4gYR1UGCi+Soyn/IjmafqbWs+ZC+3AKxJS3ZpwUg=="],
"@aws-sdk/credential-provider-http/@smithy/fetch-http-handler/@smithy/core": ["@smithy/core@3.33.3", "", { "dependencies": { "@smithy/types": "^4.17.2", "tslib": "^2.6.2" } }, "sha512-CsOeKq/9kA3y6VJHt+/+VTCtBaxJ4OTFpgrjIUhPpDIKxBci1k2bJaQASF2h/ELWrulGp+t97DZ0mevfAD8idg=="],
"@aws-sdk/credential-provider-ini/@aws-sdk/core/@aws-sdk/xml-builder": ["@aws-sdk/xml-builder@3.972.42", "", { "dependencies": { "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-smX8/gNP8Kjq+CWTBMZQLQ912vOQjiWExzwzvMO+eujPB5RY8IbtF0AGdUUXHKN7KoDWK9dIcuW0WG269kiP6w=="],
"@aws-sdk/credential-provider-ini/@aws-sdk/core/@smithy/signature-v4": ["@smithy/signature-v4@5.7.5", "", { "dependencies": { "@smithy/core": "^3.38.0", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-WPjdr5oWOk1LArpI4pavu+fSo+/evi0Re1olxGvqwuZopd4gYR1UGCi+Soyn/IjmafqbWs+ZC+3AKxJS3ZpwUg=="],
"@aws-sdk/credential-provider-ini/@aws-sdk/nested-clients/@aws-sdk/signature-v4-multi-region": ["@aws-sdk/signature-v4-multi-region@3.996.51", "", { "dependencies": { "@aws-sdk/types": "^3.975.0", "@smithy/signature-v4": "^5.7.5", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-+aHvUugVBuMPXxgkPfWnTMyGdE/yWS8GHi5+qQ37HowS0YqzrbuaDLznj+Dtmtu5jgCdqz36gXmujOToUhNNWw=="],
"@aws-sdk/credential-provider-ini/@aws-sdk/nested-clients/@smithy/fetch-http-handler": ["@smithy/fetch-http-handler@5.8.0", "", { "dependencies": { "@smithy/core": "^3.33.3", "@smithy/types": "^4.18.0", "tslib": "^2.6.2" } }, "sha512-ycSJu3tFAQ4v04CBB0agqFMVsSQ1iG3yw+SpgxRqKfaURpQD4CZ8Wn0zPMmSnOuTpTh65Vz+EA0rMrw089wvkA=="],
"@aws-sdk/credential-provider-ini/@aws-sdk/nested-clients/@smithy/node-http-handler": ["@smithy/node-http-handler@4.14.1", "", { "dependencies": { "@smithy/core": "^3.38.1", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-/T6E1jzCL0fErS9uq8JqES/5yYQQ4ppVmmYHwXw2nlov8KFzLb+3QqHR5iAun1BsuAB50IPxZliV8YMgghLwhA=="],
"@aws-sdk/credential-provider-login/@aws-sdk/core/@aws-sdk/xml-builder": ["@aws-sdk/xml-builder@3.972.42", "", { "dependencies": { "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-smX8/gNP8Kjq+CWTBMZQLQ912vOQjiWExzwzvMO+eujPB5RY8IbtF0AGdUUXHKN7KoDWK9dIcuW0WG269kiP6w=="],
"@aws-sdk/credential-provider-login/@aws-sdk/core/@smithy/signature-v4": ["@smithy/signature-v4@5.7.5", "", { "dependencies": { "@smithy/core": "^3.38.0", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-WPjdr5oWOk1LArpI4pavu+fSo+/evi0Re1olxGvqwuZopd4gYR1UGCi+Soyn/IjmafqbWs+ZC+3AKxJS3ZpwUg=="],
"@aws-sdk/credential-provider-login/@aws-sdk/nested-clients/@aws-sdk/signature-v4-multi-region": ["@aws-sdk/signature-v4-multi-region@3.996.51", "", { "dependencies": { "@aws-sdk/types": "^3.975.0", "@smithy/signature-v4": "^5.7.5", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-+aHvUugVBuMPXxgkPfWnTMyGdE/yWS8GHi5+qQ37HowS0YqzrbuaDLznj+Dtmtu5jgCdqz36gXmujOToUhNNWw=="],
"@aws-sdk/credential-provider-login/@aws-sdk/nested-clients/@smithy/fetch-http-handler": ["@smithy/fetch-http-handler@5.8.0", "", { "dependencies": { "@smithy/core": "^3.33.3", "@smithy/types": "^4.18.0", "tslib": "^2.6.2" } }, "sha512-ycSJu3tFAQ4v04CBB0agqFMVsSQ1iG3yw+SpgxRqKfaURpQD4CZ8Wn0zPMmSnOuTpTh65Vz+EA0rMrw089wvkA=="],
"@aws-sdk/credential-provider-login/@aws-sdk/nested-clients/@smithy/node-http-handler": ["@smithy/node-http-handler@4.14.1", "", { "dependencies": { "@smithy/core": "^3.38.1", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-/T6E1jzCL0fErS9uq8JqES/5yYQQ4ppVmmYHwXw2nlov8KFzLb+3QqHR5iAun1BsuAB50IPxZliV8YMgghLwhA=="],
"@aws-sdk/credential-provider-process/@aws-sdk/core/@aws-sdk/xml-builder": ["@aws-sdk/xml-builder@3.972.42", "", { "dependencies": { "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-smX8/gNP8Kjq+CWTBMZQLQ912vOQjiWExzwzvMO+eujPB5RY8IbtF0AGdUUXHKN7KoDWK9dIcuW0WG269kiP6w=="],
"@aws-sdk/credential-provider-process/@aws-sdk/core/@smithy/signature-v4": ["@smithy/signature-v4@5.7.5", "", { "dependencies": { "@smithy/core": "^3.38.0", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-WPjdr5oWOk1LArpI4pavu+fSo+/evi0Re1olxGvqwuZopd4gYR1UGCi+Soyn/IjmafqbWs+ZC+3AKxJS3ZpwUg=="],
"@aws-sdk/credential-provider-sso/@aws-sdk/core/@aws-sdk/xml-builder": ["@aws-sdk/xml-builder@3.972.42", "", { "dependencies": { "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-smX8/gNP8Kjq+CWTBMZQLQ912vOQjiWExzwzvMO+eujPB5RY8IbtF0AGdUUXHKN7KoDWK9dIcuW0WG269kiP6w=="],
"@aws-sdk/credential-provider-sso/@aws-sdk/core/@smithy/signature-v4": ["@smithy/signature-v4@5.7.5", "", { "dependencies": { "@smithy/core": "^3.38.0", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-WPjdr5oWOk1LArpI4pavu+fSo+/evi0Re1olxGvqwuZopd4gYR1UGCi+Soyn/IjmafqbWs+ZC+3AKxJS3ZpwUg=="],
"@aws-sdk/credential-provider-sso/@aws-sdk/nested-clients/@aws-sdk/signature-v4-multi-region": ["@aws-sdk/signature-v4-multi-region@3.996.51", "", { "dependencies": { "@aws-sdk/types": "^3.975.0", "@smithy/signature-v4": "^5.7.5", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-+aHvUugVBuMPXxgkPfWnTMyGdE/yWS8GHi5+qQ37HowS0YqzrbuaDLznj+Dtmtu5jgCdqz36gXmujOToUhNNWw=="],
"@aws-sdk/credential-provider-sso/@aws-sdk/nested-clients/@smithy/fetch-http-handler": ["@smithy/fetch-http-handler@5.8.0", "", { "dependencies": { "@smithy/core": "^3.33.3", "@smithy/types": "^4.18.0", "tslib": "^2.6.2" } }, "sha512-ycSJu3tFAQ4v04CBB0agqFMVsSQ1iG3yw+SpgxRqKfaURpQD4CZ8Wn0zPMmSnOuTpTh65Vz+EA0rMrw089wvkA=="],
"@aws-sdk/credential-provider-sso/@aws-sdk/nested-clients/@smithy/node-http-handler": ["@smithy/node-http-handler@4.14.1", "", { "dependencies": { "@smithy/core": "^3.38.1", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-/T6E1jzCL0fErS9uq8JqES/5yYQQ4ppVmmYHwXw2nlov8KFzLb+3QqHR5iAun1BsuAB50IPxZliV8YMgghLwhA=="],
"@aws-sdk/credential-provider-web-identity/@aws-sdk/core/@aws-sdk/xml-builder": ["@aws-sdk/xml-builder@3.972.42", "", { "dependencies": { "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-smX8/gNP8Kjq+CWTBMZQLQ912vOQjiWExzwzvMO+eujPB5RY8IbtF0AGdUUXHKN7KoDWK9dIcuW0WG269kiP6w=="],
"@aws-sdk/credential-provider-web-identity/@aws-sdk/core/@smithy/signature-v4": ["@smithy/signature-v4@5.7.5", "", { "dependencies": { "@smithy/core": "^3.38.0", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-WPjdr5oWOk1LArpI4pavu+fSo+/evi0Re1olxGvqwuZopd4gYR1UGCi+Soyn/IjmafqbWs+ZC+3AKxJS3ZpwUg=="],
"@aws-sdk/credential-provider-web-identity/@aws-sdk/nested-clients/@aws-sdk/signature-v4-multi-region": ["@aws-sdk/signature-v4-multi-region@3.996.51", "", { "dependencies": { "@aws-sdk/types": "^3.975.0", "@smithy/signature-v4": "^5.7.5", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-+aHvUugVBuMPXxgkPfWnTMyGdE/yWS8GHi5+qQ37HowS0YqzrbuaDLznj+Dtmtu5jgCdqz36gXmujOToUhNNWw=="],
"@aws-sdk/credential-provider-web-identity/@aws-sdk/nested-clients/@smithy/fetch-http-handler": ["@smithy/fetch-http-handler@5.8.0", "", { "dependencies": { "@smithy/core": "^3.33.3", "@smithy/types": "^4.18.0", "tslib": "^2.6.2" } }, "sha512-ycSJu3tFAQ4v04CBB0agqFMVsSQ1iG3yw+SpgxRqKfaURpQD4CZ8Wn0zPMmSnOuTpTh65Vz+EA0rMrw089wvkA=="],
"@aws-sdk/credential-provider-web-identity/@aws-sdk/nested-clients/@smithy/node-http-handler": ["@smithy/node-http-handler@4.14.1", "", { "dependencies": { "@smithy/core": "^3.38.1", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-/T6E1jzCL0fErS9uq8JqES/5yYQQ4ppVmmYHwXw2nlov8KFzLb+3QqHR5iAun1BsuAB50IPxZliV8YMgghLwhA=="],
"@isaacs/cliui/string-width/emoji-regex": ["emoji-regex@9.2.2", "", {}, "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg=="], "@isaacs/cliui/string-width/emoji-regex": ["emoji-regex@9.2.2", "", {}, "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg=="],
@@ -3456,31 +3580,27 @@
"readdir-glob/minimatch/brace-expansion": ["brace-expansion@2.1.4", "", { "dependencies": { "balanced-match": "^1.0.0" } }, "sha512-hGfVzPxthbf3+2yjg/RBs60cB0FhqBS/zvdV/4wn4/BmN0bNMMHPc4V/BbFieqf1TKAGGAHnY4eSjajCl0f2Xg=="], "readdir-glob/minimatch/brace-expansion": ["brace-expansion@2.1.4", "", { "dependencies": { "balanced-match": "^1.0.0" } }, "sha512-hGfVzPxthbf3+2yjg/RBs60cB0FhqBS/zvdV/4wn4/BmN0bNMMHPc4V/BbFieqf1TKAGGAHnY4eSjajCl0f2Xg=="],
"@aws-sdk/client-bedrock-runtime/@aws-sdk/credential-provider-node/@aws-sdk/credential-provider-env/@aws-sdk/core": ["@aws-sdk/core@3.979.1", "", { "dependencies": { "@aws-sdk/types": "^3.975.0", "@aws-sdk/xml-builder": "^3.972.42", "@aws/lambda-invoke-store": "^0.3.0", "@smithy/core": "^3.38.0", "@smithy/signature-v4": "^5.7.5", "@smithy/types": "^4.19.0", "bowser": "^2.11.0", "tslib": "^2.6.2" } }, "sha512-ayOlV1VhLNMiq8PW9ZkVobG4gkldnUoHjG69yy2b8j+VYFlhz/uAL7ZdYQAoQ+eShtGUdNDnnG5rxDg6yUJrOg=="], "@aws-sdk/client-s3/@aws-sdk/credential-provider-node/@aws-sdk/credential-provider-ini/@aws-sdk/credential-provider-login": ["@aws-sdk/credential-provider-login@3.972.77", "", { "dependencies": { "@aws-sdk/core": "^3.977.9", "@aws-sdk/nested-clients": "^3.997.44", "@aws-sdk/types": "^3.974.5", "@smithy/core": "^3.33.3", "@smithy/types": "^4.17.2", "tslib": "^2.6.2" } }, "sha512-Jb59xfEISoN5mmbnA+HYqdtrSX3CgCtJoof+V5D8/TgUI56W63GEEd5Y58WijU3Ou6+WEgaLD1feVzaRXV5IDQ=="],
"@aws-sdk/client-bedrock-runtime/@aws-sdk/credential-provider-node/@aws-sdk/credential-provider-http/@aws-sdk/core": ["@aws-sdk/core@3.979.1", "", { "dependencies": { "@aws-sdk/types": "^3.975.0", "@aws-sdk/xml-builder": "^3.972.42", "@aws/lambda-invoke-store": "^0.3.0", "@smithy/core": "^3.38.0", "@smithy/signature-v4": "^5.7.5", "@smithy/types": "^4.19.0", "bowser": "^2.11.0", "tslib": "^2.6.2" } }, "sha512-ayOlV1VhLNMiq8PW9ZkVobG4gkldnUoHjG69yy2b8j+VYFlhz/uAL7ZdYQAoQ+eShtGUdNDnnG5rxDg6yUJrOg=="], "@aws-sdk/client-s3/@aws-sdk/credential-provider-node/@aws-sdk/credential-provider-sso/@aws-sdk/token-providers": ["@aws-sdk/token-providers@3.1116.0", "", { "dependencies": { "@aws-sdk/core": "^3.977.9", "@aws-sdk/nested-clients": "^3.997.44", "@aws-sdk/types": "^3.974.5", "@smithy/core": "^3.33.3", "@smithy/types": "^4.17.2", "tslib": "^2.6.2" } }, "sha512-ygIivKqh8aHzNkucOCXHyIBgBpLPfrSI0mCqXF+vLBsPTUKqj0VSqAY0GFPe7lQl4HntjOcQ+KSyS7oUV2C54Q=="],
"@aws-sdk/client-bedrock-runtime/@aws-sdk/credential-provider-node/@aws-sdk/credential-provider-http/@smithy/fetch-http-handler": ["@smithy/fetch-http-handler@5.8.0", "", { "dependencies": { "@smithy/core": "^3.33.3", "@smithy/types": "^4.18.0", "tslib": "^2.6.2" } }, "sha512-ycSJu3tFAQ4v04CBB0agqFMVsSQ1iG3yw+SpgxRqKfaURpQD4CZ8Wn0zPMmSnOuTpTh65Vz+EA0rMrw089wvkA=="], "@aws-sdk/credential-provider-http/@smithy/fetch-http-handler/@smithy/core/@smithy/types": ["@smithy/types@4.17.2", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-FOKpVZob9MPTn2znRzGrnsMHv7BOsKVw3XiP/cOyYLDVZ9qKp4nifIiSCuUU/fIj5Vu0UOAxCFr+qRAtG0NUkA=="],
"@aws-sdk/client-bedrock-runtime/@aws-sdk/credential-provider-node/@aws-sdk/credential-provider-http/@smithy/node-http-handler": ["@smithy/node-http-handler@4.14.1", "", { "dependencies": { "@smithy/core": "^3.38.1", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-/T6E1jzCL0fErS9uq8JqES/5yYQQ4ppVmmYHwXw2nlov8KFzLb+3QqHR5iAun1BsuAB50IPxZliV8YMgghLwhA=="], "@aws-sdk/credential-provider-ini/@aws-sdk/nested-clients/@aws-sdk/signature-v4-multi-region/@smithy/signature-v4": ["@smithy/signature-v4@5.7.5", "", { "dependencies": { "@smithy/core": "^3.38.0", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-WPjdr5oWOk1LArpI4pavu+fSo+/evi0Re1olxGvqwuZopd4gYR1UGCi+Soyn/IjmafqbWs+ZC+3AKxJS3ZpwUg=="],
"@aws-sdk/client-bedrock-runtime/@aws-sdk/credential-provider-node/@aws-sdk/credential-provider-ini/@aws-sdk/core": ["@aws-sdk/core@3.979.1", "", { "dependencies": { "@aws-sdk/types": "^3.975.0", "@aws-sdk/xml-builder": "^3.972.42", "@aws/lambda-invoke-store": "^0.3.0", "@smithy/core": "^3.38.0", "@smithy/signature-v4": "^5.7.5", "@smithy/types": "^4.19.0", "bowser": "^2.11.0", "tslib": "^2.6.2" } }, "sha512-ayOlV1VhLNMiq8PW9ZkVobG4gkldnUoHjG69yy2b8j+VYFlhz/uAL7ZdYQAoQ+eShtGUdNDnnG5rxDg6yUJrOg=="], "@aws-sdk/credential-provider-ini/@aws-sdk/nested-clients/@smithy/fetch-http-handler/@smithy/core": ["@smithy/core@3.33.3", "", { "dependencies": { "@smithy/types": "^4.17.2", "tslib": "^2.6.2" } }, "sha512-CsOeKq/9kA3y6VJHt+/+VTCtBaxJ4OTFpgrjIUhPpDIKxBci1k2bJaQASF2h/ELWrulGp+t97DZ0mevfAD8idg=="],
"@aws-sdk/client-bedrock-runtime/@aws-sdk/credential-provider-node/@aws-sdk/credential-provider-ini/@aws-sdk/credential-provider-login": ["@aws-sdk/credential-provider-login@3.972.87", "", { "dependencies": { "@aws-sdk/core": "^3.979.1", "@aws-sdk/nested-clients": "^3.997.54", "@aws-sdk/types": "^3.975.0", "@smithy/core": "^3.38.0", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-C4ZFmcwM+Zj14Z8huVUk54Gv4uzT1ZdzG9cY3Gdh8FePakq7Bss1OFsgZjAhWFOkFOGpBvFBeu0OWjWf8HNKRQ=="], "@aws-sdk/credential-provider-login/@aws-sdk/nested-clients/@aws-sdk/signature-v4-multi-region/@smithy/signature-v4": ["@smithy/signature-v4@5.7.5", "", { "dependencies": { "@smithy/core": "^3.38.0", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-WPjdr5oWOk1LArpI4pavu+fSo+/evi0Re1olxGvqwuZopd4gYR1UGCi+Soyn/IjmafqbWs+ZC+3AKxJS3ZpwUg=="],
"@aws-sdk/client-bedrock-runtime/@aws-sdk/credential-provider-node/@aws-sdk/credential-provider-ini/@aws-sdk/nested-clients": ["@aws-sdk/nested-clients@3.997.54", "", { "dependencies": { "@aws-sdk/core": "^3.979.1", "@aws-sdk/signature-v4-multi-region": "^3.996.51", "@aws-sdk/types": "^3.975.0", "@smithy/core": "^3.38.0", "@smithy/fetch-http-handler": "^5.8.0", "@smithy/node-http-handler": "^4.14.0", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-/OczlavsS7U5sOodRO10Ug4R/AKFVZiXTstKipWe68EfjPkmdDFNXNl9FCJyXWkg1DG6RBm3qAuVB8FNW9O8KQ=="], "@aws-sdk/credential-provider-login/@aws-sdk/nested-clients/@smithy/fetch-http-handler/@smithy/core": ["@smithy/core@3.33.3", "", { "dependencies": { "@smithy/types": "^4.17.2", "tslib": "^2.6.2" } }, "sha512-CsOeKq/9kA3y6VJHt+/+VTCtBaxJ4OTFpgrjIUhPpDIKxBci1k2bJaQASF2h/ELWrulGp+t97DZ0mevfAD8idg=="],
"@aws-sdk/client-bedrock-runtime/@aws-sdk/credential-provider-node/@aws-sdk/credential-provider-process/@aws-sdk/core": ["@aws-sdk/core@3.979.1", "", { "dependencies": { "@aws-sdk/types": "^3.975.0", "@aws-sdk/xml-builder": "^3.972.42", "@aws/lambda-invoke-store": "^0.3.0", "@smithy/core": "^3.38.0", "@smithy/signature-v4": "^5.7.5", "@smithy/types": "^4.19.0", "bowser": "^2.11.0", "tslib": "^2.6.2" } }, "sha512-ayOlV1VhLNMiq8PW9ZkVobG4gkldnUoHjG69yy2b8j+VYFlhz/uAL7ZdYQAoQ+eShtGUdNDnnG5rxDg6yUJrOg=="], "@aws-sdk/credential-provider-sso/@aws-sdk/nested-clients/@aws-sdk/signature-v4-multi-region/@smithy/signature-v4": ["@smithy/signature-v4@5.7.5", "", { "dependencies": { "@smithy/core": "^3.38.0", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-WPjdr5oWOk1LArpI4pavu+fSo+/evi0Re1olxGvqwuZopd4gYR1UGCi+Soyn/IjmafqbWs+ZC+3AKxJS3ZpwUg=="],
"@aws-sdk/client-bedrock-runtime/@aws-sdk/credential-provider-node/@aws-sdk/credential-provider-sso/@aws-sdk/core": ["@aws-sdk/core@3.979.1", "", { "dependencies": { "@aws-sdk/types": "^3.975.0", "@aws-sdk/xml-builder": "^3.972.42", "@aws/lambda-invoke-store": "^0.3.0", "@smithy/core": "^3.38.0", "@smithy/signature-v4": "^5.7.5", "@smithy/types": "^4.19.0", "bowser": "^2.11.0", "tslib": "^2.6.2" } }, "sha512-ayOlV1VhLNMiq8PW9ZkVobG4gkldnUoHjG69yy2b8j+VYFlhz/uAL7ZdYQAoQ+eShtGUdNDnnG5rxDg6yUJrOg=="], "@aws-sdk/credential-provider-sso/@aws-sdk/nested-clients/@smithy/fetch-http-handler/@smithy/core": ["@smithy/core@3.33.3", "", { "dependencies": { "@smithy/types": "^4.17.2", "tslib": "^2.6.2" } }, "sha512-CsOeKq/9kA3y6VJHt+/+VTCtBaxJ4OTFpgrjIUhPpDIKxBci1k2bJaQASF2h/ELWrulGp+t97DZ0mevfAD8idg=="],
"@aws-sdk/client-bedrock-runtime/@aws-sdk/credential-provider-node/@aws-sdk/credential-provider-sso/@aws-sdk/nested-clients": ["@aws-sdk/nested-clients@3.997.54", "", { "dependencies": { "@aws-sdk/core": "^3.979.1", "@aws-sdk/signature-v4-multi-region": "^3.996.51", "@aws-sdk/types": "^3.975.0", "@smithy/core": "^3.38.0", "@smithy/fetch-http-handler": "^5.8.0", "@smithy/node-http-handler": "^4.14.0", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-/OczlavsS7U5sOodRO10Ug4R/AKFVZiXTstKipWe68EfjPkmdDFNXNl9FCJyXWkg1DG6RBm3qAuVB8FNW9O8KQ=="], "@aws-sdk/credential-provider-web-identity/@aws-sdk/nested-clients/@aws-sdk/signature-v4-multi-region/@smithy/signature-v4": ["@smithy/signature-v4@5.7.5", "", { "dependencies": { "@smithy/core": "^3.38.0", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-WPjdr5oWOk1LArpI4pavu+fSo+/evi0Re1olxGvqwuZopd4gYR1UGCi+Soyn/IjmafqbWs+ZC+3AKxJS3ZpwUg=="],
"@aws-sdk/client-bedrock-runtime/@aws-sdk/credential-provider-node/@aws-sdk/credential-provider-sso/@aws-sdk/token-providers": ["@aws-sdk/token-providers@3.1161.0", "", { "dependencies": { "@aws-sdk/core": "^3.979.1", "@aws-sdk/nested-clients": "^3.997.54", "@aws-sdk/types": "^3.975.0", "@smithy/core": "^3.38.0", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-ypbXSofNcSHwf/KA40bFCXJb0MLaAKrfT7sot4dFaA+2lsuXNah4zLRJIAU7Qmvs9PFJ6rnY0bZFEC+mE7attA=="], "@aws-sdk/credential-provider-web-identity/@aws-sdk/nested-clients/@smithy/fetch-http-handler/@smithy/core": ["@smithy/core@3.33.3", "", { "dependencies": { "@smithy/types": "^4.17.2", "tslib": "^2.6.2" } }, "sha512-CsOeKq/9kA3y6VJHt+/+VTCtBaxJ4OTFpgrjIUhPpDIKxBci1k2bJaQASF2h/ELWrulGp+t97DZ0mevfAD8idg=="],
"@aws-sdk/client-bedrock-runtime/@aws-sdk/credential-provider-node/@aws-sdk/credential-provider-web-identity/@aws-sdk/core": ["@aws-sdk/core@3.979.1", "", { "dependencies": { "@aws-sdk/types": "^3.975.0", "@aws-sdk/xml-builder": "^3.972.42", "@aws/lambda-invoke-store": "^0.3.0", "@smithy/core": "^3.38.0", "@smithy/signature-v4": "^5.7.5", "@smithy/types": "^4.19.0", "bowser": "^2.11.0", "tslib": "^2.6.2" } }, "sha512-ayOlV1VhLNMiq8PW9ZkVobG4gkldnUoHjG69yy2b8j+VYFlhz/uAL7ZdYQAoQ+eShtGUdNDnnG5rxDg6yUJrOg=="],
"@aws-sdk/client-bedrock-runtime/@aws-sdk/credential-provider-node/@aws-sdk/credential-provider-web-identity/@aws-sdk/nested-clients": ["@aws-sdk/nested-clients@3.997.54", "", { "dependencies": { "@aws-sdk/core": "^3.979.1", "@aws-sdk/signature-v4-multi-region": "^3.996.51", "@aws-sdk/types": "^3.975.0", "@smithy/core": "^3.38.0", "@smithy/fetch-http-handler": "^5.8.0", "@smithy/node-http-handler": "^4.14.0", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-/OczlavsS7U5sOodRO10Ug4R/AKFVZiXTstKipWe68EfjPkmdDFNXNl9FCJyXWkg1DG6RBm3qAuVB8FNW9O8KQ=="],
"@prisma/studio-core/@radix-ui/react-toggle/@radix-ui/react-primitive/@radix-ui/react-slot": ["@radix-ui/react-slot@1.2.3", "", { "dependencies": { "@radix-ui/react-compose-refs": "1.1.2" }, "peerDependencies": { "@types/react": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-aeNmHnBxbi2St0au6VBVC7JXFlhLlOnvIIlePNniyUNAClzmtAUEY8/pBiK3iHjufOlwA+c20/8jngo7xcrg8A=="], "@prisma/studio-core/@radix-ui/react-toggle/@radix-ui/react-primitive/@radix-ui/react-slot": ["@radix-ui/react-slot@1.2.3", "", { "dependencies": { "@radix-ui/react-compose-refs": "1.1.2" }, "peerDependencies": { "@types/react": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-aeNmHnBxbi2St0au6VBVC7JXFlhLlOnvIIlePNniyUNAClzmtAUEY8/pBiK3iHjufOlwA+c20/8jngo7xcrg8A=="],
@@ -3508,70 +3628,14 @@
"readdir-glob/minimatch/brace-expansion/balanced-match": ["balanced-match@1.0.2", "", {}, "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="], "readdir-glob/minimatch/brace-expansion/balanced-match": ["balanced-match@1.0.2", "", {}, "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="],
"@aws-sdk/client-bedrock-runtime/@aws-sdk/credential-provider-node/@aws-sdk/credential-provider-env/@aws-sdk/core/@aws-sdk/xml-builder": ["@aws-sdk/xml-builder@3.972.42", "", { "dependencies": { "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-smX8/gNP8Kjq+CWTBMZQLQ912vOQjiWExzwzvMO+eujPB5RY8IbtF0AGdUUXHKN7KoDWK9dIcuW0WG269kiP6w=="], "@aws-sdk/credential-provider-ini/@aws-sdk/nested-clients/@smithy/fetch-http-handler/@smithy/core/@smithy/types": ["@smithy/types@4.17.2", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-FOKpVZob9MPTn2znRzGrnsMHv7BOsKVw3XiP/cOyYLDVZ9qKp4nifIiSCuUU/fIj5Vu0UOAxCFr+qRAtG0NUkA=="],
"@aws-sdk/client-bedrock-runtime/@aws-sdk/credential-provider-node/@aws-sdk/credential-provider-env/@aws-sdk/core/@smithy/signature-v4": ["@smithy/signature-v4@5.7.5", "", { "dependencies": { "@smithy/core": "^3.38.0", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-WPjdr5oWOk1LArpI4pavu+fSo+/evi0Re1olxGvqwuZopd4gYR1UGCi+Soyn/IjmafqbWs+ZC+3AKxJS3ZpwUg=="], "@aws-sdk/credential-provider-login/@aws-sdk/nested-clients/@smithy/fetch-http-handler/@smithy/core/@smithy/types": ["@smithy/types@4.17.2", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-FOKpVZob9MPTn2znRzGrnsMHv7BOsKVw3XiP/cOyYLDVZ9qKp4nifIiSCuUU/fIj5Vu0UOAxCFr+qRAtG0NUkA=="],
"@aws-sdk/client-bedrock-runtime/@aws-sdk/credential-provider-node/@aws-sdk/credential-provider-http/@aws-sdk/core/@aws-sdk/xml-builder": ["@aws-sdk/xml-builder@3.972.42", "", { "dependencies": { "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-smX8/gNP8Kjq+CWTBMZQLQ912vOQjiWExzwzvMO+eujPB5RY8IbtF0AGdUUXHKN7KoDWK9dIcuW0WG269kiP6w=="], "@aws-sdk/credential-provider-sso/@aws-sdk/nested-clients/@smithy/fetch-http-handler/@smithy/core/@smithy/types": ["@smithy/types@4.17.2", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-FOKpVZob9MPTn2znRzGrnsMHv7BOsKVw3XiP/cOyYLDVZ9qKp4nifIiSCuUU/fIj5Vu0UOAxCFr+qRAtG0NUkA=="],
"@aws-sdk/client-bedrock-runtime/@aws-sdk/credential-provider-node/@aws-sdk/credential-provider-http/@aws-sdk/core/@smithy/signature-v4": ["@smithy/signature-v4@5.7.5", "", { "dependencies": { "@smithy/core": "^3.38.0", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-WPjdr5oWOk1LArpI4pavu+fSo+/evi0Re1olxGvqwuZopd4gYR1UGCi+Soyn/IjmafqbWs+ZC+3AKxJS3ZpwUg=="], "@aws-sdk/credential-provider-web-identity/@aws-sdk/nested-clients/@smithy/fetch-http-handler/@smithy/core/@smithy/types": ["@smithy/types@4.17.2", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-FOKpVZob9MPTn2znRzGrnsMHv7BOsKVw3XiP/cOyYLDVZ9qKp4nifIiSCuUU/fIj5Vu0UOAxCFr+qRAtG0NUkA=="],
"@aws-sdk/client-bedrock-runtime/@aws-sdk/credential-provider-node/@aws-sdk/credential-provider-http/@smithy/fetch-http-handler/@smithy/core": ["@smithy/core@3.33.3", "", { "dependencies": { "@smithy/types": "^4.17.2", "tslib": "^2.6.2" } }, "sha512-CsOeKq/9kA3y6VJHt+/+VTCtBaxJ4OTFpgrjIUhPpDIKxBci1k2bJaQASF2h/ELWrulGp+t97DZ0mevfAD8idg=="],
"@aws-sdk/client-bedrock-runtime/@aws-sdk/credential-provider-node/@aws-sdk/credential-provider-ini/@aws-sdk/core/@aws-sdk/xml-builder": ["@aws-sdk/xml-builder@3.972.42", "", { "dependencies": { "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-smX8/gNP8Kjq+CWTBMZQLQ912vOQjiWExzwzvMO+eujPB5RY8IbtF0AGdUUXHKN7KoDWK9dIcuW0WG269kiP6w=="],
"@aws-sdk/client-bedrock-runtime/@aws-sdk/credential-provider-node/@aws-sdk/credential-provider-ini/@aws-sdk/core/@smithy/signature-v4": ["@smithy/signature-v4@5.7.5", "", { "dependencies": { "@smithy/core": "^3.38.0", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-WPjdr5oWOk1LArpI4pavu+fSo+/evi0Re1olxGvqwuZopd4gYR1UGCi+Soyn/IjmafqbWs+ZC+3AKxJS3ZpwUg=="],
"@aws-sdk/client-bedrock-runtime/@aws-sdk/credential-provider-node/@aws-sdk/credential-provider-ini/@aws-sdk/nested-clients/@aws-sdk/signature-v4-multi-region": ["@aws-sdk/signature-v4-multi-region@3.996.51", "", { "dependencies": { "@aws-sdk/types": "^3.975.0", "@smithy/signature-v4": "^5.7.5", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-+aHvUugVBuMPXxgkPfWnTMyGdE/yWS8GHi5+qQ37HowS0YqzrbuaDLznj+Dtmtu5jgCdqz36gXmujOToUhNNWw=="],
"@aws-sdk/client-bedrock-runtime/@aws-sdk/credential-provider-node/@aws-sdk/credential-provider-ini/@aws-sdk/nested-clients/@smithy/fetch-http-handler": ["@smithy/fetch-http-handler@5.8.0", "", { "dependencies": { "@smithy/core": "^3.33.3", "@smithy/types": "^4.18.0", "tslib": "^2.6.2" } }, "sha512-ycSJu3tFAQ4v04CBB0agqFMVsSQ1iG3yw+SpgxRqKfaURpQD4CZ8Wn0zPMmSnOuTpTh65Vz+EA0rMrw089wvkA=="],
"@aws-sdk/client-bedrock-runtime/@aws-sdk/credential-provider-node/@aws-sdk/credential-provider-ini/@aws-sdk/nested-clients/@smithy/node-http-handler": ["@smithy/node-http-handler@4.14.1", "", { "dependencies": { "@smithy/core": "^3.38.1", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-/T6E1jzCL0fErS9uq8JqES/5yYQQ4ppVmmYHwXw2nlov8KFzLb+3QqHR5iAun1BsuAB50IPxZliV8YMgghLwhA=="],
"@aws-sdk/client-bedrock-runtime/@aws-sdk/credential-provider-node/@aws-sdk/credential-provider-process/@aws-sdk/core/@aws-sdk/xml-builder": ["@aws-sdk/xml-builder@3.972.42", "", { "dependencies": { "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-smX8/gNP8Kjq+CWTBMZQLQ912vOQjiWExzwzvMO+eujPB5RY8IbtF0AGdUUXHKN7KoDWK9dIcuW0WG269kiP6w=="],
"@aws-sdk/client-bedrock-runtime/@aws-sdk/credential-provider-node/@aws-sdk/credential-provider-process/@aws-sdk/core/@smithy/signature-v4": ["@smithy/signature-v4@5.7.5", "", { "dependencies": { "@smithy/core": "^3.38.0", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-WPjdr5oWOk1LArpI4pavu+fSo+/evi0Re1olxGvqwuZopd4gYR1UGCi+Soyn/IjmafqbWs+ZC+3AKxJS3ZpwUg=="],
"@aws-sdk/client-bedrock-runtime/@aws-sdk/credential-provider-node/@aws-sdk/credential-provider-sso/@aws-sdk/core/@aws-sdk/xml-builder": ["@aws-sdk/xml-builder@3.972.42", "", { "dependencies": { "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-smX8/gNP8Kjq+CWTBMZQLQ912vOQjiWExzwzvMO+eujPB5RY8IbtF0AGdUUXHKN7KoDWK9dIcuW0WG269kiP6w=="],
"@aws-sdk/client-bedrock-runtime/@aws-sdk/credential-provider-node/@aws-sdk/credential-provider-sso/@aws-sdk/core/@smithy/signature-v4": ["@smithy/signature-v4@5.7.5", "", { "dependencies": { "@smithy/core": "^3.38.0", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-WPjdr5oWOk1LArpI4pavu+fSo+/evi0Re1olxGvqwuZopd4gYR1UGCi+Soyn/IjmafqbWs+ZC+3AKxJS3ZpwUg=="],
"@aws-sdk/client-bedrock-runtime/@aws-sdk/credential-provider-node/@aws-sdk/credential-provider-sso/@aws-sdk/nested-clients/@aws-sdk/signature-v4-multi-region": ["@aws-sdk/signature-v4-multi-region@3.996.51", "", { "dependencies": { "@aws-sdk/types": "^3.975.0", "@smithy/signature-v4": "^5.7.5", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-+aHvUugVBuMPXxgkPfWnTMyGdE/yWS8GHi5+qQ37HowS0YqzrbuaDLznj+Dtmtu5jgCdqz36gXmujOToUhNNWw=="],
"@aws-sdk/client-bedrock-runtime/@aws-sdk/credential-provider-node/@aws-sdk/credential-provider-sso/@aws-sdk/nested-clients/@smithy/fetch-http-handler": ["@smithy/fetch-http-handler@5.8.0", "", { "dependencies": { "@smithy/core": "^3.33.3", "@smithy/types": "^4.18.0", "tslib": "^2.6.2" } }, "sha512-ycSJu3tFAQ4v04CBB0agqFMVsSQ1iG3yw+SpgxRqKfaURpQD4CZ8Wn0zPMmSnOuTpTh65Vz+EA0rMrw089wvkA=="],
"@aws-sdk/client-bedrock-runtime/@aws-sdk/credential-provider-node/@aws-sdk/credential-provider-sso/@aws-sdk/nested-clients/@smithy/node-http-handler": ["@smithy/node-http-handler@4.14.1", "", { "dependencies": { "@smithy/core": "^3.38.1", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-/T6E1jzCL0fErS9uq8JqES/5yYQQ4ppVmmYHwXw2nlov8KFzLb+3QqHR5iAun1BsuAB50IPxZliV8YMgghLwhA=="],
"@aws-sdk/client-bedrock-runtime/@aws-sdk/credential-provider-node/@aws-sdk/credential-provider-web-identity/@aws-sdk/core/@aws-sdk/xml-builder": ["@aws-sdk/xml-builder@3.972.42", "", { "dependencies": { "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-smX8/gNP8Kjq+CWTBMZQLQ912vOQjiWExzwzvMO+eujPB5RY8IbtF0AGdUUXHKN7KoDWK9dIcuW0WG269kiP6w=="],
"@aws-sdk/client-bedrock-runtime/@aws-sdk/credential-provider-node/@aws-sdk/credential-provider-web-identity/@aws-sdk/core/@smithy/signature-v4": ["@smithy/signature-v4@5.7.5", "", { "dependencies": { "@smithy/core": "^3.38.0", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-WPjdr5oWOk1LArpI4pavu+fSo+/evi0Re1olxGvqwuZopd4gYR1UGCi+Soyn/IjmafqbWs+ZC+3AKxJS3ZpwUg=="],
"@aws-sdk/client-bedrock-runtime/@aws-sdk/credential-provider-node/@aws-sdk/credential-provider-web-identity/@aws-sdk/nested-clients/@aws-sdk/signature-v4-multi-region": ["@aws-sdk/signature-v4-multi-region@3.996.51", "", { "dependencies": { "@aws-sdk/types": "^3.975.0", "@smithy/signature-v4": "^5.7.5", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-+aHvUugVBuMPXxgkPfWnTMyGdE/yWS8GHi5+qQ37HowS0YqzrbuaDLznj+Dtmtu5jgCdqz36gXmujOToUhNNWw=="],
"@aws-sdk/client-bedrock-runtime/@aws-sdk/credential-provider-node/@aws-sdk/credential-provider-web-identity/@aws-sdk/nested-clients/@smithy/fetch-http-handler": ["@smithy/fetch-http-handler@5.8.0", "", { "dependencies": { "@smithy/core": "^3.33.3", "@smithy/types": "^4.18.0", "tslib": "^2.6.2" } }, "sha512-ycSJu3tFAQ4v04CBB0agqFMVsSQ1iG3yw+SpgxRqKfaURpQD4CZ8Wn0zPMmSnOuTpTh65Vz+EA0rMrw089wvkA=="],
"@aws-sdk/client-bedrock-runtime/@aws-sdk/credential-provider-node/@aws-sdk/credential-provider-web-identity/@aws-sdk/nested-clients/@smithy/node-http-handler": ["@smithy/node-http-handler@4.14.1", "", { "dependencies": { "@smithy/core": "^3.38.1", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-/T6E1jzCL0fErS9uq8JqES/5yYQQ4ppVmmYHwXw2nlov8KFzLb+3QqHR5iAun1BsuAB50IPxZliV8YMgghLwhA=="],
"@prisma/studio-core/@radix-ui/react-toggle/@radix-ui/react-primitive/@radix-ui/react-slot/@radix-ui/react-compose-refs": ["@radix-ui/react-compose-refs@1.1.2", "", { "peerDependencies": { "@types/react": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-z4eqJvfiNnFMHIIvXP3CY57y2WJs5g2v3X0zm9mEJkrkNv4rDxu+sg9Jh8EkXyeqBkB7SOcboo9dMVqhyrACIg=="], "@prisma/studio-core/@radix-ui/react-toggle/@radix-ui/react-primitive/@radix-ui/react-slot/@radix-ui/react-compose-refs": ["@radix-ui/react-compose-refs@1.1.2", "", { "peerDependencies": { "@types/react": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-z4eqJvfiNnFMHIIvXP3CY57y2WJs5g2v3X0zm9mEJkrkNv4rDxu+sg9Jh8EkXyeqBkB7SOcboo9dMVqhyrACIg=="],
"@aws-sdk/client-bedrock-runtime/@aws-sdk/credential-provider-node/@aws-sdk/credential-provider-http/@smithy/fetch-http-handler/@smithy/core/@smithy/types": ["@smithy/types@4.17.2", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-FOKpVZob9MPTn2znRzGrnsMHv7BOsKVw3XiP/cOyYLDVZ9qKp4nifIiSCuUU/fIj5Vu0UOAxCFr+qRAtG0NUkA=="],
"@aws-sdk/client-bedrock-runtime/@aws-sdk/credential-provider-node/@aws-sdk/credential-provider-ini/@aws-sdk/nested-clients/@aws-sdk/signature-v4-multi-region/@smithy/signature-v4": ["@smithy/signature-v4@5.7.5", "", { "dependencies": { "@smithy/core": "^3.38.0", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-WPjdr5oWOk1LArpI4pavu+fSo+/evi0Re1olxGvqwuZopd4gYR1UGCi+Soyn/IjmafqbWs+ZC+3AKxJS3ZpwUg=="],
"@aws-sdk/client-bedrock-runtime/@aws-sdk/credential-provider-node/@aws-sdk/credential-provider-ini/@aws-sdk/nested-clients/@smithy/fetch-http-handler/@smithy/core": ["@smithy/core@3.33.3", "", { "dependencies": { "@smithy/types": "^4.17.2", "tslib": "^2.6.2" } }, "sha512-CsOeKq/9kA3y6VJHt+/+VTCtBaxJ4OTFpgrjIUhPpDIKxBci1k2bJaQASF2h/ELWrulGp+t97DZ0mevfAD8idg=="],
"@aws-sdk/client-bedrock-runtime/@aws-sdk/credential-provider-node/@aws-sdk/credential-provider-sso/@aws-sdk/nested-clients/@aws-sdk/signature-v4-multi-region/@smithy/signature-v4": ["@smithy/signature-v4@5.7.5", "", { "dependencies": { "@smithy/core": "^3.38.0", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-WPjdr5oWOk1LArpI4pavu+fSo+/evi0Re1olxGvqwuZopd4gYR1UGCi+Soyn/IjmafqbWs+ZC+3AKxJS3ZpwUg=="],
"@aws-sdk/client-bedrock-runtime/@aws-sdk/credential-provider-node/@aws-sdk/credential-provider-sso/@aws-sdk/nested-clients/@smithy/fetch-http-handler/@smithy/core": ["@smithy/core@3.33.3", "", { "dependencies": { "@smithy/types": "^4.17.2", "tslib": "^2.6.2" } }, "sha512-CsOeKq/9kA3y6VJHt+/+VTCtBaxJ4OTFpgrjIUhPpDIKxBci1k2bJaQASF2h/ELWrulGp+t97DZ0mevfAD8idg=="],
"@aws-sdk/client-bedrock-runtime/@aws-sdk/credential-provider-node/@aws-sdk/credential-provider-web-identity/@aws-sdk/nested-clients/@aws-sdk/signature-v4-multi-region/@smithy/signature-v4": ["@smithy/signature-v4@5.7.5", "", { "dependencies": { "@smithy/core": "^3.38.0", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-WPjdr5oWOk1LArpI4pavu+fSo+/evi0Re1olxGvqwuZopd4gYR1UGCi+Soyn/IjmafqbWs+ZC+3AKxJS3ZpwUg=="],
"@aws-sdk/client-bedrock-runtime/@aws-sdk/credential-provider-node/@aws-sdk/credential-provider-web-identity/@aws-sdk/nested-clients/@smithy/fetch-http-handler/@smithy/core": ["@smithy/core@3.33.3", "", { "dependencies": { "@smithy/types": "^4.17.2", "tslib": "^2.6.2" } }, "sha512-CsOeKq/9kA3y6VJHt+/+VTCtBaxJ4OTFpgrjIUhPpDIKxBci1k2bJaQASF2h/ELWrulGp+t97DZ0mevfAD8idg=="],
"@aws-sdk/client-bedrock-runtime/@aws-sdk/credential-provider-node/@aws-sdk/credential-provider-ini/@aws-sdk/nested-clients/@smithy/fetch-http-handler/@smithy/core/@smithy/types": ["@smithy/types@4.17.2", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-FOKpVZob9MPTn2znRzGrnsMHv7BOsKVw3XiP/cOyYLDVZ9qKp4nifIiSCuUU/fIj5Vu0UOAxCFr+qRAtG0NUkA=="],
"@aws-sdk/client-bedrock-runtime/@aws-sdk/credential-provider-node/@aws-sdk/credential-provider-sso/@aws-sdk/nested-clients/@smithy/fetch-http-handler/@smithy/core/@smithy/types": ["@smithy/types@4.17.2", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-FOKpVZob9MPTn2znRzGrnsMHv7BOsKVw3XiP/cOyYLDVZ9qKp4nifIiSCuUU/fIj5Vu0UOAxCFr+qRAtG0NUkA=="],
"@aws-sdk/client-bedrock-runtime/@aws-sdk/credential-provider-node/@aws-sdk/credential-provider-web-identity/@aws-sdk/nested-clients/@smithy/fetch-http-handler/@smithy/core/@smithy/types": ["@smithy/types@4.17.2", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-FOKpVZob9MPTn2znRzGrnsMHv7BOsKVw3XiP/cOyYLDVZ9qKp4nifIiSCuUU/fIj5Vu0UOAxCFr+qRAtG0NUkA=="],
} }
} }
+1 -1
View File
@@ -11,7 +11,7 @@ When creating agents for chat or metadata autofill, you must select an underlyin
## Built-In Providers ## Built-In Providers
Shumai ships with pre-configured configurations for major LLM providers. Because Shumai uses [Pi](https://github.com/earendil-works/pi) as its core agent framework, the supported provider and model configurations are automatically synchronized with Pi's capabilities. Shumai seeds new teams with provider and model configurations bundled with [Pi](https://github.com/earendil-works/pi). In **Settings → Providers**, choose **Refresh models** on a provider card, select compatible models, then choose **Add selected**. Refresh looks up the public catalog and preserves your saved settings and models. Use **Add Provider** to set up another provider.
Team Owner can freely edit, delete, or add new providers. All configured provider and model settings are injected directly into the Pi framework at runtime. Team Owner can freely edit, delete, or add new providers. All configured provider and model settings are injected directly into the Pi framework at runtime.
+1 -1
View File
@@ -11,7 +11,7 @@ description: 将 Shumai 连接至 OpenAI、Anthropic、Gemini 或自定义 LLM
## 内置模型服务商 ## 内置模型服务商
Shumai 预置了主流 LLM 服务商的配置。由于 Shumai 采用 [Pi](https://github.com/earendil-works/pi) 作为底层核心智能体框架,系统支持的服务商与模型配置会自动与 Pi 的功能生态保持同步。 Shumai 使用 [Pi](https://github.com/earendil-works/pi) 随附的服务商与模型配置初始化新团队。在**设置 → 服务商**中,点击服务商卡片上的**刷新模型**,选择兼容的模型,然后点击**添加所选**。刷新会查询公开模型目录,并保留现有设置和模型。若要设置其他服务商,请点击**添加服务商**。
团队所有者可自由编辑、删除或添加新服务商。所有已配置的服务商与模型参数均会在运行时直接注入 Pi 框架。 团队所有者可自由编辑、删除或添加新服务商。所有已配置的服务商与模型参数均会在运行时直接注入 Pi 框架。
+3 -3
View File
@@ -6,9 +6,9 @@
"main": "./src/index.ts", "main": "./src/index.ts",
"types": "./src/index.ts", "types": "./src/index.ts",
"dependencies": { "dependencies": {
"@earendil-works/chord": "1.5.0", "@earendil-works/chord": "1.7.0",
"@earendil-works/pi-ai": "1.5.0", "@earendil-works/pi-ai": "1.7.0",
"@earendil-works/pi-durable": "1.5.0", "@earendil-works/pi-durable": "1.7.0",
"@google/genai": "2.28.0", "@google/genai": "2.28.0",
"@shumai/core": "workspace:*", "@shumai/core": "workspace:*",
"@shumai/db": "workspace:*", "@shumai/db": "workspace:*",
+1 -1
View File
@@ -7,7 +7,7 @@
"types": "./src/index.ts", "types": "./src/index.ts",
"dependencies": { "dependencies": {
"@better-auth/mcp": "1.7.12", "@better-auth/mcp": "1.7.12",
"@earendil-works/pi-durable": "1.5.0", "@earendil-works/pi-durable": "1.7.0",
"@hono/zod-validator": "0.7.6", "@hono/zod-validator": "0.7.6",
"@modelcontextprotocol/server": "2.0.0", "@modelcontextprotocol/server": "2.0.0",
"@shumai/core": "workspace:*", "@shumai/core": "workspace:*",
+68 -57
View File
@@ -1,5 +1,6 @@
import { describe, expect, it, vi, beforeEach } from 'vitest' import { describe, expect, it, vi, beforeEach } from 'vitest'
import { Hono, type Context, type Next } from 'hono' import { Hono, type Context, type Next } from 'hono'
import { HTTPException } from 'hono/http-exception'
import providerRoute from './provider' import providerRoute from './provider'
import { providerService } from '@shumai/core/src/provider/provider' import { providerService } from '@shumai/core/src/provider/provider'
import { authzService, Permission, ResourceType } from '@shumai/core/src/authz/authz' import { authzService, Permission, ResourceType } from '@shumai/core/src/authz/authz'
@@ -34,6 +35,7 @@ describe('provider api', () => {
beforeEach(() => { beforeEach(() => {
vi.restoreAllMocks() vi.restoreAllMocks()
vi.clearAllMocks()
vi.mocked(authzService.hasPermission).mockResolvedValue(undefined) vi.mocked(authzService.hasPermission).mockResolvedValue(undefined)
}) })
@@ -320,78 +322,57 @@ describe('provider api', () => {
}) })
}) })
it('POST /teams/:teamId/providers/sync-check checks for updates', async () => { const modelsPath = '/teams/t1/providers/p1/models'
vi.mocked(providerService.checkUpdates).mockResolvedValue({ const providerUpdatedAt = '2026-11-29T09:15:00.000Z'
providers: [ const selection = {
{ providerUpdatedAt,
name: 'deepseek', modelIds: ['test-model'],
isNewProvider: true, }
config: { api: 'openai-responses', apiKey: 'DEEPSEEK_API_KEY' }, const importRequest = {
models: [], method: 'POST',
}, headers: { 'Content-Type': 'application/json' },
], body: JSON.stringify(selection),
totalNewProviders: 1, }
totalNewModels: 0,
})
const res = await app.request('/teams/t1/providers/sync-check', { it('previews refresh results for the requested provider as a team admin', async () => {
method: 'POST', vi.mocked(providerService.refreshModels).mockResolvedValue({
status: 'ready',
providerUpdatedAt,
models: [],
}) })
const res = await app.request(modelsPath + '/refresh', { method: 'POST' })
expect(res.status).toBe(200) expect(res.status).toBe(200)
const data = await res.json() expect(res.headers.get('Cache-Control')).toBe('no-store')
expect(data.totalNewProviders).toBe(1) expect(await res.json()).toEqual({ status: 'ready', providerUpdatedAt, models: [] })
expect(data.providers).toHaveLength(1) expect(providerService.refreshModels).toHaveBeenCalledWith('t1', 'p1')
expect(providerService.checkUpdates).toHaveBeenCalledWith('t1')
expect(authzService.hasPermission).toHaveBeenCalledWith({ expect(authzService.hasPermission).toHaveBeenCalledWith({
user: expect.anything(), user: expect.anything(),
permission: Permission.Admin, permission: Permission.Admin,
type: ResourceType.Team, type: ResourceType.Team,
id: 't1', id: 't1',
}) })
expect(auditLogService.logAction).not.toHaveBeenCalled()
}) })
it('POST /teams/:teamId/providers/sync-apply applies sync selection', async () => { it('returns the server reason for an unavailable refresh', async () => {
vi.mocked(providerService.applySync).mockResolvedValue({ vi.mocked(providerService.refreshModels).mockResolvedValue({
addedProviders: 1, status: 'unavailable',
addedModels: 3, reason: 'catalog_unavailable',
})
const payload = {
providers: [
{
name: 'deepseek',
isNewProvider: true,
config: { api: 'openai-responses', apiKey: 'KEY' },
models: [
{
modelId: 'deepseek-v4-flash',
name: 'DeepSeek V4 Flash',
config: {
api: 'openai-responses',
reasoning: true,
input: ['text'],
contextWindow: 128000,
maxTokens: 4096,
cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
},
},
],
},
],
}
const res = await app.request('/teams/t1/providers/sync-apply', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(payload),
}) })
const res = await app.request(modelsPath + '/refresh', { method: 'POST' })
expect(res.status).toBe(200) expect(res.status).toBe(200)
const data = await res.json() expect(await res.json()).toEqual({ status: 'unavailable', reason: 'catalog_unavailable' })
expect(data.addedProviders).toBe(1) })
expect(data.addedModels).toBe(3)
expect(providerService.applySync).toHaveBeenCalledWith('t1', payload) it('imports the selection into the scoped provider and records its audit entry', async () => {
vi.mocked(providerService.importModels).mockResolvedValue({ addedModels: 1 })
const res = await app.request(modelsPath + '/import', importRequest)
expect(res.status).toBe(200)
expect(await res.json()).toEqual({ addedModels: 1 })
expect(providerService.importModels).toHaveBeenCalledWith('t1', 'p1', selection)
expect(authzService.hasPermission).toHaveBeenCalledWith({ expect(authzService.hasPermission).toHaveBeenCalledWith({
user: expect.anything(), user: expect.anything(),
permission: Permission.Admin, permission: Permission.Admin,
@@ -402,6 +383,36 @@ describe('provider api', () => {
action: 'provider_update', action: 'provider_update',
teamId: 't1', teamId: 't1',
userId: 'user1', userId: 'user1',
itemId: 'p1',
}) })
}) })
it('skips the audit entry when the selected models already exist', async () => {
vi.mocked(providerService.importModels).mockResolvedValue({ addedModels: 0 })
const res = await app.request(modelsPath + '/import', importRequest)
expect(res.status).toBe(200)
expect(await res.json()).toEqual({ addedModels: 0 })
expect(auditLogService.logAction).not.toHaveBeenCalled()
})
it('rejects requests without team-admin permission before looking up the provider', async () => {
vi.mocked(authzService.hasPermission).mockRejectedValue(new HTTPException(403))
const refresh = await app.request(modelsPath + '/refresh', { method: 'POST' })
const apply = await app.request(modelsPath + '/import', importRequest)
expect(refresh.status).toBe(403)
expect(apply.status).toBe(403)
expect(providerService.refreshModels).not.toHaveBeenCalled()
expect(providerService.importModels).not.toHaveBeenCalled()
expect(auditLogService.logAction).not.toHaveBeenCalled()
})
it('rejects an empty import selection before performing a write', async () => {
const res = await app.request(modelsPath + '/import', {
...importRequest,
body: JSON.stringify({ providerUpdatedAt, modelIds: [] }),
})
expect(res.status).toBe(400)
expect(providerService.importModels).not.toHaveBeenCalled()
})
}) })
+17 -13
View File
@@ -5,7 +5,7 @@ import { providerService } from '@shumai/core/src/provider/provider'
import { import {
createModelRequestSchema, createModelRequestSchema,
createProviderRequestSchema, createProviderRequestSchema,
syncApplyRequestSchema, importProviderModelsRequestSchema,
updateModelRequestSchema, updateModelRequestSchema,
updateProviderRequestSchema, updateProviderRequestSchema,
AuditAction, AuditAction,
@@ -31,8 +31,8 @@ const route = new Hono<{ Variables: { user: User } }>()
return c.json(providers) return c.json(providers)
}) })
.post('/teams/:teamId/providers/sync-check', async (c) => { .post('/teams/:teamId/providers/:providerId/models/refresh', async (c) => {
const teamId = c.req.param('teamId') const { teamId, providerId } = c.req.param()
const user = c.get('user') const user = c.get('user')
await authzService.hasPermission({ await authzService.hasPermission({
@@ -42,15 +42,16 @@ const route = new Hono<{ Variables: { user: User } }>()
id: teamId, id: teamId,
}) })
const result = await providerService.checkUpdates(teamId) const result = await providerService.refreshModels(teamId, providerId)
c.header('Cache-Control', 'no-store')
return c.json(result) return c.json(result)
}) })
.post( .post(
'/teams/:teamId/providers/sync-apply', '/teams/:teamId/providers/:providerId/models/import',
zValidator('json', syncApplyRequestSchema), zValidator('json', importProviderModelsRequestSchema),
async (c) => { async (c) => {
const teamId = c.req.param('teamId') const { teamId, providerId } = c.req.param()
const user = c.get('user') const user = c.get('user')
const body = c.req.valid('json') const body = c.req.valid('json')
@@ -61,12 +62,15 @@ const route = new Hono<{ Variables: { user: User } }>()
id: teamId, id: teamId,
}) })
const result = await providerService.applySync(teamId, body) const result = await providerService.importModels(teamId, providerId, body)
await auditLogService.logAction({ if (result.addedModels > 0) {
action: AuditAction.provider_update, await auditLogService.logAction({
teamId, action: AuditAction.provider_update,
userId: user?.id, teamId,
}) userId: user?.id,
itemId: providerId,
})
}
return c.json(result) return c.json(result)
}, },
) )
+3 -3
View File
@@ -28,9 +28,9 @@
"@aws-sdk/s3-request-presigner": "3.1121.0", "@aws-sdk/s3-request-presigner": "3.1121.0",
"@better-auth/mcp": "1.7.12", "@better-auth/mcp": "1.7.12",
"@better-auth/oauth-provider": "1.7.12", "@better-auth/oauth-provider": "1.7.12",
"@earendil-works/chord": "1.5.0", "@earendil-works/chord": "1.7.0",
"@earendil-works/pi-ai": "1.5.0", "@earendil-works/pi-ai": "1.7.0",
"@earendil-works/pi-durable": "1.5.0", "@earendil-works/pi-durable": "1.7.0",
"@google/genai": "2.28.0", "@google/genai": "2.28.0",
"@modelcontextprotocol/client": "2.0.0", "@modelcontextprotocol/client": "2.0.0",
"@shumai/db": "workspace:*", "@shumai/db": "workspace:*",
+3 -1
View File
@@ -92,8 +92,10 @@ export async function openSessionCache(sessionId: string) {
throw new Error('Session commit sequence mismatch') throw new Error('Session commit sequence mismatch')
seq = receipt.seq seq = receipt.seq
} }
if (result.stored !== commits.length) if (result.kind === 'refused') {
throw result.refused ?? new Error('Session restoration refused') throw result.refused ?? new Error('Session restoration refused')
}
if (result.stored !== commits.length) throw new Error('Session restoration was incomplete')
} }
await save(true) await save(true)
} catch (error) { } catch (error) {
+1 -1
View File
@@ -19,7 +19,7 @@ export const ENV_MAP: Record<string, string> = {
openai: 'OPENAI_API_KEY', openai: 'OPENAI_API_KEY',
anthropic: 'ANTHROPIC_API_KEY', anthropic: 'ANTHROPIC_API_KEY',
'github-copilot': 'COPILOT_GITHUB_TOKEN', 'github-copilot': 'COPILOT_GITHUB_TOKEN',
'azure-openai-responses': 'AZURE_OPENAI_API_KEY', azure: 'AZURE_OPENAI_API_KEY',
deepseek: 'DEEPSEEK_API_KEY', deepseek: 'DEEPSEEK_API_KEY',
google: 'GEMINI_API_KEY', google: 'GEMINI_API_KEY',
'google-vertex': 'GOOGLE_CLOUD_API_KEY', 'google-vertex': 'GOOGLE_CLOUD_API_KEY',
@@ -1,54 +0,0 @@
{
"anthropic": {
"models": {
"claude-3-5-sonnet-20241022": {
"id": "claude-3-5-sonnet-20241022",
"name": "Claude 3.5 Sonnet",
"tool_call": true,
"reasoning": false,
"limit": {
"context": 200000,
"output": 8192
},
"cost": {
"input": 3,
"output": 15,
"cache_read": 0.3,
"cache_write": 3.75
}
}
}
},
"openai": {
"models": {
"gpt-4o": {
"id": "gpt-4o",
"name": "GPT-4o",
"tool_call": true,
"reasoning": false,
"limit": {
"context": 128000,
"output": 4096
},
"cost": {
"input": 2.5,
"output": 10
}
},
"gpt-4o-extra-new": {
"id": "gpt-4o-extra-new",
"name": "GPT-4o Extra New",
"tool_call": true,
"reasoning": false,
"limit": {
"context": 128000,
"output": 4096
},
"cost": {
"input": 2.5,
"output": 10
}
}
}
}
}
@@ -1,7 +0,0 @@
{
"data": [
{
"id": "meta/llama-3.1-70b-instruct"
}
]
}
@@ -1,17 +0,0 @@
{
"data": [
{
"id": "meta-llama/llama-3.1-8b-instruct",
"name": "Meta: Llama 3.1 8B Instruct",
"context_length": 131072,
"pricing": {
"prompt": "0.00000005",
"completion": "0.00000008"
},
"top_provider": {
"max_completion_tokens": 8192
},
"supported_parameters": ["tools"]
}
]
}
File diff suppressed because it is too large Load Diff
@@ -1,42 +0,0 @@
import type { ThinkingLevel, ThinkingLevelMap } from '@earendil-works/pi-ai'
export type ModelsDevReasoningOption =
| { type: 'toggle' }
| {
type: 'effort'
values: Array<
'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | 'max' | 'default' | null
>
}
| { type: 'budget_tokens'; min?: number; max?: number }
const THINKING_LEVELS: readonly ThinkingLevel[] = [
'minimal',
'low',
'medium',
'high',
'xhigh',
'max',
]
/**
* Converts models.dev verified effort values into Pi's selectable thinking levels.
* Values without a Pi equivalent (`default` and JSON `null`) are intentionally
* omitted.
*/
export function getEffortThinkingLevelMap(
options: readonly ModelsDevReasoningOption[],
): ThinkingLevelMap | undefined {
const effortValues = options.flatMap((option) => (option.type === 'effort' ? option.values : []))
if (effortValues.length === 0) return undefined
const supported = new Set(effortValues)
if (!THINKING_LEVELS.some((level) => supported.has(level)) && !supported.has('none'))
return undefined
const map: ThinkingLevelMap = { off: supported.has('none') ? 'none' : null }
for (const level of THINKING_LEVELS) {
map[level] = supported.has(level) ? level : null
}
return map
}
+197
View File
@@ -0,0 +1,197 @@
import { PI_AI_VERSION } from '@earendil-works/pi-ai'
import { getBuiltinModels, getBuiltinProviders } from '@earendil-works/pi-ai/providers/all'
import { CompatSchemasByApi } from '@earendil-works/pi-ai/providers/compat-schema'
import { ThinkingLevelMapSchema } from '@earendil-works/pi-ai/providers/model-schema'
import {
providerModelConfigSchema,
type ProviderConfigSerializable,
type ProviderRefreshUnavailableReason,
type RefreshedProviderModel,
} from '@shumai/dtos'
import { HTTPException } from 'hono/http-exception'
import { z } from 'zod'
import { ENV_MAP } from './builtin'
type RefreshConnection =
| { unavailableReason: ProviderRefreshUnavailableReason }
| { unavailableReason: null; piProviderId: string }
type CatalogResult =
| { status: 'unavailable'; reason: 'catalog_unavailable' }
| { status: 'ready'; models: RefreshedProviderModel[] }
const REFRESH_TIMEOUT_MS = 10_000
const builtinConnections = new Map<string, Set<string>>(
getBuiltinProviders().map((id) => [
id,
new Set(getBuiltinModels(id).map(({ api, baseUrl }) => connectionKey(api, baseUrl))),
]),
)
const catalogSchema = z.record(
z.string(),
z.looseObject({
id: z.string().min(1),
provider: z.string(),
api: z.string(),
baseUrl: z.string(),
type: z.string().optional(),
}),
)
const compatSchemas = new Map(
Object.entries(CompatSchemasByApi).map(([api, schema]) => [api, z.fromJSONSchema(schema)]),
)
const thinkingLevelMapSchema = z.fromJSONSchema(ThinkingLevelMapSchema)
const catalogHeaderNames = new Set([
'user-agent',
'editor-version',
'editor-plugin-version',
'copilot-integration-id',
'nvcf-poll-seconds',
])
const catalogHeadersSchema = z.record(
z.string().refine((name) => catalogHeaderNames.has(name.toLowerCase())),
z.string().regex(/^[\t\x20-\x7E]*$/),
)
function normalizeBaseUrl(baseUrl?: string): string {
return baseUrl?.trim().replace(/\/+$/, '') ?? ''
}
function connectionKey(api: string, baseUrl?: string): string {
return JSON.stringify([api, normalizeBaseUrl(baseUrl)])
}
function piProviderName(name: string): string {
return name === 'azure-openai-responses' ? 'azure' : name
}
export function isProviderConfigured(name: string, config: ProviderConfigSerializable): boolean {
const key = config.apiKey?.trim()
if (key) {
const envValue = process.env[key]
if (envValue !== undefined) return Boolean(envValue.trim())
// Existing forms accept literal keys and names such as OPENAI_API_KEY in the same field.
return !/^[A-Z][A-Z0-9]*(?:_[A-Z0-9]+)+$/.test(key)
}
const envName = ENV_MAP[piProviderName(name)]
if (envName && process.env[envName]?.trim()) return true
if (name === 'amazon-bedrock' && config.api === 'bedrock-converse-stream') {
return Boolean(
process.env.AWS_BEARER_TOKEN_BEDROCK ||
process.env.AWS_PROFILE ||
(process.env.AWS_ACCESS_KEY_ID && process.env.AWS_SECRET_ACCESS_KEY) ||
process.env.AWS_CONTAINER_CREDENTIALS_RELATIVE_URI ||
process.env.AWS_CONTAINER_CREDENTIALS_FULL_URI ||
process.env.AWS_WEB_IDENTITY_TOKEN_FILE,
)
}
const url = URL.parse(config.baseUrl ?? '')
return Boolean(
url &&
config.api === 'openai-completions' &&
(config.authHeader === false ||
/^(?:localhost|127\.\d+\.\d+\.\d+|\[::1\])$/.test(url.hostname)),
)
}
function azureDeploymentIds(): Set<string> {
// Pi uses model-id=deployment-name mappings for Azure's deployment-specific API.
const entries = process.env.AZURE_OPENAI_DEPLOYMENT_NAME_MAP?.split(',') ?? []
return new Set(
entries.flatMap((entry) => {
const [modelId, deployment] = entry.split('=', 2).map((value) => value.trim())
return modelId && deployment ? [modelId] : []
}),
)
}
export function getRefreshConnection(
name: string,
config: ProviderConfigSerializable,
): RefreshConnection {
const providerId = piProviderName(name)
if (providerId === 'azure' && config.api === 'azure-openai-responses') {
const endpoint =
config.baseUrl || process.env.AZURE_OPENAI_BASE_URL || process.env.AZURE_OPENAI_RESOURCE_NAME
return endpoint && azureDeploymentIds().size > 0
? { unavailableReason: null, piProviderId: providerId }
: { unavailableReason: 'azure_deployment_required' }
}
if (
providerId === 'kimi-coding' &&
config.api === 'anthropic-messages' &&
normalizeBaseUrl(config.baseUrl) === 'https://api.kimi.com/coding'
) {
return { unavailableReason: 'legacy_kimi_connection' }
}
const key = connectionKey(config.api, config.baseUrl)
const namedConnections = builtinConnections.get(providerId)
if (namedConnections?.has(key)) return { unavailableReason: null, piProviderId: providerId }
// A renamed provider can still be resolved if its protocol and endpoint identify one catalog.
if (!namedConnections && config.baseUrl) {
const matches = [...builtinConnections].filter(([, connections]) => connections.has(key))
if (matches.length === 1) return { unavailableReason: null, piProviderId: matches[0][0] }
}
return { unavailableReason: 'unsupported_connection' }
}
export async function discoverProviderModels(
piProviderId: string,
config: ProviderConfigSerializable,
): Promise<CatalogResult> {
const url = new URL(`/api/models/providers/${encodeURIComponent(piProviderId)}`, 'https://pi.dev')
url.searchParams.set('pi-version', PI_AI_VERSION)
let catalog: z.infer<typeof catalogSchema>
try {
const response = await fetch(url, {
headers: { Accept: 'application/json' },
redirect: 'error',
signal: AbortSignal.timeout(REFRESH_TIMEOUT_MS),
})
if (response.status === 404 || response.status === 501) {
return { status: 'unavailable', reason: 'catalog_unavailable' }
}
if (!response.ok) throw new Error(`Pi catalog returned HTTP ${response.status}`)
catalog = catalogSchema.parse(await response.json())
} catch (cause) {
throw new HTTPException(502, { message: 'Could not refresh provider models', cause })
}
const key = connectionKey(config.api, config.baseUrl)
const azureDeployments = piProviderId === 'azure' ? azureDeploymentIds() : undefined
const models = Object.entries(catalog).flatMap(([id, model]) => {
if (
model.id !== id ||
model.provider !== piProviderId ||
(model.type && model.type !== 'chat')
) {
return []
}
const matches = azureDeployments
? model.api === config.api && model.baseUrl === '' && azureDeployments.has(id)
: connectionKey(model.api, model.baseUrl) === key
if (!matches) return []
if (
model.compat !== undefined &&
!compatSchemas.get(model.api)?.safeParse(model.compat).success
)
return []
if (
model.thinkingLevelMap !== undefined &&
!thinkingLevelMapSchema.safeParse(model.thinkingLevelMap).success
)
return []
if (model.headers !== undefined && !catalogHeadersSchema.safeParse(model.headers).success)
return []
// Keep omitted flags absent so Pi can apply model- and endpoint-specific defaults.
const modelConfig = providerModelConfigSchema.safeParse(model)
if (!modelConfig.success) return []
const name = typeof model.name === 'string' && model.name ? model.name : id
return [{ modelId: id, name, config: modelConfig.data }]
})
return { status: 'ready', models }
}
+292 -197
View File
@@ -3,46 +3,53 @@ import { setupTestDbHooks } from '@shumai/db/test'
import { teamService } from '@shumai/core/src/team/team' import { teamService } from '@shumai/core/src/team/team'
import { agentService } from '@shumai/core/src/agent/agent' import { agentService } from '@shumai/core/src/agent/agent'
import { providerService } from './provider' import { providerService } from './provider'
import { describe, expect, it, vi } from 'vitest' import { afterEach, describe, expect, it, vi } from 'vitest'
import * as generateModelsModule from './generator/generate-models'
import { ProviderConfigSerializable, providerModelSchema } from '@shumai/dtos' import { ProviderConfigSerializable, providerModelSchema } from '@shumai/dtos'
import { getBuiltinProvidersMap } from '@shumai/core/src/provider/builtin' import { getBuiltinProvidersMap } from '@shumai/core/src/provider/builtin'
import { z } from 'zod' import { z } from 'zod'
import modelsDevFixture from './fixtures/models-dev.json'
import openRouterFixture from './fixtures/openrouter.json'
import nvidiaFixture from './fixtures/nvidia.json'
const originalFetch = globalThis.fetch const openaiConfig = {
api: 'openai-responses',
baseUrl: 'https://api.openai.com/v1',
apiKey: 'saved-test-key',
} satisfies ProviderConfigSerializable
function setupCatalogFetchMock() { const candidateConfig = {
return vi.spyOn(globalThis, 'fetch').mockImplementation(async (input: RequestInfo | URL) => { api: openaiConfig.api,
const url = typeof input === 'string' ? input : input instanceof URL ? input.href : input.url reasoning: true,
if (url.includes('models.dev')) { input: ['text'],
return new Response(JSON.stringify(modelsDevFixture), { contextWindow: 256000,
status: 200, maxTokens: 16000,
headers: { 'Content-Type': 'application/json' }, cost: { input: 1, output: 2, cacheRead: 0, cacheWrite: 0 },
}) } satisfies ProviderModel['config']
function catalogModel(id: string, options?: Record<string, unknown>) {
return {
...candidateConfig,
provider: 'openai',
baseUrl: openaiConfig.baseUrl,
id,
name: id,
...options,
}
}
function mockCatalog(models: ReturnType<typeof catalogModel>[]) {
const requests: Request[] = []
vi.spyOn(globalThis, 'fetch').mockImplementation(async (input, init) => {
const request = new Request(input, init)
requests.push(request)
if (new URL(request.url).origin !== 'https://pi.dev') {
throw new Error('Unexpected catalog host')
} }
if (url.includes('openrouter.ai')) { return Response.json(Object.fromEntries(models.map((model) => [model.id, model])))
return new Response(JSON.stringify(openRouterFixture), {
status: 200,
headers: { 'Content-Type': 'application/json' },
})
}
if (url.includes('nvidia')) {
return new Response(JSON.stringify(nvidiaFixture), {
status: 200,
headers: { 'Content-Type': 'application/json' },
})
}
if (url.includes('ai-gateway')) {
return new Response(JSON.stringify({ data: [] }), {
status: 200,
headers: { 'Content-Type': 'application/json' },
})
}
return originalFetch(input)
}) })
return requests
}
function readyPreview(result: Awaited<ReturnType<typeof providerService.refreshModels>>) {
if (result.status !== 'ready') throw new Error('Expected refreshed models')
return result
} }
type ProviderModel = z.infer<typeof providerModelSchema> type ProviderModel = z.infer<typeof providerModelSchema>
@@ -385,182 +392,270 @@ describe('ProviderService', () => {
expect((modelsAfterUpdate[1].config as { api: string }).api).toBe('anthropic-messages') expect((modelsAfterUpdate[1].config as { api: string }).api).toBe('anthropic-messages')
}) })
it('should check for updates and correctly segregate new vs existing providers', async () => { describe('model refresh', () => {
const fetchSpy = setupCatalogFetchMock() afterEach(() => {
try { vi.restoreAllMocks()
// 1. Check updates with empty team: all discovered providers are new vi.unstubAllEnvs()
const emptyTeam = await prisma.team.create({ })
data: { name: 'Empty Provider Team' },
it('reports resolved credentials and eligibility separately and preserves legacy Kimi', async () => {
vi.stubEnv('CUSTOM_OPENAI_KEY', 'a-resolved-test-key')
vi.stubEnv('UNSET_ANTHROPIC_KEY', undefined)
const team = await prisma.team.create({ data: { name: 'Providers' } })
const configured = await providerService.create(team.id, 'OpenAI production', {
...openaiConfig,
apiKey: 'CUSTOM_OPENAI_KEY',
}) })
const initialCheck = await providerService.checkUpdates(emptyTeam.id) const unconfigured = await providerService.create(team.id, 'anthropic', {
expect(initialCheck.totalNewProviders).toBeGreaterThan(0) api: 'anthropic-messages',
expect(initialCheck.totalNewModels).toBeGreaterThan(0) baseUrl: 'https://api.anthropic.com',
expect(initialCheck.providers.every((p) => p.isNewProvider)).toBe(true) apiKey: 'UNSET_ANTHROPIC_KEY',
})
const legacyConfig = {
api: 'anthropic-messages',
baseUrl: 'https://api.kimi.com/coding',
apiKey: 'literal-kimi-key',
} satisfies ProviderConfigSerializable
const legacy = await providerService.create(team.id, 'kimi-coding', legacyConfig)
const local = await providerService.create(team.id, 'Local Ollama', {
api: 'openai-completions',
baseUrl: 'http://localhost:11434/v1',
})
vi.stubEnv('AWS_PROFILE', 'test-profile')
const bedrock = await providerService.create(team.id, 'amazon-bedrock', {
api: 'bedrock-converse-stream',
})
const providers = await providerService.listByTeam(team.id)
expect(providers).toHaveLength(5)
expect(providers).toEqual(
expect.arrayContaining([
expect.objectContaining({
id: configured.id,
configured: true,
refreshUnavailableReason: null,
config: { ...openaiConfig, apiKey: 'CUSTOM_OPENAI_KEY' },
}),
expect.objectContaining({
id: unconfigured.id,
configured: false,
refreshUnavailableReason: null,
}),
expect.objectContaining({
id: legacy.id,
configured: true,
refreshUnavailableReason: 'legacy_kimi_connection',
}),
expect.objectContaining({
id: local.id,
configured: true,
refreshUnavailableReason: 'unsupported_connection',
}),
expect.objectContaining({ id: bedrock.id, configured: true }),
]),
)
// 2. With default team (which has builtin providers initialized) const requests = mockCatalog([])
const teamWithBuiltins = await teamService.ensureDefaultTeam() await expect(providerService.refreshModels(team.id, unconfigured.id)).resolves.toMatchObject({
status: 'ready',
// 3. Check updates after init: existing providers should have isNewProvider: false models: [],
const afterInitCheck = await providerService.checkUpdates(teamWithBuiltins.id) })
const existing = afterInitCheck.providers.find((p) => !p.isNewProvider) await expect(providerService.refreshModels(team.id, legacy.id)).resolves.toEqual({
expect(existing).toBeDefined() status: 'unavailable',
if (existing) { reason: 'legacy_kimi_connection',
expect(existing.isNewProvider).toBe(false) })
const dbModels = await providerService.listModelsByProvider( expect(requests.map(({ url }) => new URL(url).pathname)).toEqual([
teamWithBuiltins.id, '/api/models/providers/anthropic',
(await providerService.listByTeam(teamWithBuiltins.id)).find( ])
(p) => p.name === existing.name, expect(await providerService.getById(legacy.id)).toMatchObject({ config: legacyConfig })
)!.id,
)
const dbModelIds = new Set(dbModels.map((m) => m.modelId))
for (const m of existing.models) {
expect(dbModelIds.has(m.modelId)).toBe(false)
}
}
} finally {
fetchSpy.mockRestore()
}
})
it('should throw an error when upstream catalog fetch fails in checkUpdates', async () => {
const team = await teamService.ensureDefaultTeam()
const spy = vi
.spyOn(generateModelsModule, 'generateModels')
.mockRejectedValueOnce(new Error('Failed to load models.dev catalog: 502 Bad Gateway'))
await expect(providerService.checkUpdates(team.id)).rejects.toThrow(
'Failed to load models.dev catalog: 502 Bad Gateway',
)
spy.mockRestore()
})
it('should throw an error when upstream catalog is empty in checkUpdates', async () => {
const team = await teamService.ensureDefaultTeam()
const spy = vi.spyOn(generateModelsModule, 'generateModels').mockResolvedValueOnce({
providers: {},
groupedProviders: {},
sortedProviderIds: [],
}) })
await expect(providerService.checkUpdates(team.id)).rejects.toThrow( it('refreshes only the requested provider and filters existing and incompatible models', async () => {
'Failed to retrieve model catalog from upstream services', vi.stubEnv('OPENAI_API_KEY', openaiConfig.apiKey)
) const team = await teamService.ensureDefaultTeam()
spy.mockRestore() const providers = await providerService.listByTeam(team.id)
}) const openai = providers.find(({ name }) => name === 'openai')!
const existingModels = await providerService.listModelsByProvider(team.id, openai.id)
const requests = mockCatalog([
catalogModel(existingModels[0].modelId),
catalogModel('new-model', {
compat: { supportsStrictMode: true },
thinkingLevelMap: { low: 'low' },
}),
catalogModel('wrong-api', { api: 'openai-completions' }),
catalogModel('wrong-url', { baseUrl: 'https://other.example/v1' }),
catalogModel('wrong-provider', { provider: 'anthropic' }),
catalogModel('not-chat', { type: 'image' }),
catalogModel('invalid-compat', { compat: { supportsStrictMode: 'yes' } }),
])
it('should apply sync by adding selected providers and models without modifying existing ones', async () => { const result = await providerService.refreshModels(team.id, openai.id)
const team = await teamService.ensureDefaultTeam() expect(result).toMatchObject({
status: 'ready',
// Create an existing provider with 1 model and a custom apiKey models: [
const existingProvider = await providerService.create( {
team.id, modelId: 'new-model',
'test-existing-provider', name: 'new-model',
{ api: 'openai-responses', apiKey: 'custom-api-key', baseUrl: 'https://example.com' }, config: {
[ ...candidateConfig,
{ compat: { supportsStrictMode: true },
modelId: 'existing-m1', thinkingLevelMap: { low: 'low' },
name: 'Existing Model 1', },
config: {
api: 'openai-responses',
reasoning: false,
input: ['text'],
contextWindow: 128000,
maxTokens: 4096,
cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
}, },
}, ],
], })
) expect(requests.map(({ url }) => new URL(url).pathname)).toEqual([
'/api/models/providers/openai',
// Apply sync with 1 new provider and 1 new model on the existing provider ])
const syncResult = await providerService.applySync(team.id, { expect(requests[0].headers.has('Authorization')).toBe(false)
providers: [ expect(JSON.stringify(result)).not.toContain(openaiConfig.apiKey)
{ expect(await providerService.listModelsByProvider(team.id, openai.id)).toEqual(existingModels)
name: 'test-new-synced-provider', expect(await providerService.listByTeam(team.id)).toEqual(providers)
isNewProvider: true,
config: {
api: 'anthropic-messages',
apiKey: 'ENV_SYNC_KEY',
baseUrl: 'https://api.anthropic.com',
},
models: [
{
modelId: 'new-p-m1',
name: 'New Provider Model 1',
config: {
api: 'anthropic-messages',
reasoning: false,
input: ['text'],
contextWindow: 200000,
maxTokens: 8192,
cost: { input: 3, output: 15, cacheRead: 0.3, cacheWrite: 3.75 },
},
},
],
},
{
name: 'test-existing-provider',
isNewProvider: false,
config: { api: 'openai-responses', apiKey: 'should-not-override' },
models: [
{
modelId: 'existing-m2',
name: 'Newly Added Model 2',
config: {
api: 'openai-responses',
reasoning: true,
input: ['text'],
contextWindow: 128000,
maxTokens: 4096,
cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
},
},
// Duplicate model that already exists: should be ignored
{
modelId: 'existing-m1',
name: 'Existing Model 1 Overwrite Attempt',
config: {
api: 'openai-responses',
reasoning: false,
input: ['text'],
contextWindow: 999999,
maxTokens: 999999,
cost: { input: 9, output: 9, cacheRead: 9, cacheWrite: 9 },
},
},
],
},
],
}) })
expect(syncResult.addedProviders).toBe(1) it('uses the versioned public OpenRouter catalog without sending saved credentials', async () => {
expect(syncResult.addedModels).toBe(2) const openRouterKey = 'saved-openrouter-test-key'
vi.stubEnv('SHUMAI_TEST_OPENROUTER_KEY', openRouterKey)
const team = await prisma.team.create({ data: { name: 'OpenRouter' } })
const baseUrl = 'https://openrouter.ai/api/v1'
const api = 'openai-completions' as const
const provider = await providerService.create(team.id, 'openrouter', {
api,
baseUrl: baseUrl + '/',
apiKey: 'SHUMAI_TEST_OPENROUTER_KEY',
})
const modelId = 'org/new-openrouter-model'
const requests: Request[] = []
vi.spyOn(globalThis, 'fetch').mockImplementation(async (input, init) => {
const request = new Request(input, init)
requests.push(request)
return Response.json({
[modelId]: { ...catalogModel(modelId, { api, baseUrl }), provider: 'openrouter' },
})
})
// Verify existing provider config was NOT modified const { models } = readyPreview(await providerService.refreshModels(team.id, provider.id))
const reloadedExisting = await providerService.getById(existingProvider.id) expect(models.map(({ modelId }) => modelId)).toEqual([modelId])
expect((reloadedExisting?.config as { apiKey: string }).apiKey).toBe('custom-api-key') expect(requests.map(({ url }) => url)).toEqual([
'https://pi.dev/api/models/providers/openrouter?pi-version=1.7.0',
])
expect(requests[0].headers.has('Authorization')).toBe(false)
// Verify existing model was NOT modified const customProvider = await providerService.update(team.id, provider.id, {
const existingModels = await providerService.listModelsByProvider(team.id, existingProvider.id) ...provider.config,
expect(existingModels).toHaveLength(2) baseUrl: 'https://openrouter-proxy.example/api/v1',
const m1 = existingModels.find((m) => m.modelId === 'existing-m1') })
expect(m1?.name).toBe('Existing Model 1') await expect(providerService.refreshModels(team.id, customProvider.id)).resolves.toEqual({
expect((m1?.config as { contextWindow: number }).contextWindow).toBe(128000) status: 'unavailable',
reason: 'unsupported_connection',
})
expect(requests).toHaveLength(1)
})
// Verify newly added model on existing provider it('distinguishes a successful empty preview from an upstream error', async () => {
const m2 = existingModels.find((m) => m.modelId === 'existing-m2') vi.stubEnv('OPENAI_API_KEY', openaiConfig.apiKey)
expect(m2).toBeDefined() const team = await teamService.ensureDefaultTeam()
expect(m2?.name).toBe('Newly Added Model 2') const provider = (await providerService.listByTeam(team.id)).find(
({ name }) => name === 'openai',
)!
mockCatalog([])
await expect(providerService.refreshModels(team.id, provider.id)).resolves.toMatchObject({
status: 'ready',
models: [],
})
vi.restoreAllMocks()
const fetchMock = vi.spyOn(globalThis, 'fetch')
fetchMock.mockResolvedValueOnce(new Response(null, { status: 404 }))
await expect(providerService.refreshModels(team.id, provider.id)).resolves.toEqual({
status: 'unavailable',
reason: 'catalog_unavailable',
})
fetchMock.mockResolvedValueOnce(Response.json({ error: 'malformed catalog' }))
await expect(providerService.refreshModels(team.id, provider.id)).rejects.toMatchObject({
status: 502,
})
fetchMock.mockRejectedValueOnce(new DOMException('Timed out', 'TimeoutError'))
// Verify newly added provider await expect(providerService.refreshModels(team.id, provider.id)).rejects.toMatchObject({
const providers = await providerService.listByTeam(team.id) status: 502,
const newProvider = providers.find((p) => p.name === 'test-new-synced-provider') })
expect(newProvider).toBeDefined() })
expect(newProvider?.isBuiltin).toBe(true)
expect((newProvider?.config as { apiKey: string }).apiKey).toBe('ENV_SYNC_KEY')
const newProviderModels = await providerService.listModelsByProvider(team.id, newProvider!.id) it('imports only the selected models once and preserves existing models and settings', async () => {
expect(newProviderModels).toHaveLength(1) vi.stubEnv('OPENAI_API_KEY', openaiConfig.apiKey)
expect(newProviderModels[0].modelId).toBe('new-p-m1') const team = await teamService.ensureDefaultTeam()
const provider = (await providerService.listByTeam(team.id)).find(
({ name }) => name === 'openai',
)!
const original = await providerService.getById(provider.id)
const existing = await providerService.listModelsByProvider(team.id, provider.id)
mockCatalog([catalogModel('new-model'), catalogModel('unselected-model')])
const preview = readyPreview(await providerService.refreshModels(team.id, provider.id))
const selection = { providerUpdatedAt: preview.providerUpdatedAt, modelIds: ['new-model'] }
await expect(providerService.importModels(team.id, provider.id, selection)).resolves.toEqual({
addedModels: 1,
})
await expect(providerService.importModels(team.id, provider.id, selection)).resolves.toEqual({
addedModels: 0,
})
expect(await providerService.listModelsByProvider(team.id, provider.id)).toEqual([
expect.objectContaining({ modelId: 'new-model', config: candidateConfig }),
...existing,
])
expect(await providerService.getById(provider.id)).toEqual(original)
})
it('rejects out-of-team, unknown, and stale selections without adding models', async () => {
const team = await prisma.team.create({ data: { name: 'Refresh Team' } })
const otherTeam = await prisma.team.create({ data: { name: 'Other Team' } })
const provider = await providerService.create(team.id, 'openai', openaiConfig)
const requests = mockCatalog([catalogModel('new-model')])
await expect(providerService.refreshModels(otherTeam.id, provider.id)).rejects.toMatchObject({
status: 404,
})
expect(requests).toHaveLength(0)
const preview = readyPreview(await providerService.refreshModels(team.id, provider.id))
const selection = { providerUpdatedAt: preview.providerUpdatedAt, modelIds: ['new-model'] }
await expect(
providerService.importModels(otherTeam.id, provider.id, selection),
).rejects.toMatchObject({ status: 404 })
await expect(
providerService.importModels(team.id, provider.id, {
...selection,
modelIds: ['new-model', 'unknown'],
}),
).rejects.toMatchObject({ status: 409 })
await providerService.update(team.id, provider.id, { ...openaiConfig, apiKey: 'changed-key' })
await expect(
providerService.importModels(team.id, provider.id, selection),
).rejects.toMatchObject({ status: 409 })
expect(await providerService.listModelsByProvider(team.id, provider.id)).toEqual([])
})
it('refreshes legacy Azure connections using only configured deployment mappings', async () => {
vi.stubEnv('AZURE_OPENAI_DEPLOYMENT_NAME_MAP', undefined)
const team = await prisma.team.create({ data: { name: 'Azure models' } })
const provider = await providerService.create(team.id, 'azure-openai-responses', {
api: 'azure-openai-responses',
baseUrl: 'https://example.openai.azure.com/openai/v1',
})
const azure = { provider: 'azure', api: 'azure-openai-responses', baseUrl: '' }
const requests = mockCatalog([
catalogModel('gpt-deployed', azure),
catalogModel('gpt-unmapped', azure),
])
await expect(providerService.refreshModels(team.id, provider.id)).resolves.toEqual({
status: 'unavailable',
reason: 'azure_deployment_required',
})
vi.stubEnv('AZURE_OPENAI_DEPLOYMENT_NAME_MAP', 'gpt-deployed=team-deployment')
const preview = readyPreview(await providerService.refreshModels(team.id, provider.id))
expect(preview.models.map(({ modelId }) => modelId)).toEqual(['gpt-deployed'])
expect(requests.map(({ url }) => new URL(url).pathname)).toEqual([
'/api/models/providers/azure',
])
})
}) })
}) })
+79 -189
View File
@@ -1,22 +1,16 @@
import { prisma } from '@shumai/db' import { prisma } from '@shumai/db'
import { import {
CreateModelRequest, CreateModelRequest,
ImportProviderModelsRequest,
ProviderConfigSerializable, ProviderConfigSerializable,
ProviderModelRefreshResponse,
providerModelSchema, providerModelSchema,
SyncApplyRequest,
SyncApplyResponse,
SyncCheckResponse,
SyncModelItem,
SyncProviderItem,
UpdateModelRequest, UpdateModelRequest,
} from '@shumai/dtos' } from '@shumai/dtos'
import { import { getBuiltinProvidersMap } from '@shumai/core/src/provider/builtin'
ENV_MAP, import { HTTPException } from 'hono/http-exception'
getBuiltinProvidersMap,
PRIORITY_PROVIDERS,
} from '@shumai/core/src/provider/builtin'
import { generateModels } from '@shumai/core/src/provider/generator/generate-models'
import { z } from 'zod' import { z } from 'zod'
import { discoverProviderModels, getRefreshConnection, isProviderConfigured } from './model-refresh'
type ProviderModel = z.infer<typeof providerModelSchema> type ProviderModel = z.infer<typeof providerModelSchema>
@@ -70,11 +64,23 @@ export class ProviderService {
orderBy: { id: 'desc' }, orderBy: { id: 'desc' },
}) })
return providers.map((p) => ({ return providers.map(
...p, ({ _count, id, teamId, name, config, isBuiltin, createdAt, updatedAt }) => {
modelsCount: p._count.models, const connection = getRefreshConnection(name, config)
_count: undefined, return {
})) id,
teamId,
name,
config,
isBuiltin,
createdAt,
updatedAt,
modelsCount: _count.models,
configured: isProviderConfigured(name, config),
refreshUnavailableReason: connection.unavailableReason,
}
},
)
} }
async getById(id: string) { async getById(id: string) {
@@ -124,6 +130,11 @@ export class ProviderService {
name?: string, name?: string,
) { ) {
return this.prismaClient.$transaction(async (tx) => { return this.prismaClient.$transaction(async (tx) => {
const provider = await tx.provider.update({
where: { id, teamId },
data: { config, ...(name ? { name } : {}) },
})
if (models !== undefined) { if (models !== undefined) {
const existingModels = await tx.model.findMany({ const existingModels = await tx.model.findMany({
where: { providerId: id }, where: { providerId: id },
@@ -189,15 +200,7 @@ export class ProviderService {
} }
} }
// Update provider config and optional name return { ...provider, models: await tx.model.findMany({ where: { providerId: id } }) }
return tx.provider.update({
where: { id, teamId },
data: {
config,
...(name ? { name } : {}),
},
include: { models: true },
})
}) })
} }
@@ -305,179 +308,66 @@ export class ProviderService {
}) })
} }
async checkUpdates(teamId: string): Promise<SyncCheckResponse> { async refreshModels(teamId: string, providerId: string): Promise<ProviderModelRefreshResponse> {
const catalog = await generateModels({ strict: true, timeoutMs: 30000 }) const provider = await this.prismaClient.provider.findUnique({
where: { id: providerId, teamId },
if (!catalog || catalog.sortedProviderIds.length === 0) { include: { models: { select: { modelId: true } } },
throw new Error('Failed to retrieve model catalog from upstream services')
}
const existingProviders = await this.prismaClient.provider.findMany({
where: { teamId },
include: { models: true },
}) })
if (!provider) throw new HTTPException(404, { message: 'Provider not found' })
const existingProviderMap = new Map<string, (typeof existingProviders)[number]>() const connection = getRefreshConnection(provider.name, provider.config)
for (const p of existingProviders) { if (connection.unavailableReason) {
existingProviderMap.set(p.name, p) return { status: 'unavailable', reason: connection.unavailableReason }
} }
const catalog = await discoverProviderModels(connection.piProviderId, provider.config)
const items: SyncProviderItem[] = [] if (catalog.status === 'unavailable') return catalog
let totalNewProviders = 0 const existingIds = new Set(provider.models.map(({ modelId }) => modelId))
let totalNewModels = 0
for (const providerId of catalog.sortedProviderIds) {
const modelsMap = catalog.providers[providerId]
if (!modelsMap) continue
const modelList = Object.values(modelsMap)
if (modelList.length === 0) continue
const existingProvider = existingProviderMap.get(providerId)
if (!existingProvider) {
const firstModel = modelList[0]
const newModels: SyncModelItem[] = modelList.map((m) => ({
modelId: m.id,
name: m.name || m.id,
config: {
api: m.api as ProviderConfigSerializable['api'],
reasoning: m.reasoning ?? false,
input: (m.input ?? ['text']) as ('text' | 'image')[],
contextWindow: m.contextWindow,
maxTokens: m.maxTokens,
cost: {
input: m.cost?.input ?? 0,
output: m.cost?.output ?? 0,
cacheRead: m.cost?.cacheRead ?? 0,
cacheWrite: m.cost?.cacheWrite ?? 0,
},
},
}))
items.push({
name: providerId,
isNewProvider: true,
config: {
api: firstModel.api as ProviderConfigSerializable['api'],
baseUrl: firstModel.baseUrl,
apiKey: ENV_MAP[providerId] || '',
},
models: newModels,
})
totalNewProviders++
totalNewModels += newModels.length
} else {
const existingModelIds = new Set(existingProvider.models.map((m) => m.modelId))
const newModels: SyncModelItem[] = []
for (const m of modelList) {
if (!existingModelIds.has(m.id)) {
newModels.push({
modelId: m.id,
name: m.name || m.id,
config: {
api: m.api as ProviderConfigSerializable['api'],
reasoning: m.reasoning ?? false,
input: (m.input ?? ['text']) as ('text' | 'image')[],
contextWindow: m.contextWindow,
maxTokens: m.maxTokens,
cost: {
input: m.cost?.input ?? 0,
output: m.cost?.output ?? 0,
cacheRead: m.cost?.cacheRead ?? 0,
cacheWrite: m.cost?.cacheWrite ?? 0,
},
},
})
}
}
if (newModels.length > 0) {
items.push({
name: providerId,
isNewProvider: false,
config: existingProvider.config as ProviderConfigSerializable,
models: newModels,
})
totalNewModels += newModels.length
}
}
}
items.sort((a, b) => {
const indexA = PRIORITY_PROVIDERS.indexOf(a.name)
const indexB = PRIORITY_PROVIDERS.indexOf(b.name)
if (indexA !== -1 && indexB !== -1) return indexA - indexB
if (indexA !== -1) return -1
if (indexB !== -1) return 1
return a.name.localeCompare(b.name)
})
return { return {
providers: items, status: 'ready',
totalNewProviders, providerUpdatedAt: provider.updatedAt.toISOString(),
totalNewModels, models: catalog.models.filter(({ modelId }) => !existingIds.has(modelId)),
} }
} }
async applySync(teamId: string, payload: SyncApplyRequest): Promise<SyncApplyResponse> { async importModels(
let addedProviders = 0 teamId: string,
let addedModels = 0 providerId: string,
{ modelIds, providerUpdatedAt }: ImportProviderModelsRequest,
await this.prismaClient.$transaction(async (tx) => { ) {
for (const providerItem of payload.providers) { const provider = await this.prismaClient.provider.findUnique({
let providerId: string where: { id: providerId, teamId },
include: { models: { where: { modelId: { in: modelIds } }, select: { modelId: true } } },
if (providerItem.isNewProvider) {
const existing = await tx.provider.findFirst({
where: { teamId, name: providerItem.name },
})
if (!existing) {
const created = await tx.provider.create({
data: {
teamId,
name: providerItem.name,
isBuiltin: true,
config: providerItem.config,
},
})
providerId = created.id
addedProviders++
} else {
providerId = existing.id
}
} else {
const existing = await tx.provider.findFirst({
where: { teamId, name: providerItem.name },
})
if (!existing) continue
providerId = existing.id
}
for (const modelItem of providerItem.models) {
const existingModel = await tx.model.findFirst({
where: {
providerId,
modelId: modelItem.modelId,
},
})
if (!existingModel) {
await tx.model.create({
data: {
providerId,
modelId: modelItem.modelId,
name: modelItem.name || modelItem.modelId,
config: modelItem.config,
},
})
addedModels++
}
}
}
}) })
if (!provider) throw new HTTPException(404, { message: 'Provider not found' })
const staleSelection = () =>
new HTTPException(409, { message: 'Refresh the model list before importing' })
if (provider.updatedAt.toISOString() !== providerUpdatedAt) throw staleSelection()
const existingIds = new Set(provider.models.map(({ modelId }) => modelId))
const newIds = new Set(modelIds.filter((modelId) => !existingIds.has(modelId)))
if (newIds.size === 0) return { addedModels: 0 }
return { addedProviders, addedModels } const connection = getRefreshConnection(provider.name, provider.config)
if (connection.unavailableReason) throw staleSelection()
const catalog = await discoverProviderModels(connection.piProviderId, provider.config)
if (catalog.status === 'unavailable') throw staleSelection()
const models = catalog.models.filter(({ modelId }) => newIds.has(modelId))
if (models.length !== newIds.size) throw staleSelection()
return this.prismaClient.$transaction(async (tx) => {
// The network request finishes before we lock the connection for the insert.
const [locked] = await tx.$queryRaw<{ updatedAt: Date }[]>`
SELECT updated_at AS "updatedAt" FROM providers
WHERE id = ${providerId} AND team_id = ${teamId} FOR NO KEY UPDATE
`
if (!locked) throw new HTTPException(404, { message: 'Provider not found' })
if (locked.updatedAt.toISOString() !== providerUpdatedAt) throw staleSelection()
const { count } = await tx.model.createMany({
data: models.map(({ modelId, name, config }) => ({ providerId, modelId, name, config })),
skipDuplicates: true,
})
return { addedModels: count }
})
} }
} }
+2 -2
View File
@@ -6,8 +6,8 @@
"main": "./src/index.ts", "main": "./src/index.ts",
"types": "./src/index.ts", "types": "./src/index.ts",
"dependencies": { "dependencies": {
"@earendil-works/pi-ai": "1.5.0", "@earendil-works/pi-ai": "1.7.0",
"@earendil-works/pi-durable": "1.5.0", "@earendil-works/pi-durable": "1.7.0",
"zod": "4.5.4" "zod": "4.5.4"
} }
} }
+44 -39
View File
@@ -13,6 +13,10 @@ export const KNOWN_APIS = [
'google-vertex', 'google-vertex',
] as const ] as const
const jsonObjectSchema = z
.record(z.string(), z.unknown())
.refine((value) => z.json().safeParse(value).success)
// We define a serializable version of ProviderConfig for our API and DB // We define a serializable version of ProviderConfig for our API and DB
// as the original ProviderConfig interface includes non-serializable fields (functions) // as the original ProviderConfig interface includes non-serializable fields (functions)
export const providerModelConfigSchema = z.object({ export const providerModelConfigSchema = z.object({
@@ -21,6 +25,9 @@ export const providerModelConfigSchema = z.object({
input: z.array(z.enum(['text', 'image'])).default(['text']), input: z.array(z.enum(['text', 'image'])).default(['text']),
contextWindow: z.number().int().positive().default(128000), contextWindow: z.number().int().positive().default(128000),
maxTokens: z.number().int().positive().default(4096), maxTokens: z.number().int().positive().default(4096),
compat: jsonObjectSchema.optional(),
thinkingLevelMap: jsonObjectSchema.optional(),
headers: z.record(z.string(), z.string()).optional(),
cost: z.object({ cost: z.object({
input: z.number().nonnegative().default(0), input: z.number().nonnegative().default(0),
output: z.number().nonnegative().default(0), output: z.number().nonnegative().default(0),
@@ -78,60 +85,58 @@ export const updateModelRequestSchema = z.object({
export type UpdateModelRequest = z.infer<typeof updateModelRequestSchema> export type UpdateModelRequest = z.infer<typeof updateModelRequestSchema>
export const providerRefreshUnavailableReasonSchema = z.enum([
'unsupported_connection',
'legacy_kimi_connection',
'azure_deployment_required',
'catalog_unavailable',
])
export type ProviderRefreshUnavailableReason = z.infer<
typeof providerRefreshUnavailableReasonSchema
>
export const providerResponseSchema = z.object({ export const providerResponseSchema = z.object({
id: z.string(), id: z.string(),
teamId: z.string(),
name: z.string(), name: z.string(),
isBuiltin: z.boolean(), isBuiltin: z.boolean(),
config: providerConfigSchema, config: providerConfigSchema,
models: z.array(providerModelSchema).optional(), models: z.array(providerModelSchema).optional(),
modelsCount: z.number().optional(), modelsCount: z.number().optional(),
configured: z.boolean(),
refreshUnavailableReason: providerRefreshUnavailableReasonSchema.nullable(),
createdAt: z.date(), createdAt: z.date(),
updatedAt: z.date(), updatedAt: z.date(),
}) })
export type ProviderResponse = z.infer<typeof providerResponseSchema> export type ProviderResponse = z.infer<typeof providerResponseSchema>
export const syncModelItemSchema = z.object({ export const refreshedProviderModelSchema = createModelRequestSchema.pick({
modelId: z.string().min(1), modelId: true,
name: z.string().default(''), name: true,
config: providerModelConfigSchema, config: true,
}) })
export type SyncModelItem = z.infer<typeof syncModelItemSchema> export type RefreshedProviderModel = z.infer<typeof refreshedProviderModelSchema>
export const syncProviderItemSchema = z.object({ export const providerModelRefreshResponseSchema = z.discriminatedUnion('status', [
name: z.string(), z.object({
isNewProvider: z.boolean(), status: z.literal('ready'),
config: providerConfigSchema, providerUpdatedAt: z.iso.datetime(),
models: z.array(syncModelItemSchema), models: z.array(refreshedProviderModelSchema),
}),
z.object({
status: z.literal('unavailable'),
reason: providerRefreshUnavailableReasonSchema,
}),
])
export type ProviderModelRefreshResponse = z.infer<typeof providerModelRefreshResponseSchema>
export const importProviderModelsRequestSchema = z.object({
providerUpdatedAt: z.iso.datetime(),
modelIds: z.array(z.string().min(1)).min(1),
}) })
export type SyncProviderItem = z.infer<typeof syncProviderItemSchema> export type ImportProviderModelsRequest = z.infer<typeof importProviderModelsRequestSchema>
export const syncCheckResponseSchema = z.object({
providers: z.array(syncProviderItemSchema),
totalNewProviders: z.number(),
totalNewModels: z.number(),
})
export type SyncCheckResponse = z.infer<typeof syncCheckResponseSchema>
export const syncApplyRequestSchema = z.object({
providers: z.array(
z.object({
name: z.string(),
isNewProvider: z.boolean(),
config: providerConfigSchema,
models: z.array(syncModelItemSchema),
}),
),
})
export type SyncApplyRequest = z.infer<typeof syncApplyRequestSchema>
export const syncApplyResponseSchema = z.object({
addedProviders: z.number(),
addedModels: z.number(),
})
export type SyncApplyResponse = z.infer<typeof syncApplyResponseSchema>
+2 -2
View File
@@ -4,8 +4,8 @@
"private": true, "private": true,
"type": "module", "type": "module",
"dependencies": { "dependencies": {
"@earendil-works/pi-ai": "1.5.0", "@earendil-works/pi-ai": "1.7.0",
"@earendil-works/pi-durable": "1.5.0", "@earendil-works/pi-durable": "1.7.0",
"@google/genai": "2.28.0", "@google/genai": "2.28.0",
"@shumai/agent": "workspace:*", "@shumai/agent": "workspace:*",
"@shumai/core": "workspace:*", "@shumai/core": "workspace:*",
@@ -38,17 +38,19 @@ import {
SelectValue, SelectValue,
} from '@/ui/components/ui/select' } from '@/ui/components/ui/select'
import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/ui/components/ui/tabs' import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/ui/components/ui/tabs'
import { providerConfigSchema, KNOWN_APIS, type SyncCheckResponse } from '@shumai/dtos' import {
providerConfigSchema,
KNOWN_APIS,
type ProviderRefreshUnavailableReason,
type RefreshedProviderModel,
} from '@shumai/dtos'
import { useForm } from '@tanstack/react-form' import { useForm } from '@tanstack/react-form'
import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query' import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query'
import { InferResponseType } from 'hono/client' import { InferResponseType } from 'hono/client'
import { import {
ChevronRight,
Cpu, Cpu,
Globe, Globe,
Info,
Loader2, Loader2,
Maximize2,
MoreVertical, MoreVertical,
Plus, Plus,
RefreshCw, RefreshCw,
@@ -61,7 +63,7 @@ import { toast } from 'sonner'
import { z } from 'zod' import { z } from 'zod'
import { m } from '@/ui/paraglide/messages.js' import { m } from '@/ui/paraglide/messages.js'
import { ModelFormDialog, ModelFormValues } from './ModelFormDialog' import { ModelFormDialog, ModelFormValues } from './ModelFormDialog'
import { SyncProvidersDialog } from './SyncProvidersDialog' import { RefreshProviderModelsDialog } from './RefreshProviderModelsDialog'
const API_PROTOCOL_LABELS: Record<(typeof KNOWN_APIS)[number], string> = { const API_PROTOCOL_LABELS: Record<(typeof KNOWN_APIS)[number], string> = {
'openai-completions': 'OpenAI Completions', 'openai-completions': 'OpenAI Completions',
@@ -87,6 +89,19 @@ interface ProvidersSettingsProps {
teamId: string teamId: string
} }
function refreshUnavailableText(reason: ProviderRefreshUnavailableReason) {
switch (reason) {
case 'legacy_kimi_connection':
return m.provider_refresh_legacy_kimi_connection()
case 'azure_deployment_required':
return m.provider_refresh_azure_deployment_required()
case 'catalog_unavailable':
return m.provider_refresh_catalog_unavailable()
case 'unsupported_connection':
return m.provider_refresh_unsupported_connection()
}
}
export function ProvidersSettings({ teamId }: ProvidersSettingsProps) { export function ProvidersSettings({ teamId }: ProvidersSettingsProps) {
const queryClient = useQueryClient() const queryClient = useQueryClient()
const [editingProviderId, setEditingProviderId] = useState<string | null>(null) const [editingProviderId, setEditingProviderId] = useState<string | null>(null)
@@ -94,31 +109,40 @@ export function ProvidersSettings({ teamId }: ProvidersSettingsProps) {
const [searchQuery, setSearchQuery] = useState('') const [searchQuery, setSearchQuery] = useState('')
const [isDeleteDialogOpen, setIsDeleteDialogOpen] = useState(false) const [isDeleteDialogOpen, setIsDeleteDialogOpen] = useState(false)
const [providerToDelete, setProviderToDelete] = useState<Provider | null>(null) const [providerToDelete, setProviderToDelete] = useState<Provider | null>(null)
const [isSyncDialogOpen, setIsSyncDialogOpen] = useState(false) const [preview, setPreview] = useState<{
const [syncData, setSyncData] = useState<SyncCheckResponse | null>(null) provider: Provider
providerUpdatedAt: string
models: RefreshedProviderModel[]
trigger: HTMLButtonElement
} | null>(null)
// Check updates mutation const refreshMutation = useMutation({
const syncCheckMutation = useMutation({ mutationFn: async ({ provider }: { provider: Provider; trigger: HTMLButtonElement }) => {
mutationFn: async () => { const res = await client.api.teams[':teamId'].providers[':providerId'].models.refresh.$post({
const res = await client.api.teams[':teamId'].providers['sync-check'].$post({ param: { teamId, providerId: provider.id },
param: { teamId },
}) })
if (!res.ok) { if (!res.ok) throw new Error(m.provider_refresh_failed())
const err = await res.json().catch(() => ({ message: 'Failed to check updates' })) return res.json()
throw new Error((err as { message?: string }).message || 'Failed to check updates')
}
return await res.json()
}, },
onSuccess: (data) => { onSuccess: (data, { provider, trigger }) => {
if (data.totalNewModels === 0 && data.totalNewProviders === 0) { if (data.status === 'unavailable') {
toast.info(m.sync_providers_up_to_date()) toast.info(refreshUnavailableText(data.reason))
void queryClient.invalidateQueries({ queryKey: ['teams', teamId, 'providers'] })
return return
} }
setSyncData(data) if (data.models.length === 0) {
setIsSyncDialogOpen(true) toast.info(m.provider_refresh_no_new_models({ name: provider.name }))
return
}
setPreview({
provider,
providerUpdatedAt: data.providerUpdatedAt,
models: data.models,
trigger,
})
}, },
onError: (error: Error) => { onError: () => {
toast.error(error.message) toast.error(m.provider_refresh_failed())
}, },
}) })
@@ -143,9 +167,10 @@ export function ProvidersSettings({ teamId }: ProvidersSettingsProps) {
const filteredProviders = useMemo(() => { const filteredProviders = useMemo(() => {
if (!providers) return [] if (!providers) return []
if (!searchQuery.trim()) return providers const query = searchQuery.trim().toLowerCase()
const query = searchQuery.toLowerCase() return providers
return providers.filter((p) => p.name.toLowerCase().includes(query)) .filter((p) => p.name.toLowerCase().includes(query))
.sort((a, b) => Number(b.configured) - Number(a.configured))
}, [providers, searchQuery]) }, [providers, searchQuery])
// Create Mutation // Create Mutation
@@ -207,120 +232,40 @@ export function ProvidersSettings({ teamId }: ProvidersSettingsProps) {
return ( return (
<div className="h-full flex flex-col space-y-0"> <div className="h-full flex flex-col space-y-0">
<div className="flex-none space-y-4 pb-4"> <div className="flex flex-none flex-wrap items-center gap-3 pb-4">
<div className="flex items-center justify-between"> <div className="relative min-w-0 flex-[1_1_10rem] px-0.5">
<h3 className="text-lg font-semibold text-foreground flex items-center gap-2">
<Cpu className="w-5 h-5 text-primary" />
{m.configured_ai_providers()}
</h3>
<div className="flex items-center gap-2">
<Button
variant="outline"
onClick={() => syncCheckMutation.mutate()}
disabled={syncCheckMutation.isPending}
className="gap-2"
>
{syncCheckMutation.isPending ? (
<>
<Loader2 className="w-4 h-4 animate-spin" />
{m.sync_providers_checking()}
</>
) : (
<>
<RefreshCw className="w-4 h-4" />
{m.sync_providers()}
</>
)}
</Button>
<Button
onClick={() => setIsCreateDialogOpen(true)}
className="bg-primary hover:bg-primary/90 text-primary-foreground gap-2"
>
<Plus className="w-4 h-4" />
{m.add_provider()}
</Button>
</div>
</div>
<div className="relative px-0.5">
<Search className="absolute left-3.5 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground" /> <Search className="absolute left-3.5 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground" />
<Input <Input
aria-label={m.search_providers_placeholder()}
placeholder={m.search_providers_placeholder()} placeholder={m.search_providers_placeholder()}
value={searchQuery} value={searchQuery}
onChange={(e) => setSearchQuery(e.target.value)} onChange={(e) => setSearchQuery(e.target.value)}
className="pl-10 bg-card border-border focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-0" className="pl-10 bg-card border-border focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-0"
/> />
</div> </div>
<Button onClick={() => setIsCreateDialogOpen(true)} className="gap-2">
<Plus className="size-4" aria-hidden="true" />
{m.add_provider()}
</Button>
</div> </div>
<ScrollArea className="flex-1 min-h-0"> <ScrollArea className="flex-1 min-h-0">
<div className="pr-4 py-2 grid grid-cols-1 gap-4"> <div className="pr-4 py-2 grid grid-cols-1 gap-4">
{filteredProviders.map((provider) => ( {filteredProviders.map((provider) => (
<Card <ProviderCard
key={provider.id} key={provider.id}
className="group cursor-pointer hover:border-primary/50 transition-all hover:shadow-md overflow-hidden" provider={provider}
onClick={() => setEditingProviderId(provider.id)} isRefreshing={
> refreshMutation.isPending && refreshMutation.variables?.provider.id === provider.id
<CardContent className="p-5 flex items-center justify-between gap-4"> }
<div className="flex items-center gap-4 min-w-0 flex-1"> refreshInProgress={refreshMutation.isPending}
<div className="flex-none p-3 bg-muted rounded-xl group-hover:bg-primary/10 transition-colors"> onEdit={() => setEditingProviderId(provider.id)}
<Globe className="w-6 h-6 text-muted-foreground group-hover:text-primary" /> onRefresh={(trigger) => refreshMutation.mutate({ provider, trigger })}
</div> onDelete={() => {
<div className="min-w-0 flex-1"> setProviderToDelete(provider)
<div className="flex items-center gap-2"> setIsDeleteDialogOpen(true)
<span className="font-bold text-foreground truncate">{provider.name}</span> }}
</div> />
<div className="flex flex-wrap items-center gap-x-3 gap-y-1.5 text-xs text-muted-foreground mt-1">
<span className="flex items-center gap-1 flex-none">
<Zap className="w-3 h-3" />
{provider.config.api}
</span>
{provider.config.baseUrl && (
<span className="flex items-center gap-1 min-w-0">
<span className="h-1 w-1 rounded-full bg-muted-foreground/30 flex-none" />
<Info className="w-3 h-3 flex-none" />
<span className="truncate max-w-[200px] md:max-w-[300px]">
{provider.config.baseUrl}
</span>
</span>
)}
<span className="flex items-center gap-1 flex-none">
<span className="h-1 w-1 rounded-full bg-muted-foreground/30 flex-none" />
<Maximize2 className="w-3 h-3" />
{m.n_models_count({ count: provider.modelsCount })}
</span>
</div>
</div>
</div>
<div className="flex items-center gap-1">
<DropdownMenu modal={false}>
<DropdownMenuTrigger asChild onClick={(e) => e.stopPropagation()}>
<Button
variant="ghost"
size="icon"
className="h-8 w-8 text-muted-foreground hover:text-foreground"
>
<MoreVertical className="w-4 h-4" />
</Button>
</DropdownMenuTrigger>
<DropdownMenuContent align="end" className="w-32">
<DropdownMenuItem
onClick={(e) => {
e.stopPropagation()
setProviderToDelete(provider)
setIsDeleteDialogOpen(true)
}}
className="text-destructive focus:text-destructive gap-2 cursor-pointer"
>
<Trash2 className="w-4 h-4" /> {m.delete()}
</DropdownMenuItem>
</DropdownMenuContent>
</DropdownMenu>
<ChevronRight className="flex-none w-5 h-5 text-muted-foreground/50 group-hover:text-primary transition-colors" />
</div>
</CardContent>
</Card>
))} ))}
{providers?.length === 0 && ( {providers?.length === 0 && (
@@ -400,19 +345,123 @@ export function ProvidersSettings({ teamId }: ProvidersSettingsProps) {
</AlertDialogContent> </AlertDialogContent>
</AlertDialog> </AlertDialog>
<SyncProvidersDialog {preview && (
isOpen={isSyncDialogOpen} <RefreshProviderModelsDialog
onClose={() => setIsSyncDialogOpen(false)} teamId={teamId}
teamId={teamId} providerId={preview.provider.id}
syncData={syncData} providerUpdatedAt={preview.providerUpdatedAt}
onSuccess={() => { providerName={preview.provider.name}
queryClient.invalidateQueries({ queryKey: ['teams', teamId, 'providers'] }) models={preview.models}
}} onClose={() => setPreview(null)}
/> onCloseAutoFocus={() => preview.trigger.focus()}
onImported={() => {
void queryClient.invalidateQueries({ queryKey: ['teams', teamId, 'providers'] })
}}
/>
)}
</div> </div>
) )
} }
function ProviderCard({
provider,
isRefreshing,
refreshInProgress,
onEdit,
onRefresh,
onDelete,
}: {
provider: Provider
isRefreshing: boolean
refreshInProgress: boolean
onEdit: () => void
onRefresh: (button: HTMLButtonElement) => void
onDelete: () => void
}) {
const unavailable = provider.refreshUnavailableReason
const reasonId = `provider-refresh-reason-${provider.id}`
const displayUrl = provider.config.baseUrl?.replace(/^https?:\/\//, '')
return (
<Card className="gap-0 rounded-xl py-0 shadow-none transition-colors hover:border-primary/35">
<CardContent className="grid grid-cols-[auto_minmax(0,1fr)] items-start gap-x-3 gap-y-2 p-3.5 sm:grid-cols-[auto_minmax(0,1fr)_auto]">
<span className="grid size-9 place-items-center rounded-lg bg-muted text-muted-foreground">
<Globe aria-hidden="true" className="size-4" />
</span>
<div className="min-w-0">
<div className="flex flex-wrap items-center gap-x-2 gap-y-1">
<button
type="button"
onClick={onEdit}
aria-label={m.edit_item({ name: provider.name })}
className="max-w-full cursor-pointer rounded-sm text-start font-semibold wrap-anywhere text-foreground hover:underline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring"
>
{provider.name}
</button>
{provider.configured && (
<Badge variant="secondary" className="px-2 text-xs font-medium">
{m.provider_configured_badge()}
</Badge>
)}
</div>
<div className="mt-1 flex flex-wrap items-center gap-x-2 gap-y-0.5 text-xs text-muted-foreground">
<span>{API_PROTOCOL_LABELS[provider.config.api] ?? provider.config.api}</span>
<span aria-hidden="true">·</span>
<span>{m.n_models_count({ count: provider.modelsCount })}</span>
</div>
{unavailable ? (
<p id={reasonId} className="mt-1 text-xs text-muted-foreground">
{refreshUnavailableText(unavailable)}
</p>
) : displayUrl ? (
<p className="mt-1 wrap-anywhere text-xs text-muted-foreground" dir="ltr">
{displayUrl}
</p>
) : null}
</div>
<div className="col-start-2 flex flex-wrap items-center gap-1 sm:col-start-3">
<Button
type="button"
size="sm"
variant="outline"
className="min-h-11 sm:min-h-9"
disabled={unavailable !== null || refreshInProgress}
aria-label={m.provider_refresh_action({ name: provider.name })}
aria-describedby={unavailable ? reasonId : undefined}
aria-busy={isRefreshing}
onClick={(event) => onRefresh(event.currentTarget)}
>
{isRefreshing ? (
<Loader2 aria-hidden="true" className="size-4 motion-safe:animate-spin" />
) : (
<RefreshCw aria-hidden="true" className="size-4" />
)}
{isRefreshing ? m.provider_refresh_loading() : m.provider_refresh_models()}
</Button>
<DropdownMenu modal={false}>
<DropdownMenuTrigger asChild>
<Button
type="button"
variant="ghost"
size="icon"
aria-label={m.provider_options({ name: provider.name })}
className="size-11 text-muted-foreground hover:text-foreground sm:size-9"
>
<MoreVertical aria-hidden="true" className="size-4" />
</Button>
</DropdownMenuTrigger>
<DropdownMenuContent align="end" className="w-32">
<DropdownMenuItem onSelect={onEdit}>{m.edit()}</DropdownMenuItem>
<DropdownMenuItem onSelect={onDelete} variant="destructive">
<Trash2 className="size-4" /> {m.delete()}
</DropdownMenuItem>
</DropdownMenuContent>
</DropdownMenu>
</div>
</CardContent>
</Card>
)
}
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
// Create Provider Dialog // Create Provider Dialog
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
@@ -0,0 +1,107 @@
// @vitest-environment happy-dom
import { cleanup, fireEvent, render, screen, waitFor } from '@testing-library/react'
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
import type { RefreshedProviderModel } from '@shumai/dtos'
import { afterEach, describe, expect, it, vi } from 'vitest'
import { RefreshProviderModelsDialog } from './RefreshProviderModelsDialog'
const { importModels } = vi.hoisted(() => ({ importModels: vi.fn() }))
vi.mock('@/ui/api/client', () => ({
client: {
api: {
teams: {
':teamId': {
providers: { ':providerId': { models: { import: { $post: importModels } } } },
},
},
},
},
}))
const models = Array.from({ length: 6 }, (_, index): RefreshedProviderModel => ({
modelId: `model-${index + 1}`,
name: `Model ${index + 1}`,
config: {
api: 'openai-responses',
reasoning: false,
input: ['text'],
contextWindow: 128000,
maxTokens: 4096,
cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
},
}))
function renderDialog() {
const queryClient = new QueryClient({ defaultOptions: { queries: { retry: false } } })
const onClose = vi.fn()
const onImported = vi.fn()
render(
<QueryClientProvider client={queryClient}>
<RefreshProviderModelsDialog
teamId="team-1"
providerId="provider-1"
providerUpdatedAt="2026-11-29T09:15:00.000Z"
providerName="OpenAI"
models={models}
onClose={onClose}
onCloseAutoFocus={vi.fn()}
onImported={onImported}
/>
</QueryClientProvider>,
)
return { onClose, onImported }
}
describe('RefreshProviderModelsDialog', () => {
afterEach(() => {
cleanup()
importModels.mockReset()
})
it('opens a single-provider preview with selectable models and an empty selection', () => {
renderDialog()
expect(screen.getByRole('heading', { name: 'New models for OpenAI' })).toBeTruthy()
expect(screen.getByText('Select the models you want to add.')).toBeTruthy()
expect(screen.getAllByRole('checkbox')).toHaveLength(models.length)
expect(screen.getByRole('button', { name: 'Add selected' }).hasAttribute('disabled')).toBe(true)
})
it('filters models and selects or deselects the visible results', () => {
renderDialog()
const search = screen.getByRole('textbox')
fireEvent.change(search, { target: { value: 'model-2' } })
expect(screen.queryByText('Model 1')).toBeNull()
expect(screen.getAllByRole('checkbox')).toHaveLength(1)
fireEvent.click(screen.getByRole('button', { name: 'Select visible' }))
expect(screen.getByRole('checkbox').getAttribute('aria-checked')).toBe('true')
expect(screen.getByRole('button', { name: 'Add selected (1)' })).toBeTruthy()
fireEvent.click(screen.getByRole('button', { name: 'Deselect visible' }))
expect(screen.getByRole('checkbox').getAttribute('aria-checked')).toBe('false')
expect(screen.getByRole('button', { name: 'Add selected' }).hasAttribute('disabled')).toBe(true)
})
it('imports only the selected models into the previewed provider', async () => {
importModels.mockResolvedValueOnce(Response.json({ addedModels: 1 }))
const { onClose, onImported } = renderDialog()
fireEvent.click(screen.getAllByRole('checkbox')[1])
fireEvent.click(screen.getByRole('button', { name: 'Add selected (1)' }))
await waitFor(() => expect(onClose).toHaveBeenCalledOnce())
expect(onImported).toHaveBeenCalledOnce()
expect(importModels).toHaveBeenCalledWith({
param: { teamId: 'team-1', providerId: 'provider-1' },
json: { providerUpdatedAt: '2026-11-29T09:15:00.000Z', modelIds: ['model-2'] },
})
})
it('shows an actionable error when the preview becomes stale', async () => {
importModels.mockResolvedValueOnce(new Response(null, { status: 409 }))
const { onImported } = renderDialog()
fireEvent.click(screen.getAllByRole('checkbox')[0])
fireEvent.click(screen.getByRole('button', { name: 'Add selected (1)' }))
expect((await screen.findByRole('alert')).textContent).toContain('Refresh models again.')
expect(onImported).not.toHaveBeenCalled()
})
})
@@ -0,0 +1,187 @@
import { useState } from 'react'
import { useMutation } from '@tanstack/react-query'
import { Loader2 } from 'lucide-react'
import { toast } from 'sonner'
import type { RefreshedProviderModel } from '@shumai/dtos'
import { client } from '@/ui/api/client'
import { Badge } from '@/ui/components/ui/badge'
import { Button } from '@/ui/components/ui/button'
import { Checkbox } from '@/ui/components/ui/checkbox'
import {
Dialog,
DialogContent,
DialogDescription,
DialogFooter,
DialogHeader,
DialogTitle,
} from '@/ui/components/ui/dialog'
import { Input } from '@/ui/components/ui/input'
import { ScrollArea } from '@/ui/components/ui/scroll-area'
import { m } from '@/ui/paraglide/messages.js'
interface RefreshProviderModelsDialogProps {
teamId: string
providerId: string
providerUpdatedAt: string
providerName: string
models: RefreshedProviderModel[]
onClose: () => void
onCloseAutoFocus: () => void
onImported: () => void
}
export function RefreshProviderModelsDialog({
teamId,
providerId,
providerUpdatedAt,
providerName,
models,
onClose,
onCloseAutoFocus,
onImported,
}: RefreshProviderModelsDialogProps) {
const [selectedIds, setSelectedIds] = useState(() => new Set<string>())
const [search, setSearch] = useState('')
const query = search.trim().toLowerCase()
const filteredModels = models.filter(
({ name, modelId }) =>
name.toLowerCase().includes(query) || modelId.toLowerCase().includes(query),
)
const allVisibleSelected =
filteredModels.length > 0 && filteredModels.every(({ modelId }) => selectedIds.has(modelId))
const importMutation = useMutation({
mutationFn: async () => {
const res = await client.api.teams[':teamId'].providers[':providerId'].models.import.$post({
param: { teamId, providerId },
json: { providerUpdatedAt, modelIds: [...selectedIds] },
})
if (res.status === 409) throw new Error(m.provider_refresh_stale())
if (!res.ok) throw new Error(m.provider_refresh_import_failed())
return res.json()
},
onSuccess: ({ addedModels }) => {
if (addedModels > 0) {
toast.success(m.provider_refresh_imported({ count: addedModels, name: providerName }))
} else {
toast.info(m.provider_refresh_no_new_models({ name: providerName }))
}
onImported()
onClose()
},
})
function selectModels(modelIds: string[], selected: boolean) {
setSelectedIds((previous) => {
const next = new Set(previous)
for (const modelId of modelIds) {
if (selected) next.add(modelId)
else next.delete(modelId)
}
return next
})
}
return (
<Dialog open onOpenChange={(open) => !open && !importMutation.isPending && onClose()}>
<DialogContent
className="sm:max-w-lg"
showCloseButton={!importMutation.isPending}
onCloseAutoFocus={(event) => {
event.preventDefault()
onCloseAutoFocus()
}}
>
<DialogHeader className="pr-6">
<DialogTitle>{m.provider_refresh_dialog_title({ name: providerName })}</DialogTitle>
<DialogDescription>{m.provider_refresh_dialog_description()}</DialogDescription>
</DialogHeader>
{models.length > 5 && (
<div className="flex flex-wrap items-center gap-2">
<Input
className="min-w-36 flex-1"
aria-label={m.search_models_placeholder()}
placeholder={m.search_models_placeholder()}
value={search}
onChange={(event) => setSearch(event.target.value)}
/>
<Button
type="button"
variant="outline"
size="sm"
disabled={filteredModels.length === 0 || importMutation.isPending}
onClick={() =>
selectModels(
filteredModels.map(({ modelId }) => modelId),
!allVisibleSelected,
)
}
>
{allVisibleSelected
? m.provider_refresh_deselect_visible()
: m.provider_refresh_select_visible()}
</Button>
</div>
)}
<ScrollArea className="[&>[data-slot=scroll-area-viewport]]:max-h-[min(24rem,45dvh)]">
<ul className="divide-y divide-border pr-3">
{filteredModels.map(({ name, modelId, config }) => (
<li key={modelId}>
<label className="flex min-h-11 cursor-pointer items-center gap-3 rounded-sm px-1 py-2">
<Checkbox
checked={selectedIds.has(modelId)}
disabled={importMutation.isPending}
onCheckedChange={(checked) => selectModels([modelId], checked === true)}
/>
<span className="min-w-0 flex-1 wrap-anywhere text-sm font-medium">
{name}
{name !== modelId && (
<span className="block text-xs font-normal text-muted-foreground">
{modelId}
</span>
)}
</span>
{config.reasoning && (
<Badge variant="secondary" className="font-normal">
{m.reasoning_support()}
</Badge>
)}
</label>
</li>
))}
</ul>
{filteredModels.length === 0 && (
<p className="py-3 text-sm text-muted-foreground">{m.no_matches_found()}</p>
)}
</ScrollArea>
{importMutation.error && (
<p role="alert" className="text-sm text-destructive">
{importMutation.error.message}
</p>
)}
<DialogFooter>
<Button
type="button"
variant="outline"
disabled={importMutation.isPending}
onClick={onClose}
>
{m.cancel()}
</Button>
<Button
type="button"
disabled={selectedIds.size === 0 || importMutation.isPending}
onClick={() => importMutation.mutate()}
>
{importMutation.isPending && (
<Loader2 aria-hidden="true" className="size-4 motion-safe:animate-spin" />
)}
{selectedIds.size
? m.provider_refresh_add_selection({ count: selectedIds.size })
: m.provider_refresh_add_selected()}
</Button>
</DialogFooter>
</DialogContent>
</Dialog>
)
}
@@ -1,275 +0,0 @@
// @vitest-environment happy-dom
import { cleanup, render, screen, fireEvent } from '@testing-library/react'
import React from 'react'
import { afterEach, describe, expect, it, vi } from 'vitest'
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
import { SyncProvidersDialog } from './SyncProvidersDialog'
import type { SyncCheckResponse } from '@shumai/dtos'
describe('SyncProvidersDialog', () => {
afterEach(() => {
cleanup()
})
const mockSyncData: SyncCheckResponse = {
totalNewProviders: 1,
totalNewModels: 3,
providers: [
{
name: 'test-new-provider',
isNewProvider: true,
config: { api: 'openai-responses', apiKey: 'NEW_KEY' },
models: [
{
modelId: 'm-new-1',
name: 'New Model 1',
config: {
api: 'openai-responses',
reasoning: true,
input: ['text'],
contextWindow: 128000,
maxTokens: 4096,
cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
},
},
{
modelId: 'm-new-2',
name: 'New Model 2',
config: {
api: 'openai-responses',
reasoning: false,
input: ['text'],
contextWindow: 64000,
maxTokens: 2048,
cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
},
},
],
},
{
name: 'test-existing-provider',
isNewProvider: false,
config: { api: 'anthropic-messages', apiKey: 'EXISTING_KEY' },
models: [
{
modelId: 'm-existing-add-1',
name: 'Existing Provider New Model 1',
config: {
api: 'anthropic-messages',
reasoning: false,
input: ['text'],
contextWindow: 200000,
maxTokens: 8192,
cost: { input: 3, output: 15, cacheRead: 0.3, cacheWrite: 3.75 },
},
},
],
},
],
}
function renderDialog(props?: Partial<React.ComponentProps<typeof SyncProvidersDialog>>) {
const queryClient = new QueryClient({
defaultOptions: { queries: { retry: false } },
})
return render(
<QueryClientProvider client={queryClient}>
<SyncProvidersDialog
isOpen={true}
onClose={vi.fn()}
teamId="team-1"
syncData={mockSyncData}
onSuccess={vi.fn()}
{...props}
/>
</QueryClientProvider>,
)
}
it('renders the dialog with description, providers and models pre-selected by default', () => {
renderDialog()
// Title and description
expect(screen.getByRole('heading', { name: /sync providers & models/i })).toBeDefined()
expect(
screen.getAllByText(
/existing providers, custom endpoints, api keys, and model configurations will never be deleted or modified/i,
).length,
).toBeGreaterThan(0)
// Check provider names
expect(screen.getByText('test-new-provider')).toBeDefined()
expect(screen.getByText('test-existing-provider')).toBeDefined()
// Badges
expect(screen.getByText(/^new provider$/i)).toBeDefined()
expect(screen.getByText(/^existing provider$/i)).toBeDefined()
// Check that both new and existing providers have checkboxes
const newProviderCheckbox = document.getElementById('provider-check-test-new-provider')
expect(newProviderCheckbox).toBeDefined()
expect(newProviderCheckbox?.getAttribute('data-state')).toBe('checked')
const existingProviderCheckbox = document.getElementById(
'provider-check-test-existing-provider',
)
expect(existingProviderCheckbox).toBeDefined()
expect(existingProviderCheckbox?.getAttribute('data-state')).toBe('checked')
// Model checkboxes are checked by default
const mNew1Check = document.getElementById('model-check-test-new-provider-m-new-1')
expect(mNew1Check).toBeDefined()
expect(mNew1Check?.getAttribute('data-state')).toBe('checked')
})
it('toggles all models for an existing provider when its checkbox is clicked', () => {
renderDialog()
const existingProviderCheckbox = document.getElementById(
'provider-check-test-existing-provider',
)!
const existingModelCheck = document.getElementById(
'model-check-test-existing-provider-m-existing-add-1',
)!
expect(existingModelCheck.getAttribute('data-state')).toBe('checked')
// Click to uncheck all
fireEvent.click(existingProviderCheckbox)
expect(existingModelCheck.getAttribute('data-state')).toBe('unchecked')
expect(existingProviderCheckbox.getAttribute('data-state')).toBe('unchecked')
// Click to check all
fireEvent.click(existingProviderCheckbox)
expect(existingModelCheck.getAttribute('data-state')).toBe('checked')
expect(existingProviderCheckbox.getAttribute('data-state')).toBe('checked')
})
it('supports select all and deselect all buttons', () => {
renderDialog()
const deselectAllBtn = screen.getByRole('button', { name: /^deselect all$/i })
fireEvent.click(deselectAllBtn)
const mNew1Check = document.getElementById('model-check-test-new-provider-m-new-1')
expect(mNew1Check?.getAttribute('data-state')).toBe('unchecked')
const selectAllBtn = screen.getByRole('button', { name: /^select all$/i })
fireEvent.click(selectAllBtn)
expect(mNew1Check?.getAttribute('data-state')).toBe('checked')
})
it('unchecks new provider when all its models are unchecked', () => {
renderDialog()
const mNew1Check = document.getElementById('model-check-test-new-provider-m-new-1')!
const mNew2Check = document.getElementById('model-check-test-new-provider-m-new-2')!
const newProviderCheckbox = document.getElementById('provider-check-test-new-provider')!
// Uncheck both models
fireEvent.click(mNew1Check)
expect(newProviderCheckbox.getAttribute('data-state')).toBe('indeterminate')
fireEvent.click(mNew2Check)
expect(newProviderCheckbox.getAttribute('data-state')).toBe('unchecked')
// Re-check one model -> provider should automatically check
fireEvent.click(mNew1Check)
expect(newProviderCheckbox.getAttribute('data-state')).not.toBe('unchecked')
})
it('filters models when user types in search input', () => {
renderDialog()
const searchInput = screen.getByPlaceholderText(/filter new providers or models/i)
fireEvent.change(searchInput, { target: { value: 'm-existing-add-1' } })
// Only existing provider model should be visible
expect(screen.queryByText('m-new-1')).toBeNull()
expect(screen.getByText('Existing Provider New Model 1')).toBeDefined()
})
it('supports expand all and collapse all buttons', () => {
renderDialog()
// Models should be visible initially (all expanded)
expect(document.getElementById('model-check-test-new-provider-m-new-1')).toBeDefined()
// Click Collapse All
const collapseAllBtn = screen.getByRole('button', { name: /^collapse all$/i })
fireEvent.click(collapseAllBtn)
// Child models should be collapsed (not in DOM)
expect(document.getElementById('model-check-test-new-provider-m-new-1')).toBeNull()
// Click Expand All
const expandAllBtn = screen.getByRole('button', { name: /^expand all$/i })
fireEvent.click(expandAllBtn)
// Child models should be visible again
expect(document.getElementById('model-check-test-new-provider-m-new-1')).toBeDefined()
})
it('updates selection and expansion state when syncData prop changes while mounted', () => {
const { rerender } = renderDialog()
// Initially, test-new-provider is present
expect(screen.getByText('test-new-provider')).toBeDefined()
// Deselect all models to change internal state
const deselectAllBtn = screen.getByRole('button', { name: /^deselect all$/i })
fireEvent.click(deselectAllBtn)
const mNew1Check = document.getElementById('model-check-test-new-provider-m-new-1')
expect(mNew1Check?.getAttribute('data-state')).toBe('unchecked')
// Now supply new syncData prop with different providers and models
const updatedSyncData: SyncCheckResponse = {
totalNewProviders: 1,
totalNewModels: 1,
providers: [
{
name: 'updated-provider',
isNewProvider: true,
config: { api: 'openai-responses' },
models: [
{
modelId: 'm-updated-1',
name: 'Updated Model 1',
config: {
api: 'openai-responses',
reasoning: false,
input: ['text'],
contextWindow: 32000,
maxTokens: 1024,
cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
},
},
],
},
],
}
const queryClient = new QueryClient({
defaultOptions: { queries: { retry: false } },
})
rerender(
<QueryClientProvider client={queryClient}>
<SyncProvidersDialog
isOpen={true}
onClose={vi.fn()}
teamId="team-1"
syncData={updatedSyncData}
onSuccess={vi.fn()}
/>
</QueryClientProvider>,
)
// New provider should be rendered, expanded by default, and model should be pre-selected
expect(screen.getByText('updated-provider')).toBeDefined()
const updatedModelCheck = document.getElementById('model-check-updated-provider-m-updated-1')
expect(updatedModelCheck).toBeDefined()
expect(updatedModelCheck?.getAttribute('data-state')).toBe('checked')
})
})
@@ -1,474 +0,0 @@
import { useState, useMemo, useEffect } from 'react'
import {
Dialog,
DialogContent,
DialogDescription,
DialogFooter,
DialogHeader,
DialogTitle,
} from '@/ui/components/ui/dialog'
import { Button } from '@/ui/components/ui/button'
import { Checkbox } from '@/ui/components/ui/checkbox'
import { Badge } from '@/ui/components/ui/badge'
import { Input } from '@/ui/components/ui/input'
import { ScrollArea } from '@/ui/components/ui/scroll-area'
import { ChevronDown, ChevronRight, Cpu, Loader2, Search, Sparkles } from 'lucide-react'
import { useMutation } from '@tanstack/react-query'
import { client } from '@/ui/api/client'
import { toast } from 'sonner'
import { m } from '@/ui/paraglide/messages.js'
import type { SyncCheckResponse, SyncApplyRequest } from '@shumai/dtos'
interface SyncProvidersDialogProps {
isOpen: boolean
onClose: () => void
teamId: string
syncData: SyncCheckResponse | null
onSuccess: () => void
}
export function SyncProvidersDialog({
isOpen,
onClose,
teamId,
syncData,
onSuccess,
}: SyncProvidersDialogProps) {
const [filterQuery, setFilterQuery] = useState('')
const [expandedProviders, setExpandedProviders] = useState<Set<string>>(() => {
return new Set(syncData?.providers.map((p) => p.name) || [])
})
// Pre-selected by default (opt-out)
const [selectedModels, setSelectedModels] = useState<Set<string>>(() => {
const set = new Set<string>()
syncData?.providers.forEach((p) => {
p.models.forEach((mItem) => {
set.add(`${p.name}:${mItem.modelId}`)
})
})
return set
})
// Sync state if syncData changes
useEffect(() => {
if (syncData) {
setExpandedProviders(new Set(syncData.providers.map((p) => p.name)))
const modelSet = new Set<string>()
syncData.providers.forEach((p) => {
p.models.forEach((mItem) => {
modelSet.add(`${p.name}:${mItem.modelId}`)
})
})
setSelectedModels(modelSet)
}
}, [syncData])
// Filtered tree data based on filterQuery
const filteredTree = useMemo(() => {
if (!syncData) return []
const q = filterQuery.trim().toLowerCase()
if (!q) return syncData.providers
return syncData.providers
.map((p) => {
const matchesProvider = p.name.toLowerCase().includes(q)
const matchingModels = p.models.filter(
(mItem) =>
matchesProvider ||
mItem.modelId.toLowerCase().includes(q) ||
mItem.name.toLowerCase().includes(q),
)
if (matchingModels.length > 0) {
return { ...p, models: matchingModels }
}
return null
})
.filter((p): p is NonNullable<typeof p> => p !== null)
}, [syncData, filterQuery])
// Total selected models & providers
const totalSelectedModelsCount = selectedModels.size
const totalSelectedProvidersCount = useMemo(() => {
if (!syncData) return 0
let count = 0
for (const p of syncData.providers) {
const hasSelectedModel = p.models.some((mItem) =>
selectedModels.has(`${p.name}:${mItem.modelId}`),
)
if (hasSelectedModel) count++
}
return count
}, [syncData, selectedModels])
const toggleExpand = (providerName: string) => {
setExpandedProviders((prev) => {
const next = new Set(prev)
if (next.has(providerName)) {
next.delete(providerName)
} else {
next.add(providerName)
}
return next
})
}
const handleExpandAll = () => {
if (!syncData) return
setExpandedProviders(new Set(syncData.providers.map((p) => p.name)))
}
const handleCollapseAll = () => {
setExpandedProviders(new Set())
}
const toggleModel = (providerName: string, modelId: string) => {
const key = `${providerName}:${modelId}`
setSelectedModels((prevModels) => {
const nextModels = new Set(prevModels)
if (nextModels.has(key)) {
nextModels.delete(key)
} else {
nextModels.add(key)
}
return nextModels
})
}
const toggleProvider = (providerName: string) => {
const providerData = syncData?.providers.find((p) => p.name === providerName)
if (!providerData || providerData.models.length === 0) return
const allModelsChecked = providerData.models.every((mItem) =>
selectedModels.has(`${providerName}:${mItem.modelId}`),
)
setSelectedModels((prev) => {
const next = new Set(prev)
providerData.models.forEach((mItem) => {
const key = `${providerName}:${mItem.modelId}`
if (allModelsChecked) {
next.delete(key)
} else {
next.add(key)
}
})
return next
})
}
const handleSelectAll = () => {
if (!syncData) return
const modelSet = new Set<string>()
syncData.providers.forEach((p) => {
p.models.forEach((mItem) => {
modelSet.add(`${p.name}:${mItem.modelId}`)
})
})
setSelectedModels(modelSet)
}
const handleDeselectAll = () => {
setSelectedModels(new Set())
}
// Apply mutation
const applyMutation = useMutation({
mutationFn: async (payload: SyncApplyRequest) => {
const res = await client.api.teams[':teamId'].providers['sync-apply'].$post({
param: { teamId },
json: payload,
})
if (!res.ok) {
const err = await res.json().catch(() => ({ message: 'Failed to apply sync' }))
throw new Error((err as { message?: string }).message || 'Failed to apply sync')
}
return await res.json()
},
onSuccess: (data) => {
toast.success(
m.sync_providers_success({
modelCount: data.addedModels,
providerCount: data.addedProviders,
}),
)
onSuccess()
onClose()
},
onError: (error: Error) => {
toast.error(error.message)
},
})
const handleConfirm = async () => {
if (!syncData || totalSelectedModelsCount === 0) return
const providersToSync: SyncApplyRequest['providers'] = []
for (const p of syncData.providers) {
const selectedModelsForProvider = p.models.filter((mItem) =>
selectedModels.has(`${p.name}:${mItem.modelId}`),
)
if (selectedModelsForProvider.length > 0) {
providersToSync.push({
name: p.name,
isNewProvider: p.isNewProvider,
config: p.config,
models: selectedModelsForProvider,
})
}
}
if (providersToSync.length === 0) return
await applyMutation.mutateAsync({
providers: providersToSync,
})
}
return (
<Dialog open={isOpen} onOpenChange={(open) => !open && onClose()}>
<DialogContent className="sm:max-w-3xl md:max-w-4xl w-full h-[85vh] max-h-[85vh] flex flex-col p-0 overflow-hidden gap-0">
<DialogHeader className="p-6 pb-4 shrink-0">
<DialogTitle className="flex items-center gap-2 text-xl font-semibold">
<Sparkles className="w-5 h-5 text-primary" />
{m.sync_providers_dialog_title()}
</DialogTitle>
<DialogDescription className="text-xs text-muted-foreground leading-relaxed mt-1.5">
{m.sync_providers_dialog_description()}
</DialogDescription>
</DialogHeader>
{/* Controls Toolbar */}
<div className="px-6 pb-3 shrink-0">
<div className="flex items-center justify-between gap-3">
<div className="relative flex-1">
<Search className="absolute left-2.5 top-1/2 -translate-y-1/2 w-3.5 h-3.5 text-muted-foreground" />
<Input
value={filterQuery}
onChange={(e) => setFilterQuery(e.target.value)}
placeholder={m.sync_providers_search_placeholder()}
className="pl-8 h-8 text-xs bg-background"
/>
</div>
<div className="flex items-center gap-1.5">
<Button
type="button"
variant="outline"
size="sm"
onClick={handleExpandAll}
className="h-8 text-xs px-2.5"
>
{m.sync_providers_expand_all()}
</Button>
<Button
type="button"
variant="outline"
size="sm"
onClick={handleCollapseAll}
className="h-8 text-xs px-2.5"
>
{m.sync_providers_collapse_all()}
</Button>
<div className="w-px h-4 bg-border mx-1" />
<Button
type="button"
variant="outline"
size="sm"
onClick={handleSelectAll}
className="h-8 text-xs px-2.5"
>
{m.sync_providers_select_all()}
</Button>
<Button
type="button"
variant="outline"
size="sm"
onClick={handleDeselectAll}
className="h-8 text-xs px-2.5"
>
{m.sync_providers_deselect_all()}
</Button>
</div>
</div>
</div>
{/* Tree List Container */}
<div className="flex-1 min-h-0 px-6 overflow-hidden">
<ScrollArea className="h-full border border-border/60 rounded-md bg-muted/20">
<div className="p-3 space-y-3">
{filteredTree.length === 0 ? (
<div className="py-8 text-center text-sm text-muted-foreground">
{m.no_matches_found()}
</div>
) : (
filteredTree.map((provider) => {
const isExpanded = expandedProviders.has(provider.name)
const isNew = provider.isNewProvider
// Determine provider check state
const checkedCount = provider.models.filter((mItem) =>
selectedModels.has(`${provider.name}:${mItem.modelId}`),
).length
const allChecked = checkedCount === provider.models.length
const someChecked = checkedCount > 0 && !allChecked
return (
<div
key={provider.name}
className="border border-border/50 rounded-lg bg-background overflow-hidden"
>
{/* Provider Header Row */}
<div className="flex items-center justify-between px-3 py-2 bg-card hover:bg-muted/40 transition-colors">
<div className="flex items-center gap-2.5">
<button
type="button"
onClick={() => toggleExpand(provider.name)}
className="p-0.5 text-muted-foreground hover:text-foreground rounded transition-colors"
>
{isExpanded ? (
<ChevronDown className="w-4 h-4" />
) : (
<ChevronRight className="w-4 h-4" />
)}
</button>
<Checkbox
checked={allChecked ? true : someChecked ? 'indeterminate' : false}
onCheckedChange={() => toggleProvider(provider.name)}
id={`provider-check-${provider.name}`}
/>
<label
htmlFor={`provider-check-${provider.name}`}
className="font-medium text-sm text-foreground flex items-center gap-2 cursor-pointer select-none"
>
<Cpu className="w-4 h-4 text-muted-foreground" />
<span>{provider.name}</span>
</label>
</div>
<div className="flex items-center gap-2">
{isNew ? (
<Badge
variant="secondary"
className="text-[10px] px-1.5 py-0 bg-primary/10 text-primary border-primary/20"
>
{m.sync_providers_new_provider()}
</Badge>
) : (
<Badge
variant="outline"
className="text-[10px] px-1.5 py-0 text-muted-foreground"
>
{m.sync_providers_existing_provider()}
</Badge>
)}
<span className="text-xs text-muted-foreground">
{m.sync_providers_new_models_count({
count: provider.models.length,
})}
</span>
</div>
</div>
{/* Model Children Rows */}
{isExpanded && (
<div className="border-t border-border/40 divide-y divide-border/30 bg-muted/10">
{provider.models.map((model) => {
const isModelChecked = selectedModels.has(
`${provider.name}:${model.modelId}`,
)
return (
<div
key={model.modelId}
className="flex items-center justify-between pl-9 pr-3 py-2 hover:bg-muted/30 transition-colors"
>
<div className="flex items-center gap-2.5 min-w-0">
<Checkbox
checked={isModelChecked}
onCheckedChange={() =>
toggleModel(provider.name, model.modelId)
}
id={`model-check-${provider.name}-${model.modelId}`}
/>
<label
htmlFor={`model-check-${provider.name}-${model.modelId}`}
className="text-xs font-medium text-foreground cursor-pointer select-none truncate"
>
{model.name || model.modelId}
<span className="ml-1.5 text-[11px] text-muted-foreground font-mono font-normal">
{model.modelId}
</span>
</label>
</div>
<div className="flex items-center gap-1.5 shrink-0 ml-2">
{model.config.reasoning && (
<Badge
variant="outline"
className="text-[10px] px-1.5 py-0 font-normal border-amber-500/30 text-amber-600 dark:text-amber-400"
>
{m.sync_providers_reasoning()}
</Badge>
)}
<span className="text-[11px] text-muted-foreground font-mono">
{m.sync_providers_context_window({
count: Math.round(model.config.contextWindow / 1000),
})}
</span>
</div>
</div>
)
})}
</div>
)}
</div>
)
})
)}
</div>
</ScrollArea>
</div>
{/* Selected Count & Footer */}
<DialogFooter className="p-6 pt-3 shrink-0 border-t border-border flex items-center justify-between sm:justify-between w-full">
<div className="text-xs text-muted-foreground">
{m.sync_providers_selected_count({
modelCount: totalSelectedModelsCount,
providerCount: totalSelectedProvidersCount,
})}
</div>
<div className="flex items-center gap-2">
<Button
type="button"
variant="outline"
onClick={onClose}
disabled={applyMutation.isPending}
>
{m.cancel()}
</Button>
<Button
type="button"
onClick={handleConfirm}
disabled={totalSelectedModelsCount === 0 || applyMutation.isPending}
className="gap-2"
>
{applyMutation.isPending ? (
<>
<Loader2 className="w-4 h-4 animate-spin" />
{m.sync_providers_adding()}
</>
) : (
m.sync_providers_add_selected({
count: totalSelectedModelsCount,
})
)}
</Button>
</div>
</DialogFooter>
</DialogContent>
</Dialog>
)
}
+20 -20
View File
@@ -459,27 +459,27 @@
"ai": "AI", "ai": "AI",
"providers": "Providers", "providers": "Providers",
"providers_description": "Configure AI providers and their models for this team.", "providers_description": "Configure AI providers and their models for this team.",
"configured_ai_providers": "Configured AI Providers", "provider_configured_badge": "Configured",
"provider_options": "Options for {name}",
"provider_refresh_models": "Refresh models",
"provider_refresh_action": "Refresh models for {name}",
"provider_refresh_loading": "Refreshing…",
"provider_refresh_legacy_kimi_connection": "The public Kimi catalog uses Chat Completions. You can still add models manually to this Anthropic Messages connection.",
"provider_refresh_azure_deployment_required": "Set an Azure endpoint and map deployed model IDs to refresh models.",
"provider_refresh_catalog_unavailable": "Pi does not publish a model catalog for this provider.",
"provider_refresh_unsupported_connection": "Refresh is unavailable for this endpoint or API.",
"provider_refresh_failed": "Could not refresh models. Try again.",
"provider_refresh_no_new_models": "No new models for {name}.",
"provider_refresh_dialog_title": "New models for {name}",
"provider_refresh_dialog_description": "Select the models you want to add.",
"provider_refresh_select_visible": "Select visible",
"provider_refresh_deselect_visible": "Deselect visible",
"provider_refresh_add_selected": "Add selected",
"provider_refresh_add_selection": "Add selected ({count})",
"provider_refresh_imported": "Added {count} models to {name}.",
"provider_refresh_import_failed": "Could not add the selected models. Try again.",
"provider_refresh_stale": "This preview has expired or the connection changed. Refresh models again.",
"add_provider": "Add Provider", "add_provider": "Add Provider",
"sync_providers": "Sync Providers",
"sync_providers_checking": "Checking for updates...",
"sync_providers_dialog_title": "Sync Providers & Models",
"sync_providers_dialog_description": "Select the new providers and models you want to add. Existing providers, custom endpoints, API keys, and model configurations will never be deleted or modified.",
"sync_providers_up_to_date": "All providers and models are already up to date.",
"sync_providers_select_all": "Select All",
"sync_providers_deselect_all": "Deselect All",
"sync_providers_expand_all": "Expand All",
"sync_providers_collapse_all": "Collapse All",
"sync_providers_search_placeholder": "Filter new providers or models...",
"sync_providers_new_provider": "New Provider",
"sync_providers_existing_provider": "Existing Provider",
"sync_providers_new_models_count": "{count} new models",
"sync_providers_selected_count": "{modelCount} models selected across {providerCount} providers",
"sync_providers_reasoning": "reasoning",
"sync_providers_context_window": "{count}k ctx",
"sync_providers_add_selected": "Add Selected ({count})",
"sync_providers_adding": "Adding...",
"sync_providers_success": "Successfully added {modelCount} models across {providerCount} providers.",
"search_providers_placeholder": "Search providers...", "search_providers_placeholder": "Search providers...",
"no_providers_found": "No providers found", "no_providers_found": "No providers found",
"built_in": "Built-in", "built_in": "Built-in",
+20 -20
View File
@@ -444,27 +444,27 @@
"ai": "AI", "ai": "AI",
"providers": "프로바이더", "providers": "프로바이더",
"providers_description": "이 팀의 AI 프로바이더와 모델을 설정합니다.", "providers_description": "이 팀의 AI 프로바이더와 모델을 설정합니다.",
"configured_ai_providers": "설정된 AI 프로바이더", "provider_configured_badge": "설정됨",
"provider_options": "{name} 옵션",
"provider_refresh_models": "모델 새로 고침",
"provider_refresh_action": "{name}의 모델 새로 고침",
"provider_refresh_loading": "새로 고치는 중…",
"provider_refresh_legacy_kimi_connection": "Kimi 공개 카탈로그는 Chat Completions를 사용합니다. 이 Anthropic Messages 연결에 모델을 직접 추가할 수 있습니다.",
"provider_refresh_azure_deployment_required": "모델을 새로 고치려면 Azure 엔드포인트를 설정하고 배포된 모델 ID를 매핑하세요.",
"provider_refresh_catalog_unavailable": "Pi에서 이 제공업체의 모델 카탈로그를 제공하지 않습니다.",
"provider_refresh_unsupported_connection": "이 엔드포인트 또는 API에서는 모델을 새로 고칠 수 없습니다.",
"provider_refresh_failed": "모델을 새로 고침할 수 없습니다. 다시 시도하세요.",
"provider_refresh_no_new_models": "{name}에 새 모델이 없습니다.",
"provider_refresh_dialog_title": "{name}의 새 모델",
"provider_refresh_dialog_description": "추가할 모델을 선택하세요.",
"provider_refresh_select_visible": "표시된 모델 선택",
"provider_refresh_deselect_visible": "표시된 모델 선택 해제",
"provider_refresh_add_selected": "선택한 모델 추가",
"provider_refresh_add_selection": "선택한 모델 추가({count}개)",
"provider_refresh_imported": "{name}에 모델 {count}개를 추가했습니다.",
"provider_refresh_import_failed": "선택한 모델을 추가할 수 없습니다. 다시 시도하세요.",
"provider_refresh_stale": "미리 보기가 만료되었거나 연결이 변경되었습니다. 모델을 다시 새로 고치세요.",
"add_provider": "프로바이더 추가", "add_provider": "프로바이더 추가",
"sync_providers": "프로바이더 동기화",
"sync_providers_checking": "업데이트 확인 중...",
"sync_providers_dialog_title": "프로바이더 및 모델 동기화",
"sync_providers_dialog_description": "추가할 새 프로바이더와 모델을 선택하세요. 기존 프로바이더, 사용자 지정 엔드포인트, API 키, 모델 설정은 삭제되거나 변경되지 않습니다.",
"sync_providers_up_to_date": "모든 프로바이더와 모델이 최신 상태입니다.",
"sync_providers_select_all": "모두 선택",
"sync_providers_deselect_all": "모두 선택 해제",
"sync_providers_expand_all": "모두 펼치기",
"sync_providers_collapse_all": "모두 접기",
"sync_providers_search_placeholder": "새 프로바이더 또는 모델 필터...",
"sync_providers_new_provider": "새 프로바이더",
"sync_providers_existing_provider": "기존 프로바이더",
"sync_providers_new_models_count": "새 모델 {count}개",
"sync_providers_selected_count": "프로바이더 {providerCount}개에서 모델 {modelCount}개 선택됨",
"sync_providers_reasoning": "추론",
"sync_providers_context_window": "컨텍스트 {count}k",
"sync_providers_add_selected": "선택 항목 추가({count})",
"sync_providers_adding": "추가 중...",
"sync_providers_success": "프로바이더 {providerCount}개에 모델 {modelCount}개를 추가했습니다.",
"search_providers_placeholder": "프로바이더 검색...", "search_providers_placeholder": "프로바이더 검색...",
"no_providers_found": "프로바이더를 찾을 수 없습니다", "no_providers_found": "프로바이더를 찾을 수 없습니다",
"built_in": "기본 제공", "built_in": "기본 제공",
+20 -20
View File
@@ -459,27 +459,27 @@
"ai": "AI", "ai": "AI",
"providers": "提供商", "providers": "提供商",
"providers_description": "为此团队配置 AI 提供商及其模型。", "providers_description": "为此团队配置 AI 提供商及其模型。",
"configured_ai_providers": "已配置的 AI 提供商", "provider_configured_badge": "已配置",
"provider_options": "{name} 的选项",
"provider_refresh_models": "刷新模型",
"provider_refresh_action": "刷新 {name} 的模型",
"provider_refresh_loading": "正在刷新…",
"provider_refresh_legacy_kimi_connection": "Kimi 的公开目录使用 Chat Completions。你仍然可以为此 Anthropic Messages 连接手动添加模型。",
"provider_refresh_azure_deployment_required": "设置 Azure 端点和已部署模型的 ID 映射后,即可刷新模型。",
"provider_refresh_catalog_unavailable": "Pi 未发布此提供商的模型目录。",
"provider_refresh_unsupported_connection": "此端点或 API 不支持刷新模型。",
"provider_refresh_failed": "无法刷新模型,请重试。",
"provider_refresh_no_new_models": "{name} 暂无新模型。",
"provider_refresh_dialog_title": "{name} 的新模型",
"provider_refresh_dialog_description": "请选择要添加的模型。",
"provider_refresh_select_visible": "选中当前结果",
"provider_refresh_deselect_visible": "取消选中当前结果",
"provider_refresh_add_selected": "添加所选模型",
"provider_refresh_add_selection": "添加所选模型({count} 个)",
"provider_refresh_imported": "已向 {name} 添加 {count} 个模型。",
"provider_refresh_import_failed": "无法添加所选模型,请重试。",
"provider_refresh_stale": "预览已过期或连接已更改,请重新刷新模型。",
"add_provider": "添加提供商", "add_provider": "添加提供商",
"sync_providers": "同步提供商",
"sync_providers_checking": "正在检查更新...",
"sync_providers_dialog_title": "同步提供商与模型",
"sync_providers_dialog_description": "选择您希望添加的新提供商和模型。现有的提供商、自定义端点、API 密钥和模型配置绝不会被删除或修改。",
"sync_providers_up_to_date": "所有提供商和模型均已是最新状态。",
"sync_providers_select_all": "全选",
"sync_providers_deselect_all": "取消全选",
"sync_providers_expand_all": "全部展开",
"sync_providers_collapse_all": "全部折叠",
"sync_providers_search_placeholder": "筛选新提供商或模型...",
"sync_providers_new_provider": "新提供商",
"sync_providers_existing_provider": "现有提供商",
"sync_providers_new_models_count": "{count} 个新模型",
"sync_providers_selected_count": "已选 {modelCount} 个模型,分布在 {providerCount} 个提供商中",
"sync_providers_reasoning": "深度思考",
"sync_providers_context_window": "{count}k 上下文",
"sync_providers_add_selected": "添加所选 ({count})",
"sync_providers_adding": "正在添加...",
"sync_providers_success": "已成功添加 {providerCount} 个提供商中的 {modelCount} 个模型。",
"search_providers_placeholder": "搜索提供商...", "search_providers_placeholder": "搜索提供商...",
"no_providers_found": "未找到提供商", "no_providers_found": "未找到提供商",
"built_in": "内置", "built_in": "内置",
+2 -2
View File
@@ -10,8 +10,8 @@
"@dnd-kit/abstract": "0.5.0", "@dnd-kit/abstract": "0.5.0",
"@dnd-kit/dom": "0.5.0", "@dnd-kit/dom": "0.5.0",
"@dnd-kit/react": "0.5.0", "@dnd-kit/react": "0.5.0",
"@earendil-works/pi-ai": "1.5.0", "@earendil-works/pi-ai": "1.7.0",
"@earendil-works/pi-durable": "1.5.0", "@earendil-works/pi-durable": "1.7.0",
"@ferrucc-io/emoji-picker": "0.1.2", "@ferrucc-io/emoji-picker": "0.1.2",
"@hookform/resolvers": "5.9.1", "@hookform/resolvers": "5.9.1",
"@lexical/code": "0.49.0", "@lexical/code": "0.49.0",
@@ -533,7 +533,12 @@ export function TeamSettingsPage() {
<div className="h-full bg-background font-sans selection:bg-primary/20 transition-colors duration-300"> <div className="h-full bg-background font-sans selection:bg-primary/20 transition-colors duration-300">
<div className="flex flex-col md:flex-row h-full"> <div className="flex flex-col md:flex-row h-full">
{/* Sidebar */} {/* Sidebar */}
<div className="w-full h-full md:w-72 bg-sidebar border-b md:border-b-0 md:border-r border-sidebar-border z-10 md:left-16 overflow-y-auto transition-colors duration-300"> <div
className={cn(
'w-full h-full md:w-72 bg-sidebar border-b md:border-b-0 md:border-r border-sidebar-border z-10 md:left-16 overflow-y-auto transition-colors duration-300',
activeTab === 'providers' && 'max-h-[28dvh] shrink-0 md:max-h-none',
)}
>
<nav className="p-4 space-y-1 mt-4"> <nav className="p-4 space-y-1 mt-4">
{/* Personal Settings */} {/* Personal Settings */}
<div className="mb-2 px-4 text-xs font-semibold text-sidebar-foreground/60 uppercase tracking-wider"> <div className="mb-2 px-4 text-xs font-semibold text-sidebar-foreground/60 uppercase tracking-wider">
@@ -801,8 +806,13 @@ export function TeamSettingsPage() {
</div> </div>
{/* Main Content Area */} {/* Main Content Area */}
<main className="flex-1 bg-background/50 h-full flex flex-col transition-colors duration-300 overflow-y-hidden"> <main className="flex-1 min-h-0 min-w-0 bg-background/50 h-full flex flex-col transition-colors duration-300 overflow-y-hidden">
<div className="flex-1 flex flex-col max-w-4xl w-full mx-auto p-6 md:p-10 overflow-hidden"> <div
className={cn(
'flex-1 flex flex-col max-w-4xl w-full mx-auto p-6 md:p-10 overflow-hidden',
activeTab === 'providers' && 'p-4 md:p-10',
)}
>
<div className="flex-none flex items-center justify-between mb-6"> <div className="flex-none flex items-center justify-between mb-6">
<div> <div>
<h2 className="text-2xl font-bold text-foreground"> <h2 className="text-2xl font-bold text-foreground">