Skip to content

SmythOS Studio: Open-Source Visual AI Agent Builder and deployable runtime stack from SmythOS. Start with an intuitive drag-and-drop workspace, extend with custom code, and deploy your agents anywhere — local, cloud, or edge — with full governance and control.

deprecated agent chat /stream endpoint

Forhad Hosain4622bc3b9504
diff --git a/packages/runtime/src/modules/embodiment/modules/agentChat/routes/router.ts b/packages/runtime/src/modules/embodiment/modules/agentChat/routes/router.ts
index 49e931b9..0965b42c 100644
--- a/packages/runtime/src/modules/embodiment/modules/agentChat/routes/router.ts
+++ b/packages/runtime/src/modules/embodiment/modules/agentChat/routes/router.ts
@@ -58,7 +58,21 @@ const validations = {
},
};
+/**
+ * @deprecated This endpoint is deprecated. Use '/v1/emb/chat/stream' instead.
+ * This endpoint will be removed in a future version.
+ */
router.post('/stream', async (req, res) => {
+ // Add deprecation warning to response headers
+ res.setHeader('X-Deprecated', 'true');
+ res.setHeader('X-Deprecation-Warning', `This endpoint is deprecated. Use '/v1/emb/chat/stream' instead`);
+ res.setHeader('Deprecation', 'true');
+
+ // Log deprecation warning
+ console.warn(
+ `DEPRECATED: /stream endpoint called from ${req.ip}. Use '/v1/emb/chat/stream' instead. This endpoint will be removed in a future version.`,
+ );
+
let streamStarted = false;
const isLocalAgent = req.hostname.includes('localagent');
const agentId = req._agent?.id;
diff --git a/packages/runtime/src/modules/embodiment/modules/chatbot/routes/router.ts b/packages/runtime/src/modules/embodiment/modules/chatbot/routes/router.ts
index 327b59f8..ad49f719 100644
--- a/packages/runtime/src/modules/embodiment/modules/chatbot/routes/router.ts
+++ b/packages/runtime/src/modules/embodiment/modules/chatbot/routes/router.ts
@@ -30,8 +30,6 @@ type ChatbotResponse = {
const router = express.Router();
-const MAX_TTL_CHATBOT_FILE_UPLOAD = 60 * 60 * 24 * 1; // 1 day
-
let localAgentAuthorizations = {};
const middleweares = [agentLoader, ChatbotLoader];