Skip to content

Fix typos and update async for loop variable #1122

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 1 commit into from
Jul 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/agents/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ class Agent(AgentBase, Generic[TContext]):
The final output will be the output of the first matching tool call. The LLM does not
process the result of the tool call.
- A function: If you pass a function, it will be called with the run context and the list of
tool results. It must return a `ToolToFinalOutputResult`, which determines whether the tool
tool results. It must return a `ToolsToFinalOutputResult`, which determines whether the tool
calls result in a final output.

NOTE: This configuration is specific to FunctionTools. Hosted tools, such as file search,
Expand Down
2 changes: 1 addition & 1 deletion src/agents/tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ class MCPToolApprovalFunctionResult(TypedDict):
@dataclass
class HostedMCPTool:
"""A tool that allows the LLM to use a remote MCP server. The LLM will automatically list and
call tools, without requiring a a round trip back to your code.
call tools, without requiring a round trip back to your code.
If you want to run MCP servers locally via stdio, in a VPC or other non-publicly-accessible
environment, or you just prefer to run tool calls locally, then you can instead use the servers
in `agents.mcp` and pass `Agent(mcp_servers=[...])` to the agent."""
Expand Down
2 changes: 1 addition & 1 deletion tests/test_session_exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ async def test_end_to_end_exception_propagation_and_cleanup(
async with session:
# Try to iterate and expect exception
with pytest.raises(ValueError, match="Test error"):
async for _event in session:
async for _ in session:
pass # Should never reach here

# Verify cleanup occurred
Expand Down