## Summary: I found a bug: 404 call when I use third-party providers (I used deepseek). I found the final request url is: `https://api.deepseek.com/v1/responses' `if we use createOpenAI. But the correct one should be `https://api.provider.com/v1/chat/completions` for the thirty provider. So I replace createOpenAI with createOpenAICompatible in the openai-compatible provider path. **Reproduction**: Add DeepSeek as a new AI provider (deepseek-chat, deepseek-reasoner) Also check the source code in Open Code project, they also use createOpenAICompatible for the @ai-sdk/openai-compatible scenario <img width="703" height="369" alt="image" src="https://github.com/user-attachments/assets/90c4f924-6f1a-4fe7-821b-f13ee86a7a39" /> official docs: https://ai-sdk.dev/providers/openai-compatible-providers https://ai-sdk.dev/providers/ai-sdk-providers/openai <img width="860" height="293" alt="image" src="https://github.com/user-attachments/assets/283b9b91-f1d6-4b1c-bb91-16ddccdff8b4" /> ## Before <img width="473" height="750" alt="deepseek before" src="https://github.com/user-attachments/assets/f6b89294-1fa7-4ddc-a6a8-d396070caaca" /> ## After <img width="468" height="753" alt="deepseek after" src="https://github.com/user-attachments/assets/0d170b70-e829-4a4c-abad-38879427c2df" /> ## Backend error log ```json [1] [Nest] 50907 - 07/04/2026, 23:48:57 LOG [ChatExecutionService] Starting chat execution with model deepseek/deepseek-chat, 4 active tools [1] APICallError [AI_APICallError]: Not Found [1] at /Users/abel/Documents/Code/twenty/node_modules/@ai-sdk/provider-utils/dist/index.js:2512:14 [1] at process.processTicksAndRejections (node:internal/process/task_queues:105:5) [1] at async postToApi (/Users/abel/Documents/Code/twenty/node_modules/@ai-sdk/provider-utils/dist/index.js:2373:28) [1] at async OpenAIResponsesLanguageModel.doStream (/Users/abel/Documents/Code/twenty/node_modules/@ai-sdk/openai/dist/index.js:4925:50) [1] at async fn (/Users/abel/Documents/Code/twenty/node_modules/ai/dist/index.js:7106:27) [1] at async /Users/abel/Documents/Code/twenty/node_modules/ai/dist/index.js:2340:24 [1] at async _retryWithExponentialBackoff (/Users/abel/Documents/Code/twenty/node_modules/ai/dist/index.js:2599:12) [1] at async streamStep (/Users/abel/Documents/Code/twenty/node_modules/ai/dist/index.js:7063:17) [1] at async fn (/Users/abel/Documents/Code/twenty/node_modules/ai/dist/index.js:7455:9) [1] at async /Users/abel/Documents/Code/twenty/node_modules/ai/dist/index.js:2340:24 { [1] cause: undefined, [1] url: 'https://api.deepseek.com/v1/responses', [1] requestBodyValues: { [1] model: 'deepseek-chat', [1] input: [ [Object], [Object] ], [1] temperature: undefined, [1] top_p: undefined, [1] max_output_tokens: undefined, [1] conversation: undefined, [1] max_tool_calls: undefined, [1] metadata: undefined, [1] parallel_tool_calls: undefined, [1] previous_response_id: undefined, [1] store: undefined, [1] user: undefined, [1] instructions: undefined, [1] service_tier: undefined, [1] include: undefined, [1] prompt_cache_key: undefined, [1] prompt_cache_retention: undefined, [1] safety_identifier: undefined, [1] top_logprobs: undefined, [1] truncation: undefined, [1] tools: [ [Object], [Object], [Object], [Object] ], [1] tool_choice: 'auto', [1] stream: true [1] }, [1] statusCode: 404, [1] responseHeaders: { [1] 'access-control-allow-credentials': 'true', [1] connection: 'keep-alive', [1] 'content-length': '0', [1] date: 'Tue, 07 Apr 2026 22:48:57 GMT', [1] server: 'elb', [1] 'strict-transport-security': 'max-age=31536000; includeSubDomains; preload', [1] vary: 'origin, access-control-request-method, access-control-request-headers', [1] via: '1.1 83867089cd39052cd05f9e04909bedde.cloudfront.net (CloudFront)', [1] 'x-amz-cf-id': 'O4b0VTi9Q1VVmTmq6czGlEWst7IPnAQl544hB7uIvfnSphBvUKbZTw==', [1] 'x-amz-cf-pop': 'DUB56-P3', [1] 'x-cache': 'Error from cloudfront', [1] 'x-content-type-options': 'nosniff', [1] 'x-ds-trace-id': 'a90e91809d285170338ef077f67ae2be' [1] }, [1] responseBody: '', [1] isRetryable: false, [1] data: undefined, [1] Symbol(vercel.ai.error): true, [1] Symbol(vercel.ai.error.AI_APICallError): true [1] } [1] Exception Captured [1] undefined [1] [ [1] NoOutputGeneratedError [AI_NoOutputGeneratedError]: No output generated. Check the stream for errors. [1] at Object.flush (/Users/abel/Documents/Code/twenty/node_modules/ai/dist/index.js:6656:103) [1] at invokePromiseCallback (node:internal/webstreams/util:172:10) [1] at Object.<anonymous> (node:internal/webstreams/util:177:23) [1] at transformStreamDefaultSinkCloseAlgorithm (node:internal/webstreams/transformstream:621:43) [1] at node:internal/webstreams/transformstream:379:11 [1] at writableStreamDefaultControllerProcessClose (node:internal/webstreams/writablestream:1162:28) [1] at writableStreamDefaultControllerAdvanceQueueIfNeeded (node:internal/webstreams/writablestream:1253:5) [1] at writableStreamDefaultControllerClose (node:internal/webstreams/writablestream:1220:3) [1] at writableStreamClose (node:internal/webstreams/writablestream:722:3) [1] at writableStreamDefaultWriterClose (node:internal/webstreams/writablestream:1091:10) { [1] cause: undefined, [1] Symbol(vercel.ai.error): true, [1] Symbol(vercel.ai.error.AI_NoOutputGeneratedError): true [1] } [1] ] [1] [Nest] 50907 - 07/04/2026, 23:48:59 LOG [BullMQDriver] Job 24 with name StreamAgentChatJob processed on queue ai-stream-queue in 2756.63ms
242 lines
8.0 KiB
JSON
242 lines
8.0 KiB
JSON
{
|
|
"name": "twenty-server",
|
|
"description": "",
|
|
"author": "",
|
|
"private": true,
|
|
"license": "AGPL-3.0",
|
|
"scripts": {
|
|
"nx": "NX_DEFAULT_PROJECT=twenty-server node ../../node_modules/nx/bin/nx.js",
|
|
"start:prod": "node dist/main",
|
|
"command:prod": "node dist/command/command",
|
|
"worker:prod": "node dist/queue-worker/queue-worker",
|
|
"database:init:prod": "node dist/database/scripts/setup-db.js && yarn database:migrate:prod --force",
|
|
"database:migrate:prod": "node dist/command/command run-instance-commands",
|
|
"clickhouse:migrate:prod": "node dist/database/clickHouse/migrations/run-migrations.js",
|
|
"typeorm": "../../node_modules/typeorm/.bin/typeorm"
|
|
},
|
|
"dependencies": {
|
|
"@ai-sdk/amazon-bedrock": "^3.0.83",
|
|
"@ai-sdk/anthropic": "^3.0.46",
|
|
"@ai-sdk/google": "^3.0.30",
|
|
"@ai-sdk/mistral": "^3.0.20",
|
|
"@ai-sdk/openai": "^3.0.30",
|
|
"@ai-sdk/openai-compatible": "^2.0.40",
|
|
"@ai-sdk/provider-utils": "^4.0.15",
|
|
"@ai-sdk/xai": "^3.0.57",
|
|
"@aws-sdk/client-lambda": "3.1001.0",
|
|
"@aws-sdk/client-s3": "3.1001.0",
|
|
"@aws-sdk/client-sesv2": "3.1001.0",
|
|
"@aws-sdk/client-sts": "3.1001.0",
|
|
"@aws-sdk/credential-providers": "3.1001.0",
|
|
"@aws-sdk/s3-request-presigner": "3.1001.0",
|
|
"@azure/msal-node": "^3.8.4",
|
|
"@babel/preset-env": "7.26.9",
|
|
"@blocknote/server-util": "^0.47.1",
|
|
"@clickhouse/client": "^1.18.1",
|
|
"@dagrejs/dagre": "^1.1.2",
|
|
"@e2b/code-interpreter": "^1.0.4",
|
|
"@envelop/core": "4.0.3",
|
|
"@envelop/on-resolve": "4.1.0",
|
|
"@esbuild-plugins/node-modules-polyfill": "^0.2.2",
|
|
"@faker-js/faker": "9.8.0",
|
|
"@file-type/pdf": "^0.2.0",
|
|
"@graphql-tools/schema": "10.0.4",
|
|
"@graphql-tools/utils": "9.2.1",
|
|
"@graphql-yoga/nestjs": "2.1.0",
|
|
"@jrmdayn/googleapis-batcher": "^0.10.1",
|
|
"@lingui/conf": "5.1.2",
|
|
"@lingui/core": "^5.1.2",
|
|
"@lingui/format-po": "5.1.2",
|
|
"@lingui/react": "5.1.2",
|
|
"@lingui/vite-plugin": "5.1.2",
|
|
"@microsoft/microsoft-graph-client": "3.0.7",
|
|
"@microsoft/microsoft-graph-types": "^2.40.0",
|
|
"@nestjs/axios": "3.1.2",
|
|
"@nestjs/cache-manager": "^2.3.0",
|
|
"@nestjs/common": "11.1.16",
|
|
"@nestjs/config": "3.3.0",
|
|
"@nestjs/core": "11.1.16",
|
|
"@nestjs/event-emitter": "2.1.0",
|
|
"@nestjs/graphql": "patch:@nestjs/[email protected]#./patches/@nestjs+graphql+12.1.1.patch",
|
|
"@nestjs/jwt": "11.0.1",
|
|
"@nestjs/passport": "11.0.5",
|
|
"@nestjs/platform-express": "11.1.16",
|
|
"@nestjs/schedule": "^6.0.1",
|
|
"@nestjs/serve-static": "5.0.4",
|
|
"@nestjs/terminus": "11.0.0",
|
|
"@nestjs/typeorm": "11.0.0",
|
|
"@node-saml/node-saml": "5.1.0",
|
|
"@node-saml/passport-saml": "^5.1.0",
|
|
"@opentelemetry/api": "^1.9.0",
|
|
"@opentelemetry/auto-instrumentations-node": "^0.60.0",
|
|
"@opentelemetry/exporter-metrics-otlp-http": "^0.200.0",
|
|
"@opentelemetry/exporter-prometheus": "^0.211.0",
|
|
"@opentelemetry/sdk-metrics": "^2.0.0",
|
|
"@opentelemetry/sdk-node": "^0.202.0",
|
|
"@ptc-org/nestjs-query-core": "4.4.0",
|
|
"@ptc-org/nestjs-query-graphql": "patch:@ptc-org/[email protected]#./patches/@ptc-org+nestjs-query-graphql+4.2.0.patch",
|
|
"@ptc-org/nestjs-query-typeorm": "4.2.1-alpha.2",
|
|
"@react-email/render": "^1.2.3",
|
|
"@sentry/nestjs": "^10.27.0",
|
|
"@sentry/node": "^10.27.0",
|
|
"@sentry/profiling-node": "^10.27.0",
|
|
"@sniptt/guards": "0.2.0",
|
|
"addressparser": "1.0.1",
|
|
"ai": "6.0.97",
|
|
"apollo-server-core": "3.13.0",
|
|
"archiver": "7.0.1",
|
|
"axios": "^1.13.5",
|
|
"axios-retry": "^4.5.0",
|
|
"babel-plugin-module-resolver": "5.0.2",
|
|
"bcrypt": "5.1.1",
|
|
"bullmq": "5.40.0",
|
|
"bytes": "3.1.2",
|
|
"cache-manager": "^5.4.0",
|
|
"cache-manager-redis-yet": "^4.1.2",
|
|
"chalk": "4.1.2",
|
|
"class-transformer": "0.5.1",
|
|
"class-validator": "0.14.0",
|
|
"class-validator-jsonschema": "^5.0.2",
|
|
"cloudflare": "^4.5.0",
|
|
"connect-redis": "^7.1.1",
|
|
"cron-parser": "5.1.1",
|
|
"dataloader": "2.2.2",
|
|
"date-fns": "2.30.0",
|
|
"deep-equal": "2.2.3",
|
|
"dompurify": "3.3.3",
|
|
"dotenv": "16.4.5",
|
|
"exa-js": "^2.11.0",
|
|
"express": "4.22.1",
|
|
"express-session": "^1.18.2",
|
|
"file-type": "^21.3.1",
|
|
"fuse.js": "^7.1.0",
|
|
"gaxios": "5.1.3",
|
|
"google-auth-library": "8.9.0",
|
|
"googleapis": "105.0.0",
|
|
"graphql": "16.8.1",
|
|
"graphql-fields": "2.0.3",
|
|
"graphql-middleware": "^6.1.35",
|
|
"graphql-redis-subscriptions": "2.7.0",
|
|
"graphql-scalars": "1.23.0",
|
|
"graphql-subscriptions": "2.0.0",
|
|
"graphql-tag": "2.12.6",
|
|
"graphql-type-json": "0.3.2",
|
|
"graphql-upload": "16.0.2",
|
|
"graphql-yoga": "4.0.5",
|
|
"html-to-text": "^9.0.5",
|
|
"imapflow": "1.2.1",
|
|
"ioredis": "5.6.0",
|
|
"jsdom": "^26.1.0",
|
|
"json-schema": "0.4.0",
|
|
"jsonwebtoken": "9.0.2",
|
|
"libphonenumber-js": "1.11.5",
|
|
"lodash.camelcase": "4.3.0",
|
|
"lodash.chunk": "4.2.0",
|
|
"lodash.compact": "3.0.1",
|
|
"lodash.differencewith": "^4.5.0",
|
|
"lodash.groupby": "4.6.0",
|
|
"lodash.isempty": "4.4.0",
|
|
"lodash.isequal": "4.5.0",
|
|
"lodash.isobject": "3.0.2",
|
|
"lodash.kebabcase": "4.1.1",
|
|
"lodash.merge": "^4.6.2",
|
|
"lodash.omit": "4.5.0",
|
|
"lodash.omitby": "^4.6.0",
|
|
"lodash.snakecase": "4.1.1",
|
|
"lodash.uniq": "^4.5.0",
|
|
"lodash.uniqby": "^4.7.0",
|
|
"lodash.upperfirst": "4.3.1",
|
|
"mailparser": "3.9.3",
|
|
"microdiff": "1.4.0",
|
|
"mrmime": "^2.0.1",
|
|
"ms": "2.1.3",
|
|
"nest-commander": "^3.19.1",
|
|
"node-ical": "^0.20.1",
|
|
"nodemailer": "^8.0.4",
|
|
"openapi-types": "12.1.3",
|
|
"openid-client": "^5.7.0",
|
|
"otplib": "^12.0.1",
|
|
"passport": "^0.7.0",
|
|
"passport-google-oauth20": "2.0.0",
|
|
"passport-jwt": "4.0.1",
|
|
"passport-microsoft": "2.1.0",
|
|
"path-to-regexp": "^8.2.0",
|
|
"pg": "8.12.0",
|
|
"planer": "1.2.0",
|
|
"pluralize": "8.0.0",
|
|
"postal-mime": "^2.6.1",
|
|
"psl": "^1.9.0",
|
|
"react": "18.3.1",
|
|
"react-dom": "18.3.1",
|
|
"redis": "^4.7.0",
|
|
"reflect-metadata": "0.2.2",
|
|
"rxjs": "7.8.1",
|
|
"semver": "7.6.3",
|
|
"sharp": "0.32.6",
|
|
"stripe": "19.3.1",
|
|
"tar": "^7.5.9",
|
|
"temporal-polyfill": "^0.3.0",
|
|
"transliteration": "2.3.5",
|
|
"tsconfig-paths": "^4.2.0",
|
|
"tsdav": "^2.1.5",
|
|
"tslib": "2.8.1",
|
|
"type-fest": "4.10.1",
|
|
"typeorm": "patch:[email protected]#./patches/typeorm+0.3.20.patch",
|
|
"unzipper": "^0.12.3",
|
|
"uuid": "9.0.1",
|
|
"vite-tsconfig-paths": "4.3.2",
|
|
"zod": "^4.1.11"
|
|
},
|
|
"devDependencies": {
|
|
"@faker-js/faker": "^9.8.0",
|
|
"@lingui/cli": "^5.1.2",
|
|
"@nestjs/cli": "^11.0.16",
|
|
"@nestjs/devtools-integration": "^0.2.1",
|
|
"@nestjs/schematics": "^11.0.9",
|
|
"@nestjs/testing": "11.1.16",
|
|
"@types/archiver": "^6.0.0",
|
|
"@types/babel__preset-env": "7.10.0",
|
|
"@types/bytes": "^3.1.1",
|
|
"@types/dompurify": "^3.0.5",
|
|
"@types/express": "^4.17.13",
|
|
"@types/express-session": "^1.18.0",
|
|
"@types/graphql-upload": "^16.0.7",
|
|
"@types/html-to-text": "^9.0.4",
|
|
"@types/lodash.chunk": "^4.2.9",
|
|
"@types/lodash.differencewith": "^4.5.9",
|
|
"@types/lodash.isempty": "^4.4.7",
|
|
"@types/lodash.isequal": "^4.5.8",
|
|
"@types/lodash.isobject": "^3.0.7",
|
|
"@types/lodash.merge": "^4.6.9",
|
|
"@types/lodash.omit": "^4.5.9",
|
|
"@types/lodash.omitby": "^4.6.9",
|
|
"@types/lodash.snakecase": "^4.1.7",
|
|
"@types/lodash.uniq": "^4.5.9",
|
|
"@types/lodash.uniqby": "^4.7.9",
|
|
"@types/lodash.upperfirst": "^4.3.7",
|
|
"@types/mailparser": "^3.4.6",
|
|
"@types/ms": "^0.7.31",
|
|
"@types/node": "^24.0.0",
|
|
"@types/nodemailer": "^7.0.3",
|
|
"@types/openid-client": "^3.7.0",
|
|
"@types/passport-google-oauth20": "^2.0.11",
|
|
"@types/passport-jwt": "^3.0.8",
|
|
"@types/passport-microsoft": "^2.1.0",
|
|
"@types/pluralize": "^0.0.33",
|
|
"@types/psl": "^1.1.3",
|
|
"@types/react": "^18.2.39",
|
|
"@types/tar": "^7.0.87",
|
|
"@types/unzipper": "^0",
|
|
"@yarnpkg/types": "^4.0.0",
|
|
"rimraf": "^5.0.5",
|
|
"twenty-client-sdk": "workspace:*",
|
|
"twenty-emails": "workspace:*",
|
|
"twenty-shared": "workspace:*"
|
|
},
|
|
"engines": {
|
|
"node": "^24.5.0",
|
|
"npm": "please-use-yarn",
|
|
"yarn": "^4.0.2"
|
|
}
|
|
}
|