Skip to content

Conversation

@saurabh-sikchi
Copy link

@saurabh-sikchi saurabh-sikchi commented Nov 26, 2025

What this does

Fixes cleanup_orphaned_tool_results ignoring custom association names configured via acts_as_tool_call message: and acts_as_message tool_calls: options.

The bug: When using custom association names like acts_as_tool_call message: :llm_message, the cleanup method called hardcoded .message and .tool_calls instead of the configured association names, causing NoMethodError.

The fix: Use message_association and tool_calls_association methods, which respect the configured names.

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation
  • Performance improvement

Scope check

  • I read the Contributing Guide
  • This aligns with RubyLLM's focus on LLM communication
  • This isn't application-specific logic that belongs in user code
  • This benefits most users, not just my specific use case

Quality check

  • I ran overcommit --install and all hooks pass
  • I tested my changes thoroughly
    • For provider changes: Re-recorded VCR cassettes with bundle exec rake vcr:record[provider_name]
    • All tests pass: bundle exec rspec
  • I updated documentation if needed
  • I didn't modify auto-generated files manually (models.json, aliases.json)

API changes

  • Breaking change
  • New public methods/classes
  • Changed method signatures
  • No API changes

Related issues

#514

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.

1 participant