Skip to content

Conversation

steven10a
Copy link
Contributor

@steven10a steven10a commented Sep 23, 2025

  • This PR was started from PR 1606: Tool Guardrails
  • It adds input and output guardrails at the tool level which can trigger ToolInputGuardrailTripwireTriggered and ToolOutputGuardrailTripwireTriggered exceptions
  • It includes updated documentation, a runnable example, and unit tests
  • make check and unit tests all pass

Edits since last review:

  • Extracted nested tool running logic in _run_impl.py
  • Added rejecting tool call or tool call output and returning a message to the model (rather than only raising an exception)
  • Added the tool guardrail results to the RunResult
  • Removed docs

@seratch seratch added enhancement New feature or request feature:core labels Sep 24, 2025
@steven10a steven10a force-pushed the dev/steven/tool_guardrails branch from 03962fa to 55c949a Compare September 25, 2025 14:22
@steven10a steven10a requested a review from rm-openai September 25, 2025 15:59
Copy link
Collaborator

@rm-openai rm-openai left a comment

Choose a reason for hiding this comment

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

nice!

@rm-openai rm-openai merged commit 22a63aa into openai:main Sep 26, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feature:core
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants