Skip to content

Conversation

timothycarambat
Copy link
Member

@timothycarambat timothycarambat commented Aug 12, 2025

Pull Request Type

  • ✨ feat
  • πŸ› fix
  • ♻️ refactor
  • πŸ’„ style
  • πŸ”¨ chore
  • πŸ“ docs

Relevant Issues

resolves #xxx

What is in this change?

Adds support for the following models to support real-time tool call streaming of outputs:

  • OpenAI
  • Anthropic - Patched and thoroughly tested for message/function calling formatting
  • LMStudio
  • Ollama
  • Groq
  • TogetherAI
  • AzureOpenAi - Not able to test & disabled streaming
  • KoboldCPP
  • LocalAI - Not able to test & disabled streaming
  • OpenRouter
  • Mistral
  • GenericOpenAi - Patched & no streaming enabled since this is a generic connector
  • DeepSeek
  • Perplexity
  • TextWebGenUi - Patched and tested
  • AWSBedrock - Not able to test
  • FireworksAI
  • LiteLLM
  • ApiPie
  • XAI
  • Novita
  • NvidiaNim - Not able to test & disabled streaming
  • PPIO - Not able to test & disabled streaming
  • Gemini - Disabled streaming

Gemini does not support streaming with tool calling via OpenAI SDK, disabled streaming and patched complete() function.

Tried rewriting using @google/generative-ai native package but is very specific with tool naming and requires reworking aibitat to sanitize function names before calling funcitons

  • DellProAiStudio - Not able to test & disabled streaming
  • MoonshotAi

Todo:

  • AWS Bedrock (complex support?)
  • Generic OpenAI (do we do tools or functions)?

Additional Information

For Provider only inherited classes:

  • When fully OpenAI Compatible (Azure/OpenAI) the stream function on Provider will apply.
  • All complete endpoints however still lie on their respective classes

For Provider + Untooled inherited classes:

  • Both stream and complete calls are delegated to the Untooled stream and complete
  • Ollama is the exception, which has its own override methods since it uses the ollama SDK.

Developer Validations & Tests

Always to be sure to test these conditions

  • @agent with a for sure tool call
  • @agent that is just a regular message
  • Mix of contionous conversation of tool/chats intermixed

  • Tested both sync and steam agent and non-agent calls on the developer API (with and without tools)
  • Tested frontend agentic flows for every provider.
  • Test agent Flow support (should work all the same)
  • I ran yarn lint from the root of the repo & committed changes
  • Relevant documentation has been updated
  • I have tested my code functionality
  • Docker build succeeds locally

- OpenAI
- Anthropic
- Azure OpenAI
…rovider class and not assume OpenAI client struct

example: Ollama
normalize completion/stream outputs across providers/untooled
@timothycarambat timothycarambat self-assigned this Sep 29, 2025
@timothycarambat timothycarambat marked this pull request as ready for review September 29, 2025 21:44
@timothycarambat
Copy link
Member Author

timothycarambat commented Sep 29, 2025

Adds support for the following models to support real-time tool call streaming of outputs:

  • OpenAI
  • Anthropic - Patched and thoroughly tested for message/function calling formatting
  • LMStudio
  • Ollama
  • Groq
  • TogetherAI
  • AzureOpenAi
  • LocalAI
  • OpenRouter
  • Mistral
  • DeepSeek
  • Perplexity
  • FireworksAI
  • LiteLLM
  • ApiPie
  • XAI
  • Novita
  • Moonshot
  • NvidiaNim
  • Gemini - supported, disabled on all non-gemini models (400/503 errors)
  • DPAIS - Supported & tested
  • GenericOpenAi - Support + honors no-streaming ENV

update Azure for streaming support
update Gemini to streamting support on gemini-* models
generic OpenAI disable streaming
verify localAI support
verify NVIDIA Nim support
@timothycarambat timothycarambat added the PR:Ready-to-merge PR has been reviewed by core team and is ready to merge label Sep 30, 2025
…t 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
…work fine

honor disabled streaming for provider where that concern may apply for regular chats
@timothycarambat timothycarambat merged commit d6f0d30 into master Oct 1, 2025
2 checks passed
@timothycarambat timothycarambat deleted the agentic-streaming branch October 1, 2025 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core-team-only enhancement New feature or request feature request PR:Ready-to-merge PR has been reviewed by core team and is ready to merge UI/UX
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants