Skip to content

Commit 8b42bb8

Browse files
committed
Addressing more comments
1 parent 6a47839 commit 8b42bb8

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pydantic_ai_slim/pydantic_ai/models/openai.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1252,12 +1252,16 @@ def _get_builtin_tools(self, model_request_parameters: ModelRequestParameters) -
12521252
server_label=tool.id,
12531253
require_approval='never',
12541254
)
1255+
12551256
if tool.authorization_token:
12561257
mcp_tool['authorization'] = tool.authorization_token
1258+
12571259
if tool.allowed_tools:
12581260
mcp_tool['allowed_tools'] = tool.allowed_tools
1261+
12591262
if tool.description: # pragma: no cover
12601263
mcp_tool['server_description'] = tool.description
1264+
12611265
if tool.headers: # pragma: no cover
12621266
mcp_tool['headers'] = tool.headers
12631267

@@ -1266,10 +1270,12 @@ def _get_builtin_tools(self, model_request_parameters: ModelRequestParameters) -
12661270
_, connector_id = tool.url.split(':', maxsplit=1)
12671271
else:
12681272
url = tool.url
1273+
12691274
if url:
12701275
mcp_tool['server_url'] = tool.url
12711276
elif connector_id: # pragma: no cover
12721277
mcp_tool['connector_id'] = connector_id # pyright: ignore[reportGeneralTypeIssues]
1278+
12731279
tools.append(mcp_tool)
12741280
elif isinstance(tool, ImageGenerationTool): # pragma: no branch
12751281
has_image_generating_tool = True

0 commit comments

Comments
 (0)