Skip to content

fix: @tool_method on pydantic base models#237

Merged
monoxgas merged 2 commits intomainfrom
fix/tool-method-on-pydantic-models
Aug 1, 2025
Merged

fix: @tool_method on pydantic base models#237
monoxgas merged 2 commits intomainfrom
fix/tool-method-on-pydantic-models

Conversation

@monoxgas
Copy link
Copy Markdown
Contributor

@monoxgas monoxgas commented Aug 1, 2025

Notes

  • Fix support for applying @tool_method to pydantic base model classes.
  • Migrate a bunch of optional import logic to be lazy.
  • Clean up dependencies and typing for optional packages.

Generated Summary

  • Refactored type annotations and type ignore comments across multiple modules (e.g. using string annotations for forward references and adjusting spacing in type ignore directives).
  • Updated dependency extras in pyproject.toml: moved elasticsearch and pandas from the default dependency group to the "rigging[data]" and "rigging[llm]" extras.
  • Modified function signatures to import dependencies locally with appropriate error messages when dependencies (like pandas or elasticsearch) are missing.
  • Revised the ToolMethod implementation in rigging/tools/base.py to correctly handle bound and unbound tool methods, using a DEFAULT_CATCH_EXCEPTIONS set.
  • Added or adjusted default parameters (e.g. default log_level in logging configuration) to improve API consistency.
  • Improved tests in tests/test_tool.py to validate tool method binding and decorator argument handling.

This summary was generated with ❤️ by rigging

…Migrate a bunch of optional import logic to be lazy. Clean up dependencies and typing for optional packages.
@monoxgas monoxgas requested a review from a team as a code owner August 1, 2025 07:46
@dreadnode-renovate-bot dreadnode-renovate-bot bot added area/docs Changes to documentation and guides area/pre-commit Changes made to pre-commit hooks area/python Changes to Python package configuration and dependencies area/tests Changes to test files and testing infrastructure type/docs Documentation updates and improvements labels Aug 1, 2025
@monoxgas monoxgas merged commit bfe4c45 into main Aug 1, 2025
7 checks passed
@monoxgas monoxgas deleted the fix/tool-method-on-pydantic-models branch November 13, 2025 22:34
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 area/pre-commit Changes made to pre-commit hooks area/python Changes to Python package configuration and dependencies area/tests Changes to test files and testing infrastructure type/docs Documentation updates and improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant