diff --git a/api/package.json b/api/package.json index f5aa7c157..ccaa749df 100644 --- a/api/package.json +++ b/api/package.json @@ -11,14 +11,15 @@ "author": "", "license": "ISC", "dependencies": { - "@ai-sdk/openai": "^0.0.45", + "@ai-sdk/anthropic": "^1.1.6", + "@ai-sdk/openai": "^1.1.9", "@notionhq/client": "^0.4.13", "@octokit/core": "^4.2.0", "@sendgrid/mail": "^7.4.6", "@supabase/supabase-js": "^2.31.0", "@upstash/ratelimit": "^1.1.3", "@vercel/kv": "^1.0.1", - "ai": "^3.3.6", + "ai": "^4.1.21", "ajv": "^8.12.0", "axios": "^0.27.2", "csv-parse": "^5.3.6", diff --git a/api/prompt/_shared.ts b/api/prompt/_shared.ts index a2f1f0b38..d60a558ae 100644 --- a/api/prompt/_shared.ts +++ b/api/prompt/_shared.ts @@ -3,7 +3,7 @@ import { streamText } from "ai"; import { stripe } from "../_lib/_stripe"; import { kv } from "@vercel/kv"; import { Ratelimit } from "@upstash/ratelimit"; -import { createOpenAI, type openai as OpenAI } from "@ai-sdk/openai"; +import { createAnthropic } from "@ai-sdk/anthropic"; export const reqSchema = z.object({ prompt: z.string().min(1), @@ -94,18 +94,18 @@ export async function processRequest( req: Request, systemMessage: string, content: string, - model: Parameters[0] = "gpt-4-turbo" + model = "claude-3-5-sonnet-latest" ) { const { isPro, customerId } = await checkUserStatus(req); const rateLimitResponse = await handleRateLimit(req, isPro, customerId); if (rateLimitResponse) return rateLimitResponse; - const openai = createOpenAI({ - apiKey: getOpenAiApiKey(isPro), + const anthropic = createAnthropic({ + apiKey: getAnthropicApiKey(isPro), }); const result = await streamText({ - model: openai.chat(model), + model: anthropic(model), system: systemMessage, temperature: 1, messages: [ @@ -124,12 +124,12 @@ export async function processRequest( * so we can track usage. Bear in mind a development key is used for * anything that's not production. */ -function getOpenAiApiKey(isPro: boolean) { +function getAnthropicApiKey(isPro: boolean) { if (isPro) { - return process.env.OPENAI_API_KEY_PRO; + return process.env.ANTHROPIC_API_KEY_PRO; } - return process.env.OPENAI_API_KEY_FREE; + return process.env.ANTHROPIC_API_KEY_FREE; } function getIp(req: Request) { diff --git a/api/prompt/choose-template.ts b/api/prompt/choose-template.ts index fed81074c..f3fc68fee 100644 --- a/api/prompt/choose-template.ts +++ b/api/prompt/choose-template.ts @@ -1,7 +1,7 @@ import { z } from "zod"; import { templateRateLimit } from "./_shared"; import { generateObject } from "ai"; -import { openai } from "@ai-sdk/openai"; +import { createAnthropic } from "@ai-sdk/anthropic"; import { templates } from "shared"; const schema = z.object({ @@ -28,8 +28,16 @@ export default async function handler(req: Request) { return new Response(JSON.stringify(parsed.error), { status: 400 }); } + if (!process.env.ANTHROPIC_API_KEY_FREE) { + throw new Error("No Anthropic API key provided"); + } + + const anthropic = createAnthropic({ + apiKey: process.env.ANTHROPIC_API_KEY_FREE, + }); + const result = await generateObject({ - model: openai("gpt-3.5-turbo"), + model: anthropic("claude-3-5-sonnet-latest"), schema, prompt: getContent(parsed.data.prompt), system: systemMessage, diff --git a/app/package.json b/app/package.json index 2f640b3ef..32fe3c29c 100644 --- a/app/package.json +++ b/app/package.json @@ -29,7 +29,8 @@ "screenshot-templates": "node scripts/screenshot-templates.mjs" }, "dependencies": { - "@ai-sdk/openai": "^0.0.37", + "@ai-sdk/anthropic": "^1.1.6", + "@ai-sdk/openai": "^1.1.9", "@formkit/auto-animate": "1.0.0-beta.6", "@lingui/core": "^3.8.9", "@lingui/react": "^3.8.9", @@ -61,7 +62,7 @@ "@svgr/webpack": "^6.3.1", "@tone-row/slang": "^1.2.35", "@tone-row/strip-comments": "^2.0.1", - "ai": "^3.2.32", + "ai": "^4.1.21", "buffer": "^6.0.3", "classnames": "^2.3.2", "construct-style-sheets-polyfill": "^3.1.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 800486020..2a50a42f9 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -20,9 +20,12 @@ importers: api: dependencies: + '@ai-sdk/anthropic': + specifier: ^1.1.6 + version: 1.1.6(zod@3.24.1) '@ai-sdk/openai': - specifier: ^0.0.45 - version: 0.0.45(zod@3.24.1) + specifier: ^1.1.9 + version: 1.1.9(zod@3.24.1) '@notionhq/client': specifier: ^0.4.13 version: 0.4.13 @@ -42,8 +45,8 @@ importers: specifier: ^1.0.1 version: 1.0.1 ai: - specifier: ^3.3.6 - version: 3.4.33(openai@4.80.1(ws@8.18.0)(zod@3.24.1))(react@18.3.1)(sswr@2.1.0(svelte@5.19.4))(svelte@5.19.4)(vue@3.5.13(typescript@5.5.3))(zod@3.24.1) + specifier: ^4.1.21 + version: 4.1.21(react@18.3.1)(zod@3.24.1) ajv: specifier: ^8.12.0 version: 8.17.1 @@ -129,9 +132,12 @@ importers: app: dependencies: + '@ai-sdk/anthropic': + specifier: ^1.1.6 + version: 1.1.6(zod@3.24.1) '@ai-sdk/openai': - specifier: ^0.0.37 - version: 0.0.37(zod@3.24.1) + specifier: ^1.1.9 + version: 1.1.9(zod@3.24.1) '@formkit/auto-animate': specifier: 1.0.0-beta.6 version: 1.0.0-beta.6 @@ -226,8 +232,8 @@ importers: specifier: ^2.0.1 version: 2.0.6 ai: - specifier: ^3.2.32 - version: 3.4.33(openai@3.3.0)(react@18.3.1)(sswr@2.1.0(svelte@5.19.4))(svelte@5.19.4)(vue@3.5.13(typescript@5.5.3))(zod@3.24.1) + specifier: ^4.1.21 + version: 4.1.21(react@18.3.1)(zod@3.24.1) buffer: specifier: ^6.0.3 version: 6.0.3 @@ -643,20 +649,20 @@ packages: '@adobe/css-tools@4.4.1': resolution: {integrity: sha512-12WGKBQzjUAI4ayyF4IAtfw2QR/IDoqk6jTddXDhtYTJF9ASmoE1zst7cVtP0aL/F1jUJL5r+JxKXKEgHNbEUQ==} - '@ai-sdk/openai@0.0.37': - resolution: {integrity: sha512-OBhnvptzOEn+jy75vySnhbH5ezidn4WI/yftc0C1MiWkS/m4CmRV9P5zFGKHOgC1vxtw6691gASGYpQbof/JoQ==} + '@ai-sdk/anthropic@1.1.6': + resolution: {integrity: sha512-4TZBg2VoU/F58DmnyfPPGU9wMUTwLP15XyAFSrUqk9sSdjszwcojXw3LE7YbxifZ+RK7wT7lTkuyK1k2UdfFng==} engines: {node: '>=18'} peerDependencies: zod: ^3.0.0 - '@ai-sdk/openai@0.0.45': - resolution: {integrity: sha512-+ywipfosdChbbAYxZDtqcTCUWiujNodML8AwMEBJJuIcffOpH9NjNYNFxctC7qf3xlKVcTezaIuHVYDFXVsa+Q==} + '@ai-sdk/openai@1.1.9': + resolution: {integrity: sha512-t/CpC4TLipdbgBJTMX/otzzqzCMBSPQwUOkYPGbT/jyuC86F+YO9o+LS0Ty2pGUE1kyT+B3WmJ318B16ZCg4hw==} engines: {node: '>=18'} peerDependencies: zod: ^3.0.0 - '@ai-sdk/provider-utils@1.0.10': - resolution: {integrity: sha512-xciXF2PorLQMNdhYe+n9CafVkXZANHURsME85RXjtAoZSs631l2t8Blqwz2C/pHUb9bxLdMRRuIEB4PnHLnHvQ==} + '@ai-sdk/provider-utils@2.1.6': + resolution: {integrity: sha512-Pfyaj0QZS22qyVn5Iz7IXcJ8nKIKlu2MeSAdKJzTwkAks7zdLaKVB+396Rqcp1bfQnxl7vaduQVMQiXUrgK8Gw==} engines: {node: '>=18'} peerDependencies: zod: ^3.0.0 @@ -664,38 +670,12 @@ packages: zod: optional: true - '@ai-sdk/provider-utils@1.0.2': - resolution: {integrity: sha512-57f6O4OFVNEpI8Z8o+K40tIB3YQiTw+VCql/qrAO9Utq7Ti1o6+X9tvm177DlZJL7ft0Rwzvgy48S9YhrEKgmA==} - engines: {node: '>=18'} - peerDependencies: - zod: ^3.0.0 - peerDependenciesMeta: - zod: - optional: true - - '@ai-sdk/provider-utils@1.0.22': - resolution: {integrity: sha512-YHK2rpj++wnLVc9vPGzGFP3Pjeld2MwhKinetA0zKXOoHAT/Jit5O8kZsxcSlJPu9wvcGT1UGZEjZrtO7PfFOQ==} - engines: {node: '>=18'} - peerDependencies: - zod: ^3.0.0 - peerDependenciesMeta: - zod: - optional: true - - '@ai-sdk/provider@0.0.12': - resolution: {integrity: sha512-oOwPQD8i2Ynpn22cur4sk26FW3mSy6t6/X/K1Ay2yGBKYiSpRyLfObhOrZEGsXDx+3euKy4nEZ193R36NM+tpQ==} + '@ai-sdk/provider@1.0.7': + resolution: {integrity: sha512-q1PJEZ0qD9rVR+8JFEd01/QM++csMT5UVwYXSN2u54BrVw/D8TZLTeg2FEfKK00DgAx0UtWd8XOhhwITP9BT5g==} engines: {node: '>=18'} - '@ai-sdk/provider@0.0.18': - resolution: {integrity: sha512-LF4aUAKDTKIHa2e7ozwRJDMhUC9cs7t224sUilG1HfyFWyyh+01oPZwMob/hj111SozZkvXIukN0BIa+sXS0mw==} - engines: {node: '>=18'} - - '@ai-sdk/provider@0.0.26': - resolution: {integrity: sha512-dQkfBDs2lTYpKM8389oopPdQgIU007GQyCbuPPrV+K6MtSII3HBfE0stUIMXUb44L+LK1t6GXPP7wjSzjO6uKg==} - engines: {node: '>=18'} - - '@ai-sdk/react@0.0.70': - resolution: {integrity: sha512-GnwbtjW4/4z7MleLiW+TOZC2M29eCg1tOUpuEiYFMmFNZK8mkrqM0PFZMo6UsYeUYMWqEOOcPOU9OQVJMJh7IQ==} + '@ai-sdk/react@1.1.10': + resolution: {integrity: sha512-RTkEVYKq7qO6Ct3XdVTgbaCTyjX+q1HLqb+t2YvZigimzMCQbHkpZCtt2H2Fgpt1UOTqnAAlXjEAgTW3X60Y9g==} engines: {node: '>=18'} peerDependencies: react: ^18 || ^19 || ^19.0.0-rc @@ -706,26 +686,8 @@ packages: zod: optional: true - '@ai-sdk/solid@0.0.54': - resolution: {integrity: sha512-96KWTVK+opdFeRubqrgaJXoNiDP89gNxFRWUp0PJOotZW816AbhUf4EnDjBjXTLjXL1n0h8tGSE9sZsRkj9wQQ==} - engines: {node: '>=18'} - peerDependencies: - solid-js: ^1.7.7 - peerDependenciesMeta: - solid-js: - optional: true - - '@ai-sdk/svelte@0.0.57': - resolution: {integrity: sha512-SyF9ItIR9ALP9yDNAD+2/5Vl1IT6kchgyDH8xkmhysfJI6WrvJbtO1wdQ0nylvPLcsPoYu+cAlz1krU4lFHcYw==} - engines: {node: '>=18'} - peerDependencies: - svelte: ^3.0.0 || ^4.0.0 || ^5.0.0 - peerDependenciesMeta: - svelte: - optional: true - - '@ai-sdk/ui-utils@0.0.50': - resolution: {integrity: sha512-Z5QYJVW+5XpSaJ4jYCCAVG7zIAuKOOdikhgpksneNmKvx61ACFaf98pmOd+xnjahl0pIlc/QIe6O4yVaJ1sEaw==} + '@ai-sdk/ui-utils@1.1.10': + resolution: {integrity: sha512-x+A1Nfy8RTSatdCe+7nRpHAZVzPFB6H+r+2JKoapSvrwsu9mw2pAbmFgV8Zaj94TsmUdTlO0/j97e63f+yYuWg==} engines: {node: '>=18'} peerDependencies: zod: ^3.0.0 @@ -733,15 +695,6 @@ packages: zod: optional: true - '@ai-sdk/vue@0.0.59': - resolution: {integrity: sha512-+ofYlnqdc8c4F6tM0IKF0+7NagZRAiqBJpGDJ+6EYhDW8FHLUP/JFBgu32SjxSxC6IKFZxEnl68ZoP/Z38EMlw==} - engines: {node: '>=18'} - peerDependencies: - vue: ^3.3.4 - peerDependenciesMeta: - vue: - optional: true - '@alloc/quick-lru@5.2.0': resolution: {integrity: sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==} engines: {node: '>=10'} @@ -4450,35 +4403,6 @@ packages: '@vitest/utils@0.34.6': resolution: {integrity: sha512-IG5aDD8S6zlvloDsnzHw0Ut5xczlF+kv2BOTo+iXfPr54Yhi5qbVOgGB1hZaVq4iJ4C/MZ2J0y15IlsV/ZcI0A==} - '@vue/compiler-core@3.5.13': - resolution: {integrity: sha512-oOdAkwqUfW1WqpwSYJce06wvt6HljgY3fGeM9NcVA1HaYOij3mZG9Rkysn0OHuyUAGMbEbARIpsG+LPVlBJ5/Q==} - - '@vue/compiler-dom@3.5.13': - resolution: {integrity: sha512-ZOJ46sMOKUjO3e94wPdCzQ6P1Lx/vhp2RSvfaab88Ajexs0AHeV0uasYhi99WPaogmBlRHNRuly8xV75cNTMDA==} - - '@vue/compiler-sfc@3.5.13': - resolution: {integrity: sha512-6VdaljMpD82w6c2749Zhf5T9u5uLBWKnVue6XWxprDobftnletJ8+oel7sexFfM3qIxNmVE7LSFGTpv6obNyaQ==} - - '@vue/compiler-ssr@3.5.13': - resolution: {integrity: sha512-wMH6vrYHxQl/IybKJagqbquvxpWCuVYpoUJfCqFZwa/JY1GdATAQ+TgVtgrwwMZ0D07QhA99rs/EAAWfvG6KpA==} - - '@vue/reactivity@3.5.13': - resolution: {integrity: sha512-NaCwtw8o48B9I6L1zl2p41OHo/2Z4wqYGGIK1Khu5T7yxrn+ATOixn/Udn2m+6kZKB/J7cuT9DbWWhRxqixACg==} - - '@vue/runtime-core@3.5.13': - resolution: {integrity: sha512-Fj4YRQ3Az0WTZw1sFe+QDb0aXCerigEpw418pw1HBUKFtnQHWzwojaukAs2X/c9DQz4MQ4bsXTGlcpGxU/RCIw==} - - '@vue/runtime-dom@3.5.13': - resolution: {integrity: sha512-dLaj94s93NYLqjLiyFzVs9X6dWhTdAlEAciC3Moq7gzAc13VJUdCnjjRurNM6uTLFATRHexHCTu/Xp3eW6yoog==} - - '@vue/server-renderer@3.5.13': - resolution: {integrity: sha512-wAi4IRJV/2SAW3htkTlB+dHeRmpTiVIK1OGLWV1yeStVSebSQQOwGwIq0D3ZIoBj2C2qpgz5+vX9iEBkTdk5YA==} - peerDependencies: - vue: 3.5.13 - - '@vue/shared@3.5.13': - resolution: {integrity: sha512-/hnE/qP5ZoGpol0a5mDi45bOd7t3tjYJBjsgCsivow7D48cJeV5l05RD82lPqi7gRiphZM37rnhW1l6ZoCNNnQ==} - '@webassemblyjs/ast@1.14.1': resolution: {integrity: sha512-nuBEDgQfm1ccRp/8bCQrx1frohyufl4JlbMMZ4P1wpeOfDhF6FQkxZJ1b/e+PLwr6X1Nhw6OLme5usuBWYBvuQ==} @@ -4560,11 +4484,6 @@ packages: peerDependencies: acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 - acorn-typescript@1.4.13: - resolution: {integrity: sha512-xsc9Xv0xlVfwp2o7sQ+GCQ1PgbkdcpWdTzrwXxO3xDMTAywVS3oXVOcOHuRjAPkS4P9b+yc/qNF15460v+jp4Q==} - peerDependencies: - acorn: '>=8.9.0' - acorn-walk@7.2.0: resolution: {integrity: sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==} engines: {node: '>=0.4.0'} @@ -4603,24 +4522,15 @@ packages: resolution: {integrity: sha512-kja8j7PjmncONqaTsB8fQ+wE2mSU2DJ9D4XKoJ5PFWIdRMa6SLSN1ff4mOr4jCbfRSsxR4keIiySJU0N9T5hIQ==} engines: {node: '>= 8.0.0'} - ai@3.4.33: - resolution: {integrity: sha512-plBlrVZKwPoRTmM8+D1sJac9Bq8eaa2jiZlHLZIWekKWI1yMWYZvCCEezY9ASPwRhULYDJB2VhKOBUUeg3S5JQ==} + ai@4.1.21: + resolution: {integrity: sha512-w1v3T/fisoD1qRFz7CS7nE7mggeaxEpkEvWvVUWRem9lERgwh670OPhMPUSrdzTtCjMkOTrNkaecKoYAwvqM/A==} engines: {node: '>=18'} peerDependencies: - openai: ^4.42.0 react: ^18 || ^19 || ^19.0.0-rc - sswr: ^2.1.0 - svelte: ^3.0.0 || ^4.0.0 || ^5.0.0 zod: ^3.0.0 peerDependenciesMeta: - openai: - optional: true react: optional: true - sswr: - optional: true - svelte: - optional: true zod: optional: true @@ -5206,10 +5116,6 @@ packages: resolution: {integrity: sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg==} engines: {node: '>=6'} - clsx@2.1.1: - resolution: {integrity: sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==} - engines: {node: '>=6'} - cmd-shim@7.0.0: resolution: {integrity: sha512-rtpaCbr164TPPh+zFdkWpCyZuKkjpAzODfaZCf/SVJZzJN+4bHQb/LP3Jzq5/+84um3XXY8r548XiWKSborwVw==} engines: {node: ^18.17.0 || >=20.5.0} @@ -6326,9 +6232,6 @@ packages: deprecated: This version is no longer supported. Please see https://eslint.org/version-support for other options. hasBin: true - esm-env@1.2.2: - resolution: {integrity: sha512-Epxrv+Nr/CaL4ZcFGPJIYLWFom+YeV1DqMLHJoEd9SYRxNbaFruBwfEX/kkHUJf55j2+TUbmDcmuilbP1TmXHA==} - espree@9.6.1: resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -6347,9 +6250,6 @@ packages: resolution: {integrity: sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==} engines: {node: '>=0.10'} - esrap@1.4.3: - resolution: {integrity: sha512-Xddc1RsoFJ4z9nR7W7BFaEPIp4UXoeQ0+077UdWLxbafMQFyU79sQJMk7kxNgRwQ9/aVgaKacCHC2pUACGwmYw==} - esrecurse@4.3.0: resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==} engines: {node: '>=4.0'} @@ -6393,9 +6293,9 @@ packages: resolution: {integrity: sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==} engines: {node: '>=0.8.x'} - eventsource-parser@1.1.2: - resolution: {integrity: sha512-v0eOBUbiaFojBu2s2NPBfYUoRR9GjcDNvCXVaqEf5vVfpIAh9f8RCo4vXTP8c63QRKCFwoLpMpTdPwwhEKVgzA==} - engines: {node: '>=14.18'} + eventsource-parser@3.0.0: + resolution: {integrity: sha512-T1C0XCUimhxVQzW4zFipdx0SficT651NnkR0ZSH3yQwh+mFMdLfgjABVi4YtMTtaL4s168593DaoaRLMqryavA==} + engines: {node: '>=18.0.0'} execa@5.1.1: resolution: {integrity: sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==} @@ -7210,9 +7110,6 @@ packages: is-reference@1.2.1: resolution: {integrity: sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==} - is-reference@3.0.3: - resolution: {integrity: sha512-ixkJoqQvAP88E6wLydLGGqCJsrFUnqoH6HnaczB8XmDH1oaWU+xxdptvikTgaEhtZ53Ky6YXiBuUI2WXLMCwjw==} - is-regex@1.2.1: resolution: {integrity: sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g==} engines: {node: '>= 0.4'} @@ -7894,9 +7791,6 @@ packages: localforage@1.10.0: resolution: {integrity: sha512-14/H1aX7hzBBmmh7sGPd+AOMkkIrHM3Z1PAyGgZigA1H1p5O5ANnMyWzvpAETtG68/dC4pC0ncy3+PPGzXZHPg==} - locate-character@3.0.0: - resolution: {integrity: sha512-SW13ws7BjaeJ6p7Q6CO2nchbYEc3X3J6WrmTTDto7yMPqVSZTUyY5Tjbid+Ab8gLnATtygYtiDIJGQRRn2ZOiA==} - locate-path@3.0.0: resolution: {integrity: sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==} engines: {node: '>=6'} @@ -8209,11 +8103,6 @@ packages: nano-time@1.0.0: resolution: {integrity: sha512-flnngywOoQ0lLQOTRNexn2gGSNuM9bKj9RZAWSzhQ+UJYaAFG9bac4DW9VHjUAzrOaIcajHybCTHe/bkvozQqA==} - nanoid@3.3.6: - resolution: {integrity: sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==} - engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} - hasBin: true - nanoid@3.3.8: resolution: {integrity: sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} @@ -9960,11 +9849,6 @@ packages: resolution: {integrity: sha512-wvLeHgcVHKO8Sc/H/5lkGreJQVeYMm9rlmt8PuR1xE31rIuXhuzznUUqAt8MqLhB3MqJdFzlNAfpcWnxiFUcPw==} engines: {node: '>=12'} - sswr@2.1.0: - resolution: {integrity: sha512-Cqc355SYlTAaUt8iDPaC/4DPPXK925PePLMxyBKuWd5kKc5mwsG3nT9+Mq2tyguL5s7b4Jg+IRMpTRsNTAfpSQ==} - peerDependencies: - svelte: ^4.0.0 || ^5.0.0-next.0 - stable@0.1.8: resolution: {integrity: sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w==} deprecated: 'Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility' @@ -10173,10 +10057,6 @@ packages: resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} engines: {node: '>= 0.4'} - svelte@5.19.4: - resolution: {integrity: sha512-pzWvFQdvfEfT4Ll/JriAtcG7qmWjcL+x/NSl9Q+FPje5SXukYNp9kcufZ27ydauLLE/dwYMz9XRC8kiwTZmfDA==} - engines: {node: '>=18'} - svg-parser@2.0.4: resolution: {integrity: sha512-e4hG1hRwoOdRb37cIMSgzNsxyzKfayW6VOflrwvR+/bzrkyxY/31WkbgnQpgtrNp1SdpJvpUAGTa/ZoiPNDuRQ==} @@ -10196,14 +10076,6 @@ packages: peerDependencies: react: ^16.11.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 - swrev@4.0.0: - resolution: {integrity: sha512-LqVcOHSB4cPGgitD1riJ1Hh4vdmITOp+BkmfmXRh4hSF/t7EnS4iD+SOTmq7w5pPm/SiPeto4ADbKS6dHUDWFA==} - - swrv@1.1.0: - resolution: {integrity: sha512-pjllRDr2s0iTwiE5Isvip51dZGR7GjLH1gCSVyE8bQnbAx6xackXsFdojau+1O5u98yHF5V73HQGOFxKUXO9gQ==} - peerDependencies: - vue: '>=3.2.26 < 4' - symbol-tree@3.2.4: resolution: {integrity: sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==} @@ -10710,14 +10582,6 @@ packages: webdriverio: optional: true - vue@3.5.13: - resolution: {integrity: sha512-wmeiSMxkZCSc+PM2w2VRsOYAZC8GdipNFRTsLSfodVqI9mbejKeXEGr8SckuLnrQPGe3oJN5c3K0vpoU9q/wCQ==} - peerDependencies: - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - w3c-hr-time@1.0.2: resolution: {integrity: sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ==} deprecated: Use your platform's native performance.now() and performance.timeOrigin. @@ -11075,9 +10939,6 @@ packages: resolution: {integrity: sha512-b4JR1PFR10y1mKjhHY9LaGo6tmrgjit7hxVIeAmyMw3jegXR4dhYqLaQF5zMXZxY7tLpMyJeLjr1C4rLmkVe8g==} engines: {node: '>=12.20'} - zimmerframe@1.1.2: - resolution: {integrity: sha512-rAbqEGa8ovJy4pyBxZM70hg4pE6gDgaQ0Sl9M3enG3I0d6H4XSAM3GeNGLKnsBpuijUow064sf7ww1nutC5/3w==} - zod-to-json-schema@3.24.1: resolution: {integrity: sha512-3h08nf3Vw3Wl3PK+q3ow/lIil81IT2Oa7YpQyUUDsEWbXveMesdfK1xBd2RhCkynwZndAxixji/7SYJJowr62w==} peerDependencies: @@ -11105,104 +10966,49 @@ snapshots: '@adobe/css-tools@4.4.1': {} - '@ai-sdk/openai@0.0.37(zod@3.24.1)': + '@ai-sdk/anthropic@1.1.6(zod@3.24.1)': dependencies: - '@ai-sdk/provider': 0.0.12 - '@ai-sdk/provider-utils': 1.0.2(zod@3.24.1) + '@ai-sdk/provider': 1.0.7 + '@ai-sdk/provider-utils': 2.1.6(zod@3.24.1) zod: 3.24.1 - '@ai-sdk/openai@0.0.45(zod@3.24.1)': + '@ai-sdk/openai@1.1.9(zod@3.24.1)': dependencies: - '@ai-sdk/provider': 0.0.18 - '@ai-sdk/provider-utils': 1.0.10(zod@3.24.1) + '@ai-sdk/provider': 1.0.7 + '@ai-sdk/provider-utils': 2.1.6(zod@3.24.1) zod: 3.24.1 - '@ai-sdk/provider-utils@1.0.10(zod@3.24.1)': + '@ai-sdk/provider-utils@2.1.6(zod@3.24.1)': dependencies: - '@ai-sdk/provider': 0.0.18 - eventsource-parser: 1.1.2 - nanoid: 3.3.6 - secure-json-parse: 2.7.0 - optionalDependencies: - zod: 3.24.1 - - '@ai-sdk/provider-utils@1.0.2(zod@3.24.1)': - dependencies: - '@ai-sdk/provider': 0.0.12 - eventsource-parser: 1.1.2 - nanoid: 3.3.6 - secure-json-parse: 2.7.0 - optionalDependencies: - zod: 3.24.1 - - '@ai-sdk/provider-utils@1.0.22(zod@3.24.1)': - dependencies: - '@ai-sdk/provider': 0.0.26 - eventsource-parser: 1.1.2 + '@ai-sdk/provider': 1.0.7 + eventsource-parser: 3.0.0 nanoid: 3.3.8 secure-json-parse: 2.7.0 optionalDependencies: zod: 3.24.1 - '@ai-sdk/provider@0.0.12': - dependencies: - json-schema: 0.4.0 - - '@ai-sdk/provider@0.0.18': - dependencies: - json-schema: 0.4.0 - - '@ai-sdk/provider@0.0.26': + '@ai-sdk/provider@1.0.7': dependencies: json-schema: 0.4.0 - '@ai-sdk/react@0.0.70(react@18.3.1)(zod@3.24.1)': + '@ai-sdk/react@1.1.10(react@18.3.1)(zod@3.24.1)': dependencies: - '@ai-sdk/provider-utils': 1.0.22(zod@3.24.1) - '@ai-sdk/ui-utils': 0.0.50(zod@3.24.1) + '@ai-sdk/provider-utils': 2.1.6(zod@3.24.1) + '@ai-sdk/ui-utils': 1.1.10(zod@3.24.1) swr: 2.3.0(react@18.3.1) throttleit: 2.1.0 optionalDependencies: react: 18.3.1 zod: 3.24.1 - '@ai-sdk/solid@0.0.54(zod@3.24.1)': - dependencies: - '@ai-sdk/provider-utils': 1.0.22(zod@3.24.1) - '@ai-sdk/ui-utils': 0.0.50(zod@3.24.1) - transitivePeerDependencies: - - zod - - '@ai-sdk/svelte@0.0.57(svelte@5.19.4)(zod@3.24.1)': + '@ai-sdk/ui-utils@1.1.10(zod@3.24.1)': dependencies: - '@ai-sdk/provider-utils': 1.0.22(zod@3.24.1) - '@ai-sdk/ui-utils': 0.0.50(zod@3.24.1) - sswr: 2.1.0(svelte@5.19.4) - optionalDependencies: - svelte: 5.19.4 - transitivePeerDependencies: - - zod - - '@ai-sdk/ui-utils@0.0.50(zod@3.24.1)': - dependencies: - '@ai-sdk/provider': 0.0.26 - '@ai-sdk/provider-utils': 1.0.22(zod@3.24.1) - json-schema: 0.4.0 - secure-json-parse: 2.7.0 + '@ai-sdk/provider': 1.0.7 + '@ai-sdk/provider-utils': 2.1.6(zod@3.24.1) zod-to-json-schema: 3.24.1(zod@3.24.1) optionalDependencies: zod: 3.24.1 - '@ai-sdk/vue@0.0.59(vue@3.5.13(typescript@5.5.3))(zod@3.24.1)': - dependencies: - '@ai-sdk/provider-utils': 1.0.22(zod@3.24.1) - '@ai-sdk/ui-utils': 0.0.50(zod@3.24.1) - swrv: 1.1.0(vue@3.5.13(typescript@5.5.3)) - optionalDependencies: - vue: 3.5.13(typescript@5.5.3) - transitivePeerDependencies: - - zod - '@alloc/quick-lru@5.2.0': {} '@ampproject/remapping@2.3.0': @@ -15672,60 +15478,6 @@ snapshots: loupe: 2.3.7 pretty-format: 29.7.0 - '@vue/compiler-core@3.5.13': - dependencies: - '@babel/parser': 7.26.7 - '@vue/shared': 3.5.13 - entities: 4.5.0 - estree-walker: 2.0.2 - source-map-js: 1.2.1 - - '@vue/compiler-dom@3.5.13': - dependencies: - '@vue/compiler-core': 3.5.13 - '@vue/shared': 3.5.13 - - '@vue/compiler-sfc@3.5.13': - dependencies: - '@babel/parser': 7.26.7 - '@vue/compiler-core': 3.5.13 - '@vue/compiler-dom': 3.5.13 - '@vue/compiler-ssr': 3.5.13 - '@vue/shared': 3.5.13 - estree-walker: 2.0.2 - magic-string: 0.30.17 - postcss: 8.5.1 - source-map-js: 1.2.1 - - '@vue/compiler-ssr@3.5.13': - dependencies: - '@vue/compiler-dom': 3.5.13 - '@vue/shared': 3.5.13 - - '@vue/reactivity@3.5.13': - dependencies: - '@vue/shared': 3.5.13 - - '@vue/runtime-core@3.5.13': - dependencies: - '@vue/reactivity': 3.5.13 - '@vue/shared': 3.5.13 - - '@vue/runtime-dom@3.5.13': - dependencies: - '@vue/reactivity': 3.5.13 - '@vue/runtime-core': 3.5.13 - '@vue/shared': 3.5.13 - csstype: 3.1.3 - - '@vue/server-renderer@3.5.13(vue@3.5.13(typescript@5.5.3))': - dependencies: - '@vue/compiler-ssr': 3.5.13 - '@vue/shared': 3.5.13 - vue: 3.5.13(typescript@5.5.3) - - '@vue/shared@3.5.13': {} - '@webassemblyjs/ast@1.14.1': dependencies: '@webassemblyjs/helper-numbers': 1.13.2 @@ -15836,10 +15588,6 @@ snapshots: dependencies: acorn: 8.14.0 - acorn-typescript@1.4.13(acorn@8.14.0): - dependencies: - acorn: 8.14.0 - acorn-walk@7.2.0: {} acorn-walk@8.3.4: @@ -15869,55 +15617,17 @@ snapshots: dependencies: humanize-ms: 1.2.1 - ai@3.4.33(openai@3.3.0)(react@18.3.1)(sswr@2.1.0(svelte@5.19.4))(svelte@5.19.4)(vue@3.5.13(typescript@5.5.3))(zod@3.24.1): + ai@4.1.21(react@18.3.1)(zod@3.24.1): dependencies: - '@ai-sdk/provider': 0.0.26 - '@ai-sdk/provider-utils': 1.0.22(zod@3.24.1) - '@ai-sdk/react': 0.0.70(react@18.3.1)(zod@3.24.1) - '@ai-sdk/solid': 0.0.54(zod@3.24.1) - '@ai-sdk/svelte': 0.0.57(svelte@5.19.4)(zod@3.24.1) - '@ai-sdk/ui-utils': 0.0.50(zod@3.24.1) - '@ai-sdk/vue': 0.0.59(vue@3.5.13(typescript@5.5.3))(zod@3.24.1) + '@ai-sdk/provider': 1.0.7 + '@ai-sdk/provider-utils': 2.1.6(zod@3.24.1) + '@ai-sdk/react': 1.1.10(react@18.3.1)(zod@3.24.1) + '@ai-sdk/ui-utils': 1.1.10(zod@3.24.1) '@opentelemetry/api': 1.9.0 - eventsource-parser: 1.1.2 - json-schema: 0.4.0 - jsondiffpatch: 0.6.0 - secure-json-parse: 2.7.0 - zod-to-json-schema: 3.24.1(zod@3.24.1) - optionalDependencies: - openai: 3.3.0 - react: 18.3.1 - sswr: 2.1.0(svelte@5.19.4) - svelte: 5.19.4 - zod: 3.24.1 - transitivePeerDependencies: - - solid-js - - vue - - ai@3.4.33(openai@4.80.1(ws@8.18.0)(zod@3.24.1))(react@18.3.1)(sswr@2.1.0(svelte@5.19.4))(svelte@5.19.4)(vue@3.5.13(typescript@5.5.3))(zod@3.24.1): - dependencies: - '@ai-sdk/provider': 0.0.26 - '@ai-sdk/provider-utils': 1.0.22(zod@3.24.1) - '@ai-sdk/react': 0.0.70(react@18.3.1)(zod@3.24.1) - '@ai-sdk/solid': 0.0.54(zod@3.24.1) - '@ai-sdk/svelte': 0.0.57(svelte@5.19.4)(zod@3.24.1) - '@ai-sdk/ui-utils': 0.0.50(zod@3.24.1) - '@ai-sdk/vue': 0.0.59(vue@3.5.13(typescript@5.5.3))(zod@3.24.1) - '@opentelemetry/api': 1.9.0 - eventsource-parser: 1.1.2 - json-schema: 0.4.0 jsondiffpatch: 0.6.0 - secure-json-parse: 2.7.0 - zod-to-json-schema: 3.24.1(zod@3.24.1) optionalDependencies: - openai: 4.80.1(ws@8.18.0)(zod@3.24.1) react: 18.3.1 - sswr: 2.1.0(svelte@5.19.4) - svelte: 5.19.4 zod: 3.24.1 - transitivePeerDependencies: - - solid-js - - vue ajv-formats@2.1.1(ajv@8.17.1): optionalDependencies: @@ -16614,8 +16324,6 @@ snapshots: clsx@1.2.1: {} - clsx@2.1.1: {} - cmd-shim@7.0.0: {} co@4.6.0: {} @@ -17893,8 +17601,6 @@ snapshots: transitivePeerDependencies: - supports-color - esm-env@1.2.2: {} - espree@9.6.1: dependencies: acorn: 8.14.0 @@ -17909,10 +17615,6 @@ snapshots: dependencies: estraverse: 5.3.0 - esrap@1.4.3: - dependencies: - '@jridgewell/sourcemap-codec': 1.5.0 - esrecurse@4.3.0: dependencies: estraverse: 5.3.0 @@ -17939,7 +17641,7 @@ snapshots: events@3.3.0: {} - eventsource-parser@1.1.2: {} + eventsource-parser@3.0.0: {} execa@5.1.1: dependencies: @@ -18831,10 +18533,6 @@ snapshots: dependencies: '@types/estree': 1.0.6 - is-reference@3.0.3: - dependencies: - '@types/estree': 1.0.6 - is-regex@1.2.1: dependencies: call-bound: 1.0.3 @@ -19996,8 +19694,6 @@ snapshots: dependencies: lie: 3.1.1 - locate-character@3.0.0: {} - locate-path@3.0.0: dependencies: p-locate: 3.0.0 @@ -20355,8 +20051,6 @@ snapshots: dependencies: big-integer: 1.6.52 - nanoid@3.3.6: {} - nanoid@3.3.8: {} natural-compare-lite@1.4.0: {} @@ -22267,11 +21961,6 @@ snapshots: srcset@4.0.0: {} - sswr@2.1.0(svelte@5.19.4): - dependencies: - svelte: 5.19.4 - swrev: 4.0.0 - stable@0.1.8: {} stack-utils@2.0.6: @@ -22495,23 +22184,6 @@ snapshots: supports-preserve-symlinks-flag@1.0.0: {} - svelte@5.19.4: - dependencies: - '@ampproject/remapping': 2.3.0 - '@jridgewell/sourcemap-codec': 1.5.0 - '@types/estree': 1.0.6 - acorn: 8.14.0 - acorn-typescript: 1.4.13(acorn@8.14.0) - aria-query: 5.3.2 - axobject-query: 4.1.0 - clsx: 2.1.1 - esm-env: 1.2.2 - esrap: 1.4.3 - is-reference: 3.0.3 - locate-character: 3.0.0 - magic-string: 0.30.17 - zimmerframe: 1.1.2 - svg-parser@2.0.4: {} svgo@1.3.2: @@ -22546,12 +22218,6 @@ snapshots: react: 18.3.1 use-sync-external-store: 1.4.0(react@18.3.1) - swrev@4.0.0: {} - - swrv@1.1.0(vue@3.5.13(typescript@5.5.3)): - dependencies: - vue: 3.5.13(typescript@5.5.3) - symbol-tree@3.2.4: {} tailwindcss@3.4.17(ts-node@10.9.2(@swc/core@1.10.11(@swc/helpers@0.5.15))(@types/node@18.19.74)(typescript@5.5.3)): @@ -23064,16 +22730,6 @@ snapshots: - supports-color - terser - vue@3.5.13(typescript@5.5.3): - dependencies: - '@vue/compiler-dom': 3.5.13 - '@vue/compiler-sfc': 3.5.13 - '@vue/runtime-dom': 3.5.13 - '@vue/server-renderer': 3.5.13(vue@3.5.13(typescript@5.5.3)) - '@vue/shared': 3.5.13 - optionalDependencies: - typescript: 5.5.3 - w3c-hr-time@1.0.2: dependencies: browser-process-hrtime: 1.0.0 @@ -23543,8 +23199,6 @@ snapshots: yocto-queue@1.1.1: {} - zimmerframe@1.1.2: {} - zod-to-json-schema@3.24.1(zod@3.24.1): dependencies: zod: 3.24.1