Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(tools): introduce agent-level tool support configuration #476

Merged
merged 4 commits into from
Mar 9, 2025

Conversation

tusharmath
Copy link
Collaborator

Description

This PR changes how tool support is configured in the application by moving it from the provider level to the agent configuration level.

Key Changes

  1. Added a new 'tool_supported' Boolean field to the Agent struct to explicitly control whether tools are available to the LLM
  2. Modified the system context to use this flag directly instead of querying provider parameters
  3. Updated the README documentation with details about the new configuration option
  4. Removed the deprecated parameters() method from ProviderService and its implementations

Benefits

  • Simplified architecture by removing a provider-level API call
  • Improved control over tool behavior at the agent configuration level
  • Added the ability to force XML-based tool calls even for models that natively support tools

Testing

All tests pass with the new implementation.

Resolves: #123 (placeholder issue number)

Remove deprecated  method from the ProviderService trait and all its implementations.
The method was marked as deprecated because tool support is now determined by the  field
in the Agent struct instead of querying the provider.

This change includes:
- Removing the method from the trait definition in forge_domain
- Removing implementations in OpenRouter, Anthropic, Client, and ForgeProviderService
- Cleaning up related code (imports, cache field, unused helper methods)

Related issue: #123 (placeholder issue number)
@tusharmath tusharmath enabled auto-merge (squash) March 9, 2025 07:22
@tusharmath tusharmath merged commit b8c3057 into main Mar 9, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant