Upgrades (#1419)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
3bc77653ad
commit
453f5bb3e6
94 changed files with 4029 additions and 8199 deletions
|
|
@ -1,4 +1,3 @@
|
|||
import { checkBotId } from "botid/server";
|
||||
import { geolocation, ipAddress } from "@vercel/functions";
|
||||
import {
|
||||
convertToModelMessages,
|
||||
|
|
@ -8,12 +7,13 @@ import {
|
|||
stepCountIs,
|
||||
streamText,
|
||||
} from "ai";
|
||||
import { checkBotId } from "botid/server";
|
||||
import { after } from "next/server";
|
||||
import { createResumableStreamContext } from "resumable-stream";
|
||||
import { auth, type UserType } from "@/app/(auth)/auth";
|
||||
import { entitlementsByUserType } from "@/lib/ai/entitlements";
|
||||
import { type RequestHints, systemPrompt } from "@/lib/ai/prompts";
|
||||
import { allowedModelIds } from "@/lib/ai/models";
|
||||
import { type RequestHints, systemPrompt } from "@/lib/ai/prompts";
|
||||
import { getLanguageModel } from "@/lib/ai/providers";
|
||||
import { createDocument } from "@/lib/ai/tools/create-document";
|
||||
import { getWeather } from "@/lib/ai/tools/get-weather";
|
||||
|
|
@ -185,7 +185,7 @@ export async function POST(request: Request) {
|
|||
});
|
||||
|
||||
dataStream.merge(
|
||||
result.toUIMessageStream({ sendReasoning: isReasoningModel }),
|
||||
result.toUIMessageStream({ sendReasoning: isReasoningModel })
|
||||
);
|
||||
|
||||
if (titlePromise) {
|
||||
|
|
@ -236,7 +236,7 @@ export async function POST(request: Request) {
|
|||
if (
|
||||
error instanceof Error &&
|
||||
error.message?.includes(
|
||||
"AI Gateway requires a valid credit card on file to service requests",
|
||||
"AI Gateway requires a valid credit card on file to service requests"
|
||||
)
|
||||
) {
|
||||
return "AI Gateway requires a valid credit card on file to service requests. Please visit https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai%3Fmodal%3Dadd-credit-card to add a card and unlock your free credits.";
|
||||
|
|
|
|||
|
|
@ -1,7 +1,9 @@
|
|||
import { Analytics } from "@vercel/analytics/next";
|
||||
import type { Metadata } from "next";
|
||||
import { Geist, Geist_Mono } from "next/font/google";
|
||||
import { Toaster } from "sonner";
|
||||
import { ThemeProvider } from "@/components/theme-provider";
|
||||
import "katex/dist/katex.min.css";
|
||||
|
||||
import "./globals.css";
|
||||
import { SessionProvider } from "next-auth/react";
|
||||
|
|
@ -81,6 +83,7 @@ export default function RootLayout({
|
|||
<Toaster position="top-center" />
|
||||
<SessionProvider>{children}</SessionProvider>
|
||||
</ThemeProvider>
|
||||
<Analytics />
|
||||
</body>
|
||||
</html>
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue