File tree Expand file tree Collapse file tree
packages/services/service-ai/src/routes Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -252,10 +252,10 @@ export function buildAIRoutes(
252252 if ( wantStream ) {
253253 // UI Message Stream Protocol (SSE with JSON payloads)
254254 try {
255- if ( ! aiService . streamChat ) {
255+ if ( ! ( aiService as any ) . streamChatWithTools ) {
256256 return { status : 501 , body : { error : 'Streaming is not supported by the configured AI service' } } ;
257257 }
258- const events = aiService . streamChat ( finalMessages , resolvedOptions as any ) ;
258+ const events = ( aiService as any ) . streamChatWithTools ( finalMessages , resolvedOptions as any ) ;
259259 return {
260260 status : 200 ,
261261 stream : true ,
@@ -277,7 +277,7 @@ export function buildAIRoutes(
277277
278278 // JSON response (non-streaming)
279279 try {
280- const result = await aiService . chat ( finalMessages , resolvedOptions as any ) ;
280+ const result = await ( aiService as any ) . chatWithTools ( finalMessages , resolvedOptions as any ) ;
281281 return { status : 200 , body : result } ;
282282 } catch ( err ) {
283283 logger . error ( '[AI Route] /chat error' , err instanceof Error ? err : undefined ) ;
You can’t perform that action at this time.
0 commit comments