[PR #5507] [CLOSED] fix: gate generic OpenAI tool stream usage reporting #5464

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

📋 Pull Request Information

Original PR: https://github.com/Mintplex-Labs/anything-llm/pull/5507
Author: @haimingZZ
Created: 4/24/2026
Status: Closed

Base: masterHead: fix/generic-openai-tool-usage-option


📝 Commits (1)

  • 8bddcaa fix: gate generic OpenAI tool stream usage reporting

📊 Changes

3 files changed (+73 additions, -4 deletions)

View changed files

server/__tests__/utils/agents/aibitat/providers/helpers/tooled.test.js (+55 -0)
📝 server/utils/agents/aibitat/providers/genericOpenAi.js (+10 -1)
📝 server/utils/agents/aibitat/providers/helpers/tooled.js (+8 -3)

📄 Description

Summary

  • let tooledStream omit stream_options when a provider explicitly disables them
  • make the Generic OpenAI native tool-calling stream path honor GENERIC_OPEN_AI_REPORT_USAGE before sending include_usage
  • add a focused regression test for default usage reporting and provider-disabled stream options

Tests

  • node -c server/utils/agents/aibitat/providers/helpers/tooled.js
  • node -c server/utils/agents/aibitat/providers/genericOpenAi.js
  • npx jest server/__tests__/utils/agents/aibitat/providers/helpers/tooled.test.js --runInBand
  • git diff --check

Note: targeted npx eslint ... could not run in this checkout because the local install is missing ESLint config dependencies (@eslint/js).


🔄 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/5507 **Author:** [@haimingZZ](https://github.com/haimingZZ) **Created:** 4/24/2026 **Status:** ❌ Closed **Base:** `master` ← **Head:** `fix/generic-openai-tool-usage-option` --- ### 📝 Commits (1) - [`8bddcaa`](https://github.com/Mintplex-Labs/anything-llm/commit/8bddcaa1121ad837550caa56189d73e18dbe35f6) fix: gate generic OpenAI tool stream usage reporting ### 📊 Changes **3 files changed** (+73 additions, -4 deletions) <details> <summary>View changed files</summary> ➕ `server/__tests__/utils/agents/aibitat/providers/helpers/tooled.test.js` (+55 -0) 📝 `server/utils/agents/aibitat/providers/genericOpenAi.js` (+10 -1) 📝 `server/utils/agents/aibitat/providers/helpers/tooled.js` (+8 -3) </details> ### 📄 Description ## Summary - let `tooledStream` omit `stream_options` when a provider explicitly disables them - make the Generic OpenAI native tool-calling stream path honor `GENERIC_OPEN_AI_REPORT_USAGE` before sending `include_usage` - add a focused regression test for default usage reporting and provider-disabled stream options ## Tests - `node -c server/utils/agents/aibitat/providers/helpers/tooled.js` - `node -c server/utils/agents/aibitat/providers/genericOpenAi.js` - `npx jest server/__tests__/utils/agents/aibitat/providers/helpers/tooled.test.js --runInBand` - `git diff --check` Note: targeted `npx eslint ...` could not run in this checkout because the local install is missing ESLint config dependencies (`@eslint/js`). --- <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:26 -04:00
yindo closed this issue 2026-06-05 15:21:26 -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#5464