[PR #5197] [MERGED] Support Agent stream metric reporting #5345

Closed
opened 2026-06-05 15:21:02 -04:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Mintplex-Labs/anything-llm/pull/5197
Author: @timothycarambat
Created: 3/12/2026
Status: Merged
Merged: 3/12/2026
Merged by: @timothycarambat

Base: masterHead: support-agent-metrics


📝 Commits (1)

  • bfde815 Support Agent stream metric reporting

📊 Changes

21 files changed (+339 additions, -55 deletions)

View changed files

📝 frontend/src/components/WorkspaceChat/ChatContainer/ChatHistory/HistoricalMessage/index.jsx (+7 -4)
📝 frontend/src/utils/chat/agent.js (+14 -0)
📝 server/utils/agents/aibitat/index.js (+49 -5)
📝 server/utils/agents/aibitat/plugins/chat-history.js (+4 -0)
📝 server/utils/agents/aibitat/providers/ai-provider.js (+86 -0)
📝 server/utils/agents/aibitat/providers/anthropic.js (+27 -1)
📝 server/utils/agents/aibitat/providers/azure.js (+5 -3)
📝 server/utils/agents/aibitat/providers/deepseek.js (+4 -1)
📝 server/utils/agents/aibitat/providers/dockerModelRunner.js (+4 -2)
📝 server/utils/agents/aibitat/providers/gemini.js (+14 -0)
📝 server/utils/agents/aibitat/providers/genericOpenAi.js (+4 -2)
📝 server/utils/agents/aibitat/providers/groq.js (+4 -2)
📝 server/utils/agents/aibitat/providers/helpers/tooled.js (+53 -6)
📝 server/utils/agents/aibitat/providers/lemonade.js (+4 -2)
📝 server/utils/agents/aibitat/providers/litellm.js (+4 -2)
📝 server/utils/agents/aibitat/providers/lmstudio.js (+4 -2)
📝 server/utils/agents/aibitat/providers/localai.js (+4 -2)
📝 server/utils/agents/aibitat/providers/novita.js (+4 -2)
📝 server/utils/agents/aibitat/providers/ollama.js (+21 -1)
📝 server/utils/agents/aibitat/providers/openai.js (+19 -16)

...and 1 more files

📄 Description

Pull Request Type

  • feat (New feature)
  • 🐛 fix (Bug fix)
  • ♻️ refactor (Code refactoring without changing behavior)
  • 💄 style (UI style changes)
  • 🔨 chore (Build, CI, maintenance)
  • 📝 docs (Documentation updates)

Relevant Issues

resolves #

Description

Adds reporting of metrics below @agent metrics now for supported providers. We explicitly enabled this for specific providers.

  • Anthropic
  • Azure
  • Deepseek
  • DMR
  • Gemini
  • Generic OpenAI
  • Groq
  • Lemonade
  • LiteLLM
  • LMStudio
  • LocalAI
  • NOVITA
  • Ollama
  • OpenRouter

All others or providers that dont support Native Tool Calling will not report metrics.

Visuals (if applicable)

https://github.com/user-attachments/assets/743f0803-835a-40be-b5cd-9293c9ff46cd

Additional Information

Developer Validations

  • I ran yarn lint from the root of the repo & committed changes
  • Relevant documentation has been updated (if applicable)
  • I have tested my code functionality
  • Docker build succeeds locally

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Mintplex-Labs/anything-llm/pull/5197 **Author:** [@timothycarambat](https://github.com/timothycarambat) **Created:** 3/12/2026 **Status:** ✅ Merged **Merged:** 3/12/2026 **Merged by:** [@timothycarambat](https://github.com/timothycarambat) **Base:** `master` ← **Head:** `support-agent-metrics` --- ### 📝 Commits (1) - [`bfde815`](https://github.com/Mintplex-Labs/anything-llm/commit/bfde8151bfe6e21a50ff0bfaad3e4a003a607e17) Support Agent stream metric reporting ### 📊 Changes **21 files changed** (+339 additions, -55 deletions) <details> <summary>View changed files</summary> 📝 `frontend/src/components/WorkspaceChat/ChatContainer/ChatHistory/HistoricalMessage/index.jsx` (+7 -4) 📝 `frontend/src/utils/chat/agent.js` (+14 -0) 📝 `server/utils/agents/aibitat/index.js` (+49 -5) 📝 `server/utils/agents/aibitat/plugins/chat-history.js` (+4 -0) 📝 `server/utils/agents/aibitat/providers/ai-provider.js` (+86 -0) 📝 `server/utils/agents/aibitat/providers/anthropic.js` (+27 -1) 📝 `server/utils/agents/aibitat/providers/azure.js` (+5 -3) 📝 `server/utils/agents/aibitat/providers/deepseek.js` (+4 -1) 📝 `server/utils/agents/aibitat/providers/dockerModelRunner.js` (+4 -2) 📝 `server/utils/agents/aibitat/providers/gemini.js` (+14 -0) 📝 `server/utils/agents/aibitat/providers/genericOpenAi.js` (+4 -2) 📝 `server/utils/agents/aibitat/providers/groq.js` (+4 -2) 📝 `server/utils/agents/aibitat/providers/helpers/tooled.js` (+53 -6) 📝 `server/utils/agents/aibitat/providers/lemonade.js` (+4 -2) 📝 `server/utils/agents/aibitat/providers/litellm.js` (+4 -2) 📝 `server/utils/agents/aibitat/providers/lmstudio.js` (+4 -2) 📝 `server/utils/agents/aibitat/providers/localai.js` (+4 -2) 📝 `server/utils/agents/aibitat/providers/novita.js` (+4 -2) 📝 `server/utils/agents/aibitat/providers/ollama.js` (+21 -1) 📝 `server/utils/agents/aibitat/providers/openai.js` (+19 -16) _...and 1 more files_ </details> ### 📄 Description ### Pull Request Type <!-- For change type, change [ ] to [x]. --> - [x] ✨ feat (New feature) - [ ] 🐛 fix (Bug fix) - [ ] ♻️ refactor (Code refactoring without changing behavior) - [ ] 💄 style (UI style changes) - [ ] 🔨 chore (Build, CI, maintenance) - [ ] 📝 docs (Documentation updates) ### Relevant Issues <!-- Use "resolves #xxx" to auto resolve on merge. Otherwise, please use "connect #xxx" --> resolves # ### Description Adds reporting of metrics below `@agent` metrics now for supported providers. We explicitly enabled this for specific providers. - [x] Anthropic - [x] Azure - [x] Deepseek - [x] DMR - [x] Gemini - [x] Generic OpenAI - [x] Groq - [x] Lemonade - [x] LiteLLM - [x] LMStudio - [x] LocalAI - [x] NOVITA - [x] Ollama - [x] OpenRouter All others or providers that dont support Native Tool Calling will not report metrics. <!-- Describe the changes in this PR that are impactful to the repo. What problem does it solve? --> ### Visuals (if applicable) https://github.com/user-attachments/assets/743f0803-835a-40be-b5cd-9293c9ff46cd <!-- Add screenshots or screen recordings to demonstrate the changes, especially for UI updates. --> ### Additional Information <!-- Add any other context about the Pull Request here that was not captured above. --> ### Developer Validations <!-- All of the applicable items should be checked. --> - [ ] I ran `yarn lint` from the root of the repo & committed changes - [ ] Relevant documentation has been updated (if applicable) - [ ] I have tested my code functionality - [ ] Docker build succeeds locally --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-06-05 15:21:02 -04:00
yindo closed this issue 2026-06-05 15:21:02 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#5345