Skip to content

Conversation

monoxgas
Copy link
Contributor

@monoxgas monoxgas commented Jul 25, 2025

Notes

  • Reworking error handling for pipeline tools/parsing to give more control
  • Added docs to clarity how catch settings can be used to control when error surface.

Generated Summary

  • Renamed the property "until_types" to "until_parsed_as_types" in ChatPipeline and its documentation, and added the "until_parsed_as_catch" flag.
  • Introduced a new "catch" parameter in functions such as until_parsed_as() and using(), allowing override of error-catching behavior during parsing and tool execution.
  • Updated the tool execution logic to handle errors differently by using raw string formatting to avoid serialization issues, and by preserving error details in message metadata.
  • Enhanced Message.from_model to accept "tool_call_id" and "metadata", ensuring error information is attached when building messages from error models.
  • Modified the default catch behavior in Tool definitions to catch common exceptions (JSONDecodeError and ValidationError) unless overridden.
  • Added new clone and with_ methods in the Tool class for creating tool copies with modified parameters.
  • Revised API documentation across chat.mdx, message.mdx, tools.mdx, transform.mdx, and pipelines.mdx to reflect these error handling and parameter changes.

This summary was generated with ❤️ by rigging

Generated Summary

  • Introduced a new "catch" parameter in multiple API methods (e.g. until_parsed_as, using, and tool decorators) to allow overriding default error-catching behavior and control exception handling at both tool and pipeline levels.
  • Renamed the internal variable "until_types" to "until_parsed_as_types" (with an accompanying "until_parsed_as_catch") to better reflect its purpose in parsing-related error handling.
  • Extended the Message API by adding "tool_call_id" and "metadata" parameters to Message.from_model, enabling error metadata to be attached to messages.
  • Updated tool implementation in rigging/tools/base.py by:
    • Removing the tool call name mismatch warnings.
    • Improving error handling logic: using raw string formatting in JSON transforms to avoid serialization issues and preserving error information in message metadata.
    • Adding a "clone" and "with_" method to facilitate creating tool clones with updated parameters.
  • Revised documentation across API and topics files to:
    • Clarify the error handling hierarchy at the tool, pipeline, and parsing levels.
    • Document the new "catch" option and its defaults (e.g. catching JSONDecodeError and ValidationError by default).
    • Update examples for robust error management and debugging in tool-enabled pipelines.
  • Applied minor formatting and code style improvements for consistency and clarity in error handling and callback implementations.

This summary was generated with ❤️ by rigging

@monoxgas monoxgas requested a review from a team as a code owner July 25, 2025 01:41
@dreadnode-renovate-bot dreadnode-renovate-bot bot added area/docs Changes to documentation and guides type/docs Documentation updates and improvements labels Jul 25, 2025
@monoxgas monoxgas merged commit 93fc7e2 into main Jul 31, 2025
7 checks passed
@monoxgas monoxgas deleted the fix/tool-error-handling branch July 31, 2025 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/docs Changes to documentation and guides type/docs Documentation updates and improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant