From 0c3994da005bbead462eadfac512b6c0e5ebd494 Mon Sep 17 00:00:00 2001 From: dal Date: Thu, 24 Jul 2025 09:22:30 -0600 Subject: [PATCH] hotfix: use v2 on chats --- apps/web/src/api/buster_rest/chats/requestsV2.ts | 4 ++-- packages/ai/src/steps/think-and-prep-step.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/web/src/api/buster_rest/chats/requestsV2.ts b/apps/web/src/api/buster_rest/chats/requestsV2.ts index ef3e67644..85fefeb2b 100644 --- a/apps/web/src/api/buster_rest/chats/requestsV2.ts +++ b/apps/web/src/api/buster_rest/chats/requestsV2.ts @@ -2,7 +2,7 @@ import type { ChatCreateRequest, ChatWithMessages } from '@buster/server-shared/ import mainApi, { mainApiV2 } from '../instances'; export const createNewChat = async (props: ChatCreateRequest) => { - return mainApi.post('/chats', props).then((res) => res.data); + return mainApiV2.post('/chats', props).then((res) => res.data); }; export const stopChat = async ({ chatId }: { chatId: string }) => { @@ -12,5 +12,5 @@ export const stopChat = async ({ chatId }: { chatId: string }) => { export const startChatFromAsset = async ( params: Pick, 'asset_id' | 'asset_type' | 'prompt'> ): Promise => { - return mainApi.post('/chats', params).then((res) => res.data); + return mainApiV2.post('/chats', params).then((res) => res.data); }; diff --git a/packages/ai/src/steps/think-and-prep-step.ts b/packages/ai/src/steps/think-and-prep-step.ts index cc1283bae..5cd520803 100644 --- a/packages/ai/src/steps/think-and-prep-step.ts +++ b/packages/ai/src/steps/think-and-prep-step.ts @@ -64,7 +64,7 @@ type BusterChatMessageResponse = z.infer const outputSchema = ThinkAndPrepOutputSchema; const DEFAULT_CACHE_OPTIONS = { - anthropic: { cacheControl: { type: 'ephemeral' } }, + anthropic: { cacheControl: { type: 'ephemeral', ttl: '1hr' } }, }; // Helper function to create the result object