diff --git a/backend/danswer/llm/answering/answer.py b/backend/danswer/llm/answering/answer.py
index 684b0aab7..7e7733cc0 100644
--- a/backend/danswer/llm/answering/answer.py
+++ b/backend/danswer/llm/answering/answer.py
@@ -248,6 +248,13 @@ class Answer:
if self.is_cancelled:
return
yield cast(str, message.content)
+ if (
+ message.additional_kwargs.get("usage_metadata", {}).get("stop")
+ == "length"
+ ):
+ yield StreamStopInfo(
+ stop_reason=StreamStopReason.CONTEXT_LENGTH
+ )
if not tool_call_chunk:
return # no tool call needed
diff --git a/web/src/app/chat/ChatPage.tsx b/web/src/app/chat/ChatPage.tsx
index 57c663af2..0c63ad216 100644
--- a/web/src/app/chat/ChatPage.tsx
+++ b/web/src/app/chat/ChatPage.tsx
@@ -99,7 +99,6 @@ import ExceptionTraceModal from "@/components/modals/ExceptionTraceModal";
import { SEARCH_TOOL_NAME } from "./tools/constants";
import { useUser } from "@/components/user/UserProvider";
-import { Stop } from "@phosphor-icons/react";
const TEMP_USER_MESSAGE_ID = -1;
const TEMP_ASSISTANT_MESSAGE_ID = -2;
diff --git a/web/src/app/chat/message/Messages.tsx b/web/src/app/chat/message/Messages.tsx
index fa307ec93..ff177c6a6 100644
--- a/web/src/app/chat/message/Messages.tsx
+++ b/web/src/app/chat/message/Messages.tsx
@@ -364,7 +364,7 @@ export const AIMessage = ({