Skip to content

Fix handling of multiple streaming tool calls - #62

Merged
sd-st merged 1 commit into
anthropics:nextfrom
stephentoub:cleartools
Dec 5, 2025
Merged

sd-st merged 1 commit into
anthropics:nextfrom
stephentoub:cleartools

Conversation

@stephentoub

@stephentoub stephentoub commented Dec 3, 2025 •

Copy link
Copy Markdown
Contributor

The implementation was missing a clear on the collection of streaming data. As such, it would yield each tool already yielded every time it yielded another tool.

Fixes #53

The implementation was missing a clear on the collection of streaming data. As such, it would each tool already yielded every time it yielded another tool.
@stephentoub
stephentoub requested a review from a team as a code owner December 3, 2025 23:08
@stephentoub

stephentoub commented Dec 3, 2025 •

Copy link
Copy Markdown
Contributor Author

cc: @TomerAberbach, @sd-st

@sd-st
sd-st merged commit 2b01684 into anthropics:next Dec 5, 2025
3 checks passed
@bryansusu

Copy link
Copy Markdown

Great job guys. Looking forward to test the fix.
When is this expected to be released?

@stephentoub
stephentoub deleted the cleartools branch December 9, 2025 15:53
@packyg packyg mentioned this pull request Dec 10, 2025
sd-st pushed a commit that referenced this pull request Dec 10, 2025
* chore(internal): suppress diagnostic for .netstandard2.0

* chore(internal): suppress diagnostic for .netstandard2.0

* fix: remove bad preprocessor directive

* Add some more tests for Anthropic{Beta}ClientExtensions (#26)

* Add some more tests for Anthropic{Beta}ClientExtensions

* Fix csharpier

* chore(internal): update testing setup

* Readd TestBase

* Use single source of truth for test parameter

* Readd baseclass for codegen compatibility

* Fix code style

* chore(internal): equality and more unit tests

* fix(client): handling of null value type
refactor(internal): share get/set logic

* chore(internal): update csproj formatting

* refactor(client): use `System.Net.ServerSentEvents`

* docs: add link to nuget

* fix(client): check response status when `MaxRetries = 0`

* chore(internal): add tests for constants

* feat(internal): add additional object tests

* codegen metadata

* chore(ci): lint and build examples (#43)

* docs: correct reqs

* chore(internal): suppress diagnostic for .netstandard2.0

* feat(client): improve csproj

* chore(internal): set up cron release job

* fix(internal): running net462 tests on ci

* Improve code style on examples
Remove obsolete examples
Include all examples in example sln

* codestyle improvements

* adapt build script to also build examples

---------

Co-authored-by: Tomer Aberbach <[email protected]>
Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>

* feat(client): improve some names

* docs: add more comments

* fix(client): with expressions for models

* chore(internal): fix release please config

* chore(internal): fix package name (#239)

* Update version for src/Anthropic in manifest

* Add src/Anthropic to release-please config

* feat(client): add x-stainless-retry-count

* fix(ci): fail loudly if version already exists on nuget

* Fix handling of multiple streaming tool calls (#62)

The implementation was missing a clear on the collection of streaming data. As such, it would each tool already yielded every time it yielded another tool.

* Add beta headers automatically for HostedCodeInterpreter/McpServerTool (#63)

* Add beta headers automatically for HostedCodeInterpreter/McpServerTool

* format

* Idiomatic Skills support for MEAI via AsAITool() extension (#58)

* Add WithSkills convenience method to MEAI extensions

* Refactor to use AsAITool approach

* Align with existing AsAITool pattern

* Unify with beta header inclusion from #63

* Fix bug

* Ran /scripts/format

* Update src/Anthropic/Services/Beta/Messages/AnthropicBetaClientExtensions.cs

Co-authored-by: Stephen Toub <[email protected]>

---------

Co-authored-by: Stephen Toub <[email protected]>

* chore(internal): add enum tests

* chore(client): improve union validation

* chore: release main

---------

Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
Co-authored-by: Tomer Aberbach <[email protected]>
Co-authored-by: Stephen Toub <[email protected]>
Co-authored-by: JPVenson <[email protected]>
Co-authored-by: meorphis <[email protected]>
Co-authored-by: Peder Holdgaard Pedersen <[email protected]>
Sarmkadan pushed a commit to Sarmkadan/anthropic-sdk-csharp that referenced this pull request Jul 11, 2026
* chore(internal): suppress diagnostic for .netstandard2.0

* chore(internal): suppress diagnostic for .netstandard2.0

* fix: remove bad preprocessor directive

* Add some more tests for Anthropic{Beta}ClientExtensions (anthropics#26)

* Add some more tests for Anthropic{Beta}ClientExtensions

* Fix csharpier

* chore(internal): update testing setup

* Readd TestBase

* Use single source of truth for test parameter

* Readd baseclass for codegen compatibility

* Fix code style

* chore(internal): equality and more unit tests

* fix(client): handling of null value type
refactor(internal): share get/set logic

* chore(internal): update csproj formatting

* refactor(client): use `System.Net.ServerSentEvents`

* docs: add link to nuget

* fix(client): check response status when `MaxRetries = 0`

* chore(internal): add tests for constants

* feat(internal): add additional object tests

* codegen metadata

* chore(ci): lint and build examples (anthropics#43)

* docs: correct reqs

* chore(internal): suppress diagnostic for .netstandard2.0

* feat(client): improve csproj

* chore(internal): set up cron release job

* fix(internal): running net462 tests on ci

* Improve code style on examples
Remove obsolete examples
Include all examples in example sln

* codestyle improvements

* adapt build script to also build examples

---------

Co-authored-by: Tomer Aberbach <[email protected]>
Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>

* feat(client): improve some names

* docs: add more comments

* fix(client): with expressions for models

* chore(internal): fix release please config

* chore(internal): fix package name (anthropics#239)

* Update version for src/Anthropic in manifest

* Add src/Anthropic to release-please config

* feat(client): add x-stainless-retry-count

* fix(ci): fail loudly if version already exists on nuget

* Fix handling of multiple streaming tool calls (anthropics#62)

The implementation was missing a clear on the collection of streaming data. As such, it would each tool already yielded every time it yielded another tool.

* Add beta headers automatically for HostedCodeInterpreter/McpServerTool (anthropics#63)

* Add beta headers automatically for HostedCodeInterpreter/McpServerTool

* format

* Idiomatic Skills support for MEAI via AsAITool() extension (anthropics#58)

* Add WithSkills convenience method to MEAI extensions

* Refactor to use AsAITool approach

* Align with existing AsAITool pattern

* Unify with beta header inclusion from anthropics#63

* Fix bug

* Ran /scripts/format

* Update src/Anthropic/Services/Beta/Messages/AnthropicBetaClientExtensions.cs

Co-authored-by: Stephen Toub <[email protected]>

---------

Co-authored-by: Stephen Toub <[email protected]>

* chore(internal): add enum tests

* chore(client): improve union validation

* chore: release main

---------

Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
Co-authored-by: Tomer Aberbach <[email protected]>
Co-authored-by: Stephen Toub <[email protected]>
Co-authored-by: JPVenson <[email protected]>
Co-authored-by: meorphis <[email protected]>
Co-authored-by: Peder Holdgaard Pedersen <[email protected]>
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.

3 participants