mirror of
https://github.com/lobehub/lobehub.git
synced 2026-09-20 04:56:13 +08:00
f6ba7c15c6
* ⚡️ perf(model-bank): keep the aiModels catalog off the boot path The model-bank root barrel re-exports the whole aiModels catalog (1.4 MB raw), and a handful of value imports on the boot path (search config, reasoning params, image/video defaults, provider enum) dragged it into the first screen. Boot-path and route code now import the subpaths, the package declares sideEffects: false and exposes ./utils and ./knowledgeCutoff, and an eslint rule forbids value imports of the root barrel across src. Also reach @lobechat/model-runtime/errors/specs and @lobechat/utils/client/apiKeyManager directly so services/chat stops pulling the error pattern tables and dompurify. Web production build: first-screen gzip 2299 KB -> 2154 KB. Claude-Session: https://claude.ai/code/session_01QKr8CsFLYmrgqbRTSipTNH * 🐛 fix(lint): carry the model-bank ban through every scoped override Flat config replaces no-restricted-imports per file instead of merging, so a separate src/** block was dropped by the boot-path and feature overrides. The ban now lives in performanceRestrictedImportPaths, which every createRestrictedImportRule call includes; tests keep the base restrictions only. Claude-Session: https://claude.ai/code/session_01QKr8CsFLYmrgqbRTSipTNH * ✅ test(upload): assert rejected store actions without act() Wrapping a rejecting store action in act() and asserting with rejects let the callback run again after the spies were restored, which sent a real checkFileHash request and surfaced as an unhandled rejection in the shard. Store actions do not render, so the assertion awaits them directly. Claude-Session: https://claude.ai/code/session_01QKr8CsFLYmrgqbRTSipTNH
61 lines
2.1 KiB
JSON
61 lines
2.1 KiB
JSON
{
|
|
"name": "@lobechat/model-runtime",
|
|
"version": "1.0.0",
|
|
"private": true,
|
|
"exports": {
|
|
".": "./src/index.ts",
|
|
"./errors": "./src/errors/index.ts",
|
|
"./errors/specs": "./src/errors/specs.ts",
|
|
"./getModelPropertyWithFallback": "./src/utils/getFallbackModelProperty.ts",
|
|
"./helpers/parseToolCalls": "./src/helpers/parseToolCalls.ts",
|
|
"./providers/anthropic/modelId": "./src/providers/anthropic/modelId.ts",
|
|
"./providers/openai/modelId": "./src/providers/openai/modelId.ts",
|
|
"./resolveImageSinglePrice": "./src/core/usageConverters/utils/resolveImageSinglePrice.ts",
|
|
"./resolveVideoSinglePrice": "./src/core/usageConverters/utils/resolveVideoSinglePrice.ts",
|
|
"./types/error": "./src/types/error.ts",
|
|
"./utils/createError": "./src/utils/createError.ts",
|
|
"./utils/modelExtendParams": "./src/utils/modelExtendParams.ts",
|
|
"./utils/uriParser": "./src/utils/uriParser.ts",
|
|
"./vertexai": "./src/providers/vertexai/index.ts"
|
|
},
|
|
"scripts": {
|
|
"test": "vitest",
|
|
"test:coverage": "vitest --coverage --silent='passed-only'",
|
|
"test:update": "vitest -u"
|
|
},
|
|
"dependencies": {
|
|
"@anthropic-ai/sdk": "^0.73.0",
|
|
"@aws-sdk/client-bedrock-runtime": "^3.1076.0",
|
|
"@azure-rest/ai-inference": "1.0.0-beta.5",
|
|
"@azure/core-auth": "^1.10.1",
|
|
"@fal-ai/client": "^1.10.1",
|
|
"@google/genai": "^1.52.0",
|
|
"@huggingface/inference": "^4.13.21",
|
|
"@lobechat/business-model-bank": "workspace:*",
|
|
"@lobechat/business-model-runtime": "workspace:*",
|
|
"@lobechat/const": "workspace:*",
|
|
"@lobechat/ssrf-safe-fetch": "workspace:*",
|
|
"@lobechat/utils": "workspace:*",
|
|
"async-retry": "^1.3.3",
|
|
"dayjs": "^1.11.21",
|
|
"debug": "^4.4.3",
|
|
"immer": "^10.2.0",
|
|
"langfuse": "^3.38.20",
|
|
"langfuse-core": "^3.38.20",
|
|
"model-bank": "workspace:*",
|
|
"nanoid": "^5.1.16",
|
|
"ollama": "^0.6.3",
|
|
"openai": "^6.45.0",
|
|
"replicate": "^1.4.0",
|
|
"tokenx": "^1.3.0",
|
|
"type-fest": "^5.7.0",
|
|
"url-join": "^5.0.0"
|
|
},
|
|
"devDependencies": {
|
|
"@lobechat/types": "workspace:*"
|
|
},
|
|
"peerDependencies": {
|
|
"zod": "^4.4.3"
|
|
}
|
|
}
|