Skip to content

Commit 43bff43

Browse files
waleedlatif1claude
andcommitted
fix(providers): guard Ollama streaming fast-path with hasActiveTools
Match Together/Baseten/Fireworks: when tools are supplied but all are filtered out (usageControl 'none'), take the single streaming call instead of an extra non-streaming round-trip. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 7b02377 commit 43bff43

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

apps/sim/providers/ollama/core.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ export async function executeOllamaProviderRequest(
166166
const providerStartTimeISO = new Date(providerStartTime).toISOString()
167167

168168
try {
169-
if (request.stream && (!tools || tools.length === 0)) {
169+
if (request.stream && (!tools || tools.length === 0 || !hasActiveTools)) {
170170
logger.info(`Using streaming response for ${providerLabel} request`)
171171

172172
const streamingParams: ChatCompletionCreateParamsStreaming = {

0 commit comments

Comments
 (0)