Skip to content

Conversation

@teamdandelion
Copy link
Collaborator

@teamdandelion teamdandelion commented Jul 30, 2025

In offline discussion, we agreed that having the singleton accessors for non-text content is a questionable affordance, users can write .images[0] if that's really what they want, and it is clearer that they may be skipping some. In particular response.tool_call encourages writing bad code that will miss parallel tool calling.

In the case of the text property, I updated docstring to show that it returns empty string if there is no text, and added a delimiter argument that defaults to \n for concatenating multiple text pieces.

Also removed cost tracking from response and stream.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Jul 30, 2025

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
v2-docs c531f58 Commit Preview URL Jul 31 2025, 09:36 PM

@teamdandelion teamdandelion force-pushed the 07-29-refactor_cleanup_response_to_remove_singleton_accessors_except_text_ branch from 481ccea to 74e31b9 Compare July 30, 2025 06:29
@teamdandelion teamdandelion force-pushed the 07-29-refactor_cleanup_response_to_remove_singleton_accessors_except_text_ branch from 74e31b9 to adcac3c Compare July 30, 2025 06:46
@teamdandelion teamdandelion force-pushed the 07-29-feat_add_tool.__call___rename_tool.call_to_tool.execute_ branch 2 times, most recently from 815cd5c to 52f4413 Compare July 30, 2025 06:53
@teamdandelion teamdandelion force-pushed the 07-29-refactor_cleanup_response_to_remove_singleton_accessors_except_text_ branch 2 times, most recently from c6d3765 to ae50177 Compare July 30, 2025 17:58
@teamdandelion teamdandelion marked this pull request as ready for review July 30, 2025 18:05
@teamdandelion teamdandelion requested a review from willbakst as a code owner July 30, 2025 18:05
@teamdandelion teamdandelion force-pushed the 07-29-feat_add_tool.__call___rename_tool.call_to_tool.execute_ branch from 52f4413 to a30e652 Compare July 30, 2025 23:08
@teamdandelion teamdandelion force-pushed the 07-29-refactor_cleanup_response_to_remove_singleton_accessors_except_text_ branch from ae50177 to 09b5059 Compare July 30, 2025 23:08
@teamdandelion teamdandelion force-pushed the 07-29-refactor_cleanup_response_to_remove_singleton_accessors_except_text_ branch from 09b5059 to 5bef656 Compare July 31, 2025 05:42
@teamdandelion teamdandelion force-pushed the 07-29-feat_add_tool.__call___rename_tool.call_to_tool.execute_ branch from a30e652 to 31dc882 Compare July 31, 2025 05:42
Copy link
Collaborator Author

teamdandelion commented Jul 31, 2025

Merge activity

  • Jul 31, 9:18 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Jul 31, 9:26 PM UTC: Graphite rebased this pull request as part of a merge.
  • Jul 31, 9:27 PM UTC: @teamdandelion merged this pull request with Graphite.

@teamdandelion teamdandelion changed the base branch from 07-29-feat_add_tool.__call___rename_tool.call_to_tool.execute_ to graphite-base/1154 July 31, 2025 21:22
@teamdandelion teamdandelion changed the base branch from graphite-base/1154 to v2 July 31, 2025 21:24
@teamdandelion teamdandelion force-pushed the 07-29-refactor_cleanup_response_to_remove_singleton_accessors_except_text_ branch from 5bef656 to c531f58 Compare July 31, 2025 21:25
@teamdandelion teamdandelion merged commit 1a4dc10 into v2 Jul 31, 2025
5 checks passed
@teamdandelion teamdandelion deleted the 07-29-refactor_cleanup_response_to_remove_singleton_accessors_except_text_ branch July 31, 2025 21:27
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