Skip to content

Cover Ollama streaming tool calling with a test - #6

Merged
ActuallyTaylor merged 1 commit into
mainfrom
feature/ollama-streaming-tool-calling
Aug 3, 2026
Merged

Cover Ollama streaming tool calling with a test#6
ActuallyTaylor merged 1 commit into
mainfrom
feature/ollama-streaming-tool-calling

Conversation

@ActuallyTaylor

@ActuallyTaylor ActuallyTaylor commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

Scope reduced. This PR originally added streaming tool calling to the Ollama provider, but #3 landed the same feature first — main's streamResponse already runs the turn loop, calls the shared resolver, and appends transcript entries mid-stream. Re-landing that would have been a duplicate, so the implementation is dropped.

What remains is the piece #3 didn't include: a test. Nothing currently checks that tool activity reaches the transcript while the stream is running rather than only at the end.

streamWithTools asserts the tool calls and tool output entries appear during iteration, that the output survives into the final transcript, and that the tool was invoked once with the expected arguments. It mirrors the Anthropic suite's equivalent and reuses this suite's spy(on:) fixture.

Verified live earlier against a local Ollama server with qwen3:8b.

Based on #4; merge that first.

🤖 Generated with Claude Code

@ActuallyTaylor
ActuallyTaylor force-pushed the feature/ollama-streaming-tool-calling branch from f436f25 to e666645 Compare August 3, 2026 19:36
@ActuallyTaylor ActuallyTaylor changed the title Support tool calling while streaming Ollama responses Cover Ollama streaming tool calling with a test Aug 3, 2026
@ActuallyTaylor
ActuallyTaylor force-pushed the feature/ollama-streaming-tool-calling branch 2 times, most recently from 0cc74aa to 6933290 Compare August 3, 2026 19:47
@ActuallyTaylor
ActuallyTaylor changed the base branch from feature/central-tool-resolution to feature/gemini-streaming-tool-calling August 3, 2026 19:48
@ActuallyTaylor
ActuallyTaylor force-pushed the feature/ollama-streaming-tool-calling branch from 6933290 to b61a0ad Compare August 3, 2026 20:03
Base automatically changed from feature/gemini-streaming-tool-calling to main August 3, 2026 20:07
The streaming tool loop landed without a test, so nothing checked that tool activity reaches the transcript while the stream is still running rather than only at the end.

`streamWithTools` asserts the tool calls and tool output entries appear during iteration, that the output survives into the final transcript, and that the tool was invoked once with the expected arguments. It mirrors the Anthropic suite's equivalent and reuses this suite's `spy(on:)` fixture.
@ActuallyTaylor
ActuallyTaylor force-pushed the feature/ollama-streaming-tool-calling branch from b61a0ad to 970a262 Compare August 3, 2026 20:07

@ActuallyTaylor ActuallyTaylor left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@ActuallyTaylor
ActuallyTaylor merged commit 775d492 into main Aug 3, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants