merlyn/server
Timothy Carambat d6f0d305ab
Enable real-time agent tool call streaming for all providers (#4279)
* WIP agentic tool call streaming
- OpenAI
- Anthropic
- Azure OpenAI

* WIP rest of providers EXCLUDES Bedrock and GenericOpenAI

* patch untooled complete/streaming to use chatCallback provider from provider class and not assume OpenAI client struct
example: Ollama

* modify ollama to function with its own overrides
normalize completion/stream outputs across providers/untooled

* dev build

* fix message sanization for anthropic agent streaming

* wip fix anthropic agentic streaming sanitization

* patch gemini, webgenui, generic aibitat providers + disable providers unable to test

* refactor anthropic aibitat provider for empty message and tool call formatting

* Add frontend missing prop check
update Azure for streaming support
update Gemini to streamting support on gemini-* models
generic OpenAI disable streaming
verify localAI support
verify NVIDIA Nim support

* DPAIS, remove temp from call, support streaming'

* remove 0 temp to remove possibility of bad temp error/500s/400s

* Patch condition where model is non-streamable and no tools are present or called resulting in the provider `handleFunctionCallChat` being called - which returns a string.

This would then fail in Untooled.complete since response would be a string and not the expected `response.choices?.[0]?.message`

Modified this line to handle both conditions for stream/non-streaming and tool presence or lack thereof

* Allow generic Openai to be streamable since using untooled it should work fine
honor disabled streaming for provider where that concern may apply for regular chats

* rename function and more gemini-specific function to gemini provider

* add comments for readability
.complete on azure should be non-streaming as this is the sync response

* migrate CometAPI, but disable as we cannot test

---------

Co-authored-by: shatfield4 <seanhatfield5@gmail.com>
2025-10-01 10:17:18 -07:00
..
__tests__ New Default System Prompt Variables (User ID, Workspace ID, & Workspace Name) (#4414) 2025-09-29 14:32:56 -07:00
endpoints Add User-Agent header on the requests sent by Generic OpenAI providers. (#4393) 2025-09-17 13:08:18 -07:00
jobs Fix issue where filenames with spaces could be marked as orphaned and pruned from threads they are attached to - resulting in the model not seeing a file during chat after the backend boots 2025-09-30 14:35:14 -07:00
middleware Add HTTP request/response logging middleware for development mode (#4425) 2025-09-29 13:33:15 -07:00
models New Default System Prompt Variables (User ID, Workspace ID, & Workspace Name) (#4414) 2025-09-29 14:32:56 -07:00
prisma Workspace Chat with documents overhaul (#4261) 2025-08-11 09:26:19 -07:00
storage feat: Implement CometAPI integration for chat completions and model m… (#4379) 2025-09-16 14:38:49 -07:00
swagger patch folder name GET request response (#4395) 2025-09-17 13:05:11 -07:00
utils Enable real-time agent tool call streaming for all providers (#4279) 2025-10-01 10:17:18 -07:00
.env.example Add HTTP request/response logging middleware for development mode (#4425) 2025-09-29 13:33:15 -07:00
.flowconfig devcontainer v1 (#297) 2024-01-08 15:31:06 -08:00
.gitignore Workspace Chat with documents overhaul (#4261) 2025-08-11 09:26:19 -07:00
.nvmrc Implement Chroma Support (#1) 2023-06-07 21:31:35 -07:00
index.js Add HTTP request/response logging middleware for development mode (#4425) 2025-09-29 13:33:15 -07:00
jsconfig.json devcontainer v1 (#297) 2024-01-08 15:31:06 -08:00
nodemon.json Full developer api (#221) 2023-08-23 19:15:07 -07:00
package.json forgot 1.8.5 tag :) 2025-08-14 17:43:55 -07:00
yarn.lock Mobile sync support (#4173) 2025-07-31 12:28:03 -07:00