Skip to content

Add builtin_tools to Agent #2102

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

Merged
merged 92 commits into from
Aug 7, 2025
Merged

Add builtin_tools to Agent #2102

merged 92 commits into from
Aug 7, 2025

Conversation

mattbrandman
Copy link
Contributor

@mattbrandman mattbrandman commented Jun 30, 2025

Fixes test and merge conflicts for #1722

Closes #840

Kludex and others added 30 commits May 14, 2025 11:00
- Added builtin_tools field to ModelRequestParameters
- Merged new output_mode and output_object fields from main
- Updated test snapshots to include all fields
- Resolved import conflicts to include both builtin tools and profiles
@mattbrandman mattbrandman requested a review from DouweM August 6, 2025 16:56
@@ -19,3 +19,4 @@ node_modules/
**.idea/
.coverage*
/test_tmp/
.mcp.json
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For curiosity, why MCP servers did you use here?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Groq is broken now. 😢

I'm not sure why the VCR test is passing... But this doesn't work anymore.

@Kludex
Copy link
Member

Kludex commented Aug 7, 2025

The only one that returns BuiltinToolCallPart and BuiltinToolReturnPart is Anthropic?

Copy link
Member

@Kludex Kludex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We just need to clarify Groq. I've added a lot of tests.

Comment on lines 320 to 331
if isinstance(tool, WebSearchTool):
# Groq uses the web_search tool similar to Anthropic
# Based on https://console.groq.com/docs/agentic-tooling
web_search_tool: chat.ChatCompletionToolParam = {
'type': 'function',
'function': {
'name': 'web_search',
'description': 'Search the web for information',
'parameters': {'type': 'object', 'properties': {}, 'required': []},
},
}
tools.append(web_search_tool)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where did you see this being passed?

I don't think we need to pass anything to Groq. If using compoung-beta models, it will use it.

See https://console.groq.com/docs/web-search.

"""

city: str
country: str
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This check doesn't seem necessary. It seems it works fine with 3 characters.

Copy link
Contributor

hyperlint-ai bot commented Aug 7, 2025

PR Change Summary

Added builtin_tools to the Agent, resolving merge conflicts and fixing tests.

  • Introduced builtin_tools documentation for the Agent
  • Resolved merge conflicts from a previous pull request
  • Fixed related tests to ensure functionality

Added Files

  • docs/api/builtin_tools.md

How can I customize these reviews?

Check out the Hyperlint AI Reviewer docs for more information on how to customize the review.

If you just want to ignore it on this PR, you can add the hyperlint-ignore label to the PR. Future changes won't trigger a Hyperlint review.

Note specifically for link checks, we only check the first 30 links in a file and we cache the results for several hours (for instance, if you just added a page, you might experience this). Our recommendation is to add hyperlint-ignore to the PR to ignore the link check for this PR.

@Kludex Kludex merged commit 1a22d68 into pydantic:main Aug 7, 2025
19 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.

Support built-in tools
9 participants