Skip to content

Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.

⬆️ Move content moderation from gpt-4.1 to gpt-6-luna (#3537)

Luke Vella60a54deb5a8f
diff --git a/apps/web/package.json b/apps/web/package.json
index ce5748fab..35a8a359b 100644
--- a/apps/web/package.json
+++ b/apps/web/package.json
@@ -19,7 +19,7 @@
"better-auth:generate": "pnpx @better-auth/cli@latest generate --config ./src/lib/auth.ts --output ../../packages/database/prisma/models/user.prisma"
},
"dependencies": {
- "@ai-sdk/openai": "^3.0.29",
+ "@ai-sdk/openai": "^3.0.128",
"@aws-sdk/client-s3": "^3.645.0",
"@aws-sdk/s3-request-presigner": "^3.645.0",
"@casl/ability": "^6.7.3",
@@ -58,7 +58,7 @@
"@upstash/ratelimit": "^1.2.1",
"@upstash/redis": "^1.36.2",
"@vercel/functions": "^3.3.6",
- "ai": "^6.0.87",
+ "ai": "^6.0.307",
"better-auth": "1.6.30",
"calendar-link": "^2.6.0",
"class-variance-authority": "^0.7.1",
diff --git a/apps/web/src/features/moderation/mutations.ts b/apps/web/src/features/moderation/mutations.ts
index c0955c649..34a13d7d7 100644
--- a/apps/web/src/features/moderation/mutations.ts
+++ b/apps/web/src/features/moderation/mutations.ts
@@ -30,12 +30,10 @@ const AI_REQUEST_TIMEOUT_MS = 30_000;
async function moderateContentWithAI(text: string): Promise<ModerationResult> {
try {
const result = await generateText({
- model: openai("gpt-4.1"),
+ model: openai("gpt-6-luna"),
+ providerOptions: { openai: { reasoningEffort: "none" } },
abortSignal: AbortSignal.timeout(AI_REQUEST_TIMEOUT_MS),
- messages: [
- {
- role: "system",
- content: `You are a content moderator for a scheduling and polling application. Users create polls about any topic — finding meeting times, making group decisions, voting on proposals, etc. Content may be in any language.
+ system: `You are a content moderator for a scheduling and polling application. Users create polls about any topic — finding meeting times, making group decisions, voting on proposals, etc. Content may be in any language.
Respond with one of two verdicts:
- FLAGGED: Content is clearly abusive and harmful to the platform. Use this for:
@@ -55,9 +53,7 @@ When in doubt, choose SAFE.
Respond in exactly this format:
VERDICT
Brief explanation of why this verdict was chosen.`,
- },
- { role: "user", content: text },
- ],
+ messages: [{ role: "user", content: text }],
});
const lines = result.text.trim().split("\n");
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 3a6cc5894..dc1d9bd76 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -97,7 +97,7 @@ importers:
version: 8.1.0([email protected])
'@vercel/analytics':
specifier: ^1.5.0
dayjs:
specifier: ^1.11.13
version: 1.11.19
@@ -136,7 +136,7 @@ importers:
version: 6.0.0(@types/[email protected])([email protected])
next-seo:
specifier: ^6.1.0
pg:
specifier: ^8.17.1
version: 8.18.0
@@ -187,8 +187,8 @@ importers:
apps/web:
dependencies:
'@ai-sdk/openai':
- specifier: ^3.0.29
- version: 3.0.29([email protected])
+ specifier: ^3.0.128
+ version: 3.0.128([email protected])
'@aws-sdk/client-s3':
specifier: ^3.645.0
version: 3.984.0
@@ -304,8 +304,8 @@ importers:
specifier: ^3.3.6
version: 3.4.1(@aws-sdk/[email protected])
ai:
- specifier: ^6.0.87
- version: 6.0.87([email protected])
+ specifier: ^6.0.307
+ version: 6.0.307([email protected])
better-auth:
specifier: 1.6.30
@@ -905,26 +905,26 @@ packages:
resolution: {integrity: sha512-Elp+iwUx5rN5+Y8xLt5/GRoG20WGoDCQ/1Fb+1LiGtvwbDavuSk0jhD/eZdckHAuzcDzccnkv+rEjyWfRx18gg==}
- '@ai-sdk/[email protected]':
- resolution: {integrity: sha512-gGsUF42TKjnnKpyHNpk/J6Hw1HCg0XqfRS9QSeZ2nn+ccy+CUXIbnuIpeBMrGCHUOAiZCy5Ei/H9BW9VgV+vKg==}
+ '@ai-sdk/[email protected]':
+ resolution: {integrity: sha512-QOw3arKUe+bu2InKAD/GwG+QYjvdKFO0CtF0ai5op5naFmIE/eaMwmevwpjPuHZNjuk1G3o7ozjihRZs8KsdCg==}
engines: {node: '>=18'}
peerDependencies:
zod: ^3.25.76 || ^4.1.8
- '@ai-sdk/[email protected]':
- resolution: {integrity: sha512-ugVTIVpuSLKTjzSPe1F1DWiblJT/lwrrHx0OZEKjpMk/EYP6j6VD/F7SJqM1dsqOJryeBCJWFbUzLNqc99PrMA==}
+ '@ai-sdk/[email protected]':
+ resolution: {integrity: sha512-q6xHyoMLph8GqwmFyMHpJnesl3vkfZCklinS0hSCJg+DOoPbUsZW6h3anc73efSOxsgvYxE72CuQ1pw+YpPC5Q==}
engines: {node: '>=18'}
peerDependencies:
zod: ^3.25.76 || ^4.1.8
- '@ai-sdk/[email protected]':
- resolution: {integrity: sha512-8XiKWbemmCbvNN0CLR9u3PQiet4gtEVIrX4zzLxnCj06AwsEDJwJVBbKrEI4t6qE8XRSIvU2irka0dcpziKW6w==}
- engines: {node: '>=18'}
+ '@ai-sdk/[email protected]':
+ resolution: {integrity: sha512-HR51CwEHIaGKUTUCLpfVDvajk1C8CGd34ezi34vOeUyxbchBDIKGVNJZRNvILuvHDS8nOvxYUJ9NZvzp0UufUg==}
+ engines: {node: '>=18.17'}
peerDependencies:
zod: ^3.25.76 || ^4.1.8
- '@ai-sdk/[email protected]':
- resolution: {integrity: sha512-oGMAgGoQdBXbZqNG0Ze56CHjDZ1IDYOwGYxYjO5KLSlz5HiNQ9udIXsPZ61VWaHGZ5XW/jyjmr6t2xz2jGVwbQ==}
+ '@ai-sdk/[email protected]':
+ resolution: {integrity: sha512-IpefF5ssZVOZCD4Wu7zxt6PwZoGT2HLVjxpJ10Bjx6EAmRfLYJPjyrfxb0RYDlwvXnDb9nkQ7Do/oJVDuRFzew==}
engines: {node: '>=18'}
'@alcalzone/[email protected]':
@@ -6935,6 +6935,10 @@ packages:
resolution: {integrity: sha512-Fw28YZpRnA3cAHHDlkt7xQHiJ0fcL+NRcIqsocZQUSmbzeIKRpwttJjik5ZGanXP+vlA4SbTg+AbA3bP363l+w==}
engines: {node: '>= 20'}
+ '@vercel/[email protected]':
+ resolution: {integrity: sha512-UycprH3T6n3jH0k44NHMa7pnFHGu/N05MjojYr+Mc6I7obkoLIJujSWwin1pCvdy/eOxrI/l3uDLQsmcrOb4ug==}
+ engines: {node: '>= 20'}
+
'@vitejs/[email protected]':
resolution: {integrity: sha512-NVUnA6gQCl8jfoYqKqQU5Clv0aPw14KkZYCsX6T9Lfu9slI0LOU10OTwFHS/WmptsMMpshNd/1tuWsHQ2Uk+cg==}
engines: {node: ^20.19.0 || >=22.12.0}
@@ -7091,8 +7095,8 @@ packages:
resolution: {integrity: sha512-0poP0T7el6Vq3rstR8Mn4V/IQrpBLO6POkUSrN7RhyY+GF/InCFShQzsQ39T25gkHhLgSLByyAz+Kjb+c2L98w==}
engines: {node: '>=12'}
- resolution: {integrity: sha512-EHq2y9s1OGgN705mPJIII8qaL43Ko7rMUjMHiCWIpG8esnjBNvymlrcFLnwzPRnMD6OAC6PrRZyiD5nZwX3qFw==}
+ resolution: {integrity: sha512-jVheHvKkeldXBjFtbnM/n9gL8fcZlhQH9OiV9oT+Wj98tIRjskl33sG3d5K2Q/WJX6jlvlOjIH2+wEKetgpd6w==}
engines: {node: '>=18'}
peerDependencies:
zod: ^3.25.76 || ^4.1.8
@@ -8424,6 +8428,10 @@ packages:
resolution: {integrity: sha512-Vo1ab+QXPzZ4tCa8SwIHJFaSzy4R6SHf7BY79rFBDf0idraZWAkYrDjDj8uWaSm3S2TK+hJ7/t1CEmZ7jXw+pg==}
engines: {node: '>=18.0.0'}
+ resolution: {integrity: sha512-EKN1vKAMcZ8MlYMpaNuxN6R9yakzH6uajHcHVTqWJzvu5pWw9DyhbP35HH8MVBQ+dZjAfDxk+A8NiR9KWaXiyQ==}
+ engines: {node: '>=18.0.0'}
+
resolution: {integrity: sha512-CRT1WTyuQoD771GW56XEZFQ/ZoSfWid1alKGDYMmkt2yl8UXrVR4pspqWNEcqKvVIzg6PAltWjxcSSPrboA4iA==}
engines: {node: '>=18.0.0'}
@@ -12257,6 +12265,10 @@ packages:
resolution: {integrity: sha512-j375ScV60dom+YkPFIfTLcOiPxkN/buHz5GobjLhixFuANaNs3C9l4GmrWqejgXWJ7BbJcFYpTEUkS1Ge8bpZQ==}
+ resolution: {integrity: sha512-R+RODBqp6i2pPflGdq+xIOUkl+RNfGgHwoinecKu/JCuf2uO06cOKoDbI2P7Dn6KcswdKwrczbU6IYJ6K8X+wg==}
+ engines: {node: '>=18.17'}
+
resolution: {integrity: sha512-RYONW2MeafgYlkVOKYKkA/Ag7BmXqgIWCa8t1m0JcxrQg9pI9lEqRhAOruOBCbAohOa/gkCF+iPi9hrgvTzu6Q==}
engines: {node: '>=20.18.1'}
@@ -12831,27 +12843,28 @@ snapshots:
'@adobe/[email protected]': {}
dependencies:
- '@ai-sdk/provider': 3.0.8
- '@ai-sdk/provider-utils': 4.0.15([email protected])
- '@vercel/oidc': 3.1.0
+ '@ai-sdk/provider': 3.0.18
+ '@ai-sdk/provider-utils': 4.0.59([email protected])
+ '@vercel/oidc': 3.2.0
zod: 4.3.6
dependencies:
- '@ai-sdk/provider': 3.0.8
- '@ai-sdk/provider-utils': 4.0.15([email protected])
+ '@ai-sdk/provider': 3.0.18
+ '@ai-sdk/provider-utils': 4.0.59([email protected])
zod: 4.3.6
dependencies:
- '@ai-sdk/provider': 3.0.8
+ '@ai-sdk/provider': 3.0.18
'@standard-schema/spec': 1.1.0
- eventsource-parser: 3.0.6
+ eventsource-parser: 3.1.1
+ undici: 6.29.0
zod: 4.3.6
- '@ai-sdk/[email protected]':
+ '@ai-sdk/[email protected]':
dependencies:
json-schema: 0.4.0
@@ -20022,9 +20035,9 @@ snapshots:
dependencies:
uncrypto: 0.1.3
optionalDependencies:
react: 19.2.6
@@ -20035,6 +20048,8 @@ snapshots:
'@vercel/[email protected]': {}
+ '@vercel/[email protected]': {}
+
dependencies:
'@babel/core': 7.29.0
@@ -20252,11 +20267,11 @@ snapshots:
clean-stack: 4.2.0
indent-string: 5.0.0
dependencies:
- '@ai-sdk/gateway': 3.0.47([email protected])
- '@ai-sdk/provider': 3.0.8
- '@ai-sdk/provider-utils': 4.0.15([email protected])
+ '@ai-sdk/gateway': 3.0.215([email protected])
+ '@ai-sdk/provider': 3.0.18
+ '@ai-sdk/provider-utils': 4.0.59([email protected])
'@opentelemetry/api': 1.9.0
zod: 4.3.6
@@ -21687,7 +21702,10 @@ snapshots:
+ optional: true
+
dependencies:
@@ -24116,9 +24134,9 @@ snapshots:
react: 19.2.6
react-dom: 19.2.6([email protected])
dependencies:
react: 19.2.6
react-dom: 19.2.6([email protected])
@@ -24154,6 +24172,33 @@ snapshots:
- '@types/node'
- babel-plugin-macros
+ dependencies:
+ '@next/env': 16.3.8
+ '@swc/helpers': 0.5.23
+ baseline-browser-mapping: 2.11.26
+ caniuse-lite: 1.0.30001813
+ postcss: 8.5.23
+ react: 19.2.6
+ react-dom: 19.2.6([email protected])
+ styled-jsx: 5.1.6(@babel/[email protected])([email protected])
+ optionalDependencies:
+ '@next/swc-darwin-arm64': 16.3.8
+ '@next/swc-darwin-x64': 16.3.8
+ '@next/swc-linux-arm64-gnu': 16.3.8
+ '@next/swc-linux-arm64-musl': 16.3.8
+ '@next/swc-linux-x64-gnu': 16.3.8
+ '@next/swc-linux-x64-musl': 16.3.8
+ '@next/swc-win32-arm64-msvc': 16.3.8
+ '@next/swc-win32-x64-msvc': 16.3.8
+ '@opentelemetry/api': 1.9.0
+ '@playwright/test': 1.58.1
+ sharp: 0.35.5(@types/[email protected])
+ transitivePeerDependencies:
+ - '@babel/core'
+ - '@types/node'
+ - babel-plugin-macros
+
dependencies:
'@next/env': 16.3.8
@@ -26780,6 +26825,8 @@ snapshots:
+