[PR #5477] [MERGED] Add capability detection and streaming usage for Generic OpenAI provider #5456

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

📋 Pull Request Information

Original PR: https://github.com/Mintplex-Labs/anything-llm/pull/5477
Author: @timothycarambat
Created: 4/21/2026
Status: Merged
Merged: 4/21/2026
Merged by: @timothycarambat

Base: masterHead: generic-openai-tooling


📝 Commits (1)

  • 838dbb1 Add capability detection and streaming usage for Generic OpenAI provider

📊 Changes

4 files changed (+84 additions, -11 deletions)

View changed files

📝 server/utils/AiProviders/genericOpenAi/index.js (+61 -0)
📝 server/utils/agents/aibitat/providers/genericOpenAi.js (+9 -7)
📝 server/utils/agents/aibitat/providers/helpers/tooled.js (+9 -3)
📝 server/utils/helpers/updateENV.js (+5 -1)

📄 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)

Description

  • Add ENV-configurable model capabilities (tools, reasoning, vision, imageGeneration) via PROVIDER_SUPPORTS_* environment variables
  • Add optional stream usage reporting via GENERIC_OPEN_AI_REPORT_USAGE
  • Fix streaming tool calls for providers that send null tool_call.id (e.g., mlx-server) by generating fallback UUIDs
  • Refactor supportsNativeToolCalling() to use centralized capabilities API

Visuals (if applicable)

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/5477 **Author:** [@timothycarambat](https://github.com/timothycarambat) **Created:** 4/21/2026 **Status:** ✅ Merged **Merged:** 4/21/2026 **Merged by:** [@timothycarambat](https://github.com/timothycarambat) **Base:** `master` ← **Head:** `generic-openai-tooling` --- ### 📝 Commits (1) - [`838dbb1`](https://github.com/Mintplex-Labs/anything-llm/commit/838dbb132feb3224116ac6992007eb1078de575f) Add capability detection and streaming usage for Generic OpenAI provider ### 📊 Changes **4 files changed** (+84 additions, -11 deletions) <details> <summary>View changed files</summary> 📝 `server/utils/AiProviders/genericOpenAi/index.js` (+61 -0) 📝 `server/utils/agents/aibitat/providers/genericOpenAi.js` (+9 -7) 📝 `server/utils/agents/aibitat/providers/helpers/tooled.js` (+9 -3) 📝 `server/utils/helpers/updateENV.js` (+5 -1) </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) - [x] 🔨 chore (Build, CI, maintenance) - [ ] 📝 docs (Documentation updates) ### Description - Add ENV-configurable model capabilities (tools, reasoning, vision, imageGeneration) via PROVIDER_SUPPORTS_* environment variables - Add optional stream usage reporting via GENERIC_OPEN_AI_REPORT_USAGE - Fix streaming tool calls for providers that send null tool_call.id (e.g., mlx-server) by generating fallback UUIDs - Refactor supportsNativeToolCalling() to use centralized capabilities API <!-- Describe the changes in this PR that are impactful to the repo. What problem does it solve? --> ### Visuals (if applicable) <!-- 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:25 -04:00
yindo closed this issue 2026-06-05 15:21:25 -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#5456