Skip to content

Commit d090ff9

Browse files
authored
Merge branch 'main' into feat/add-response-id-streaming
2 parents eaba976 + 3b7f299 commit d090ff9

File tree

89 files changed

+7371
-6841
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

89 files changed

+7371
-6841
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,6 @@ jobs:
2929
- name: Install dependencies
3030
run: uv sync --all-extras --all-packages --group lint
3131

32-
- uses: denoland/setup-deno@v2
33-
with:
34-
deno-version: v2.x
35-
3632
- uses: pre-commit/[email protected]
3733
with:
3834
extra_args: --all-files --verbose
@@ -162,6 +158,7 @@ jobs:
162158

163159
- run: mkdir .coverage
164160

161+
- run: uv run mcp-run-python example --deps=numpy
165162
- run: uv sync --only-dev
166163
- run: uv run ${{ matrix.install.command }} coverage run -m pytest --durations=100 -n auto --dist=loadgroup
167164
env:
@@ -200,6 +197,7 @@ jobs:
200197
- run: mkdir .coverage
201198

202199
- run: uv sync --group dev
200+
- run: uv run mcp-run-python example --deps=numpy
203201

204202
- run: unset UV_FROZEN
205203

@@ -232,10 +230,6 @@ jobs:
232230
with:
233231
enable-cache: true
234232

235-
- uses: denoland/setup-deno@v2
236-
with:
237-
deno-version: v2.x
238-
239233
- run: uv run --all-extras python tests/import_examples.py
240234

241235
coverage:
@@ -272,29 +266,6 @@ jobs:
272266
path: htmlcov
273267
include-hidden-files: true
274268

275-
test-mcp-run-python:
276-
runs-on: ubuntu-latest
277-
timeout-minutes: 5
278-
env:
279-
UV_PYTHON: "3.12"
280-
steps:
281-
- uses: actions/checkout@v4
282-
283-
- uses: astral-sh/setup-uv@v5
284-
with:
285-
enable-cache: true
286-
287-
- uses: denoland/setup-deno@v2
288-
with:
289-
deno-version: v2.x
290-
291-
- run: make lint-js
292-
293-
- run: uv run --package mcp-run-python pytest mcp-run-python -v --durations=100
294-
295-
- run: deno task dev warmup
296-
working-directory: mcp-run-python
297-
298269
# https://github.com/marketplace/actions/alls-green#why used for branch protection checks
299270
check:
300271
if: always()
@@ -307,7 +278,6 @@ jobs:
307278
- test-lowest-versions
308279
- test-examples
309280
- coverage
310-
- test-mcp-run-python
311281
runs-on: ubuntu-latest
312282

313283
steps:

.pre-commit-config.yaml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,6 @@ repos:
4444
types: [python]
4545
language: system
4646
pass_filenames: false
47-
- id: lint-js
48-
name: Lint JS
49-
entry: make
50-
args: [lint-js]
51-
language: system
52-
types_or: [javascript, ts, json]
53-
files: "^mcp-run-python/"
54-
pass_filenames: false
5547
- id: clai-help
5648
name: clai help output
5749
entry: uv

CLAUDE.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ This is a uv workspace with multiple packages:
8383
- **`pydantic_graph/`**: Graph execution engine
8484
- **`examples/`**: Example applications
8585
- **`clai/`**: CLI tool
86-
- **`mcp-run-python/`**: MCP server implementation (Deno/TypeScript)
8786

8887
## Testing Strategy
8988

Makefile

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,8 @@
88
.pre-commit: ## Check that pre-commit is installed
99
@pre-commit -V || echo 'Please install pre-commit: https://pre-commit.com/'
1010

11-
.PHONY: .deno
12-
.deno: ## Check that deno is installed
13-
@deno --version > /dev/null 2>&1 || (printf "\033[0;31m✖ Error: deno is not installed, but is needed for mcp-run-python\033[0m\n Please install deno: https://docs.deno.com/runtime/getting_started/installation/\n" && exit 1)
14-
1511
.PHONY: install
16-
install: .uv .pre-commit .deno ## Install the package, dependencies, and pre-commit for local development
12+
install: .uv .pre-commit ## Install the package, dependencies, and pre-commit for local development
1713
uv sync --frozen --all-extras --all-packages --group lint --group docs
1814
pre-commit install --install-hooks
1915

@@ -38,10 +34,6 @@ lint: ## Lint the code
3834
uv run ruff format --check
3935
uv run ruff check
4036

41-
.PHONY: lint-js
42-
lint-js: ## Lint JS and TS code
43-
cd mcp-run-python && deno task lint-format
44-
4537
.PHONY: typecheck-pyright
4638
typecheck-pyright:
4739
@# PYRIGHT_PYTHON_IGNORE_WARNINGS avoids the overhead of making a request to github on every invocation
@@ -77,11 +69,6 @@ testcov: test ## Run tests and generate an HTML coverage report
7769
@echo "building coverage html"
7870
@uv run coverage html
7971

80-
.PHONY: test-mrp
81-
test-mrp: ## Build and tests of mcp-run-python
82-
cd mcp-run-python && deno task build
83-
uv run --package mcp-run-python pytest mcp-run-python -v
84-
8572
.PHONY: update-examples
8673
update-examples: ## Update documentation examples
8774
uv run -m pytest --update-examples tests/test_examples.py

docs/builtin-tools.md

Lines changed: 27 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# Builtin Tools
22

3-
Builtin tools are native tools provided by LLM providers that can be used to enhance your agent's capabilities. Unlike [common tools](common-tools.md), which are custom implementations that PydanticAI executes, builtin tools are executed directly by the model provider.
3+
Builtin tools are native tools provided by LLM providers that can be used to enhance your agent's capabilities. Unlike [common tools](common-tools.md), which are custom implementations that Pydantic AI executes, builtin tools are executed directly by the model provider.
44

55
## Overview
66

7-
PydanticAI supports the following builtin tools:
7+
Pydantic AI supports the following builtin tools:
88

99
- **[`WebSearchTool`][pydantic_ai.builtin_tools.WebSearchTool]**: Allows agents to search the web
1010
- **[`CodeExecutionTool`][pydantic_ai.builtin_tools.CodeExecutionTool]**: Enables agents to execute code in a secure environment
@@ -13,7 +13,9 @@ PydanticAI supports the following builtin tools:
1313
These tools are passed to the agent via the `builtin_tools` parameter and are executed by the model provider's infrastructure.
1414

1515
!!! warning "Provider Support"
16-
Not all model providers support builtin tools. If you use a builtin tool with an unsupported provider, PydanticAI will raise a [`UserError`][pydantic_ai.exceptions.UserError] when you try to run the agent.
16+
Not all model providers support builtin tools. If you use a builtin tool with an unsupported provider, Pydantic AI will raise a [`UserError`][pydantic_ai.exceptions.UserError] when you try to run the agent.
17+
18+
If a provider supports a built-in tool that is not currently supported by Pydantic AI, please file an issue.
1719

1820
## Web Search Tool
1921

@@ -26,16 +28,13 @@ making it ideal for queries that require up-to-date data.
2628
|----------|-----------|-------|
2729
| OpenAI || Full feature support |
2830
| Anthropic || Full feature support |
29-
| Groq || Limited parameter support |
30-
| Google || No parameter support |
31+
| Groq || Limited parameter support. To use web search capabilities with Groq, you need to use the [compound models](https://console.groq.com/docs/compound). |
32+
| Google || No parameter support. Google does not support using built-in tools and user tools (including [output tools](output.md#tool-output)) at the same time. To use structured output, use [`PromptedOutput`](output.md#prompted-output) instead. |
3133
| Bedrock || Not supported |
3234
| Mistral || Not supported |
3335
| Cohere || Not supported |
3436
| HuggingFace || Not supported |
3537

36-
!!! note "Groq Support"
37-
To use web search capabilities with Groq, you need to use the [compound models](https://console.groq.com/docs/compound).
38-
3938
### Usage
4039

4140
```py title="web_search_basic.py"
@@ -97,16 +96,16 @@ in a secure environment, making it perfect for computational tasks, data analysi
9796

9897
### Provider Support
9998

100-
| Provider | Supported |
101-
|----------|-----------|
102-
| OpenAI ||
103-
| Anthropic ||
104-
| Google ||
105-
| Groq ||
106-
| Bedrock ||
107-
| Mistral ||
108-
| Cohere ||
109-
| HuggingFace ||
99+
| Provider | Supported | Notes |
100+
|----------|-----------|-------|
101+
| OpenAI || |
102+
| Anthropic || Google does not support using built-in tools and user tools (including [output tools](output.md#tool-output)) at the same time. To use structured output, use [`PromptedOutput`](output.md#prompted-output) instead. |
103+
| Google || |
104+
| Groq || |
105+
| Bedrock || |
106+
| Mistral || |
107+
| Cohere || |
108+
| HuggingFace || |
110109

111110
### Usage
112111

@@ -126,16 +125,16 @@ allowing it to pull up-to-date information from the web.
126125

127126
### Provider Support
128127

129-
| Provider | Supported |
130-
|----------|-----------|
131-
| Google ||
132-
| OpenAI ||
133-
| Anthropic ||
134-
| Groq ||
135-
| Bedrock ||
136-
| Mistral ||
137-
| Cohere ||
138-
| HuggingFace ||
128+
| Provider | Supported | Notes |
129+
|----------|-----------|-------|
130+
| Google || Google does not support using built-in tools and user tools (including [output tools](output.md#tool-output)) at the same time. To use structured output, use [`PromptedOutput`](output.md#prompted-output) instead. |
131+
| OpenAI || |
132+
| Anthropic || |
133+
| Groq || |
134+
| Bedrock || |
135+
| Mistral || |
136+
| Cohere || |
137+
| HuggingFace || |
139138

140139
### Usage
141140

0 commit comments

Comments
 (0)