Skip to content

feat: add tool decorator alias#3920

Merged
seratch merged 1 commit into
mainfrom
feat/tool-decorator-alias
Jul 23, 2026
Merged

feat: add tool decorator alias#3920
seratch merged 1 commit into
mainfrom
feat/tool-decorator-alias

Conversation

@seratch

@seratch seratch commented Jul 23, 2026

Copy link
Copy Markdown
Member

This pull request adds an agents.decorators module that provides a shorter tool alias for function_tool and re-exports the SDK's existing public decorators.

The alias preserves exact runtime and typing behavior while avoiding a package-root naming conflict with the existing agents.tool module. function_tool remains fully supported and importable from both agents and agents.decorators; it is not deprecated.

The function-tools documentation now recommends @tool for new code and includes the new decorators API reference.

@seratch seratch added this to the 0.19.x milestone Jul 23, 2026
@seratch

seratch commented Jul 23, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7f81be7bb2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/agents/decorators.py
@chatgpt-codex-connector

Copy link
Copy Markdown

Security review completed. No security issues were found in this pull request.

Reviewed commit: 7f81be7bb2

View security finding report

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@seratch
seratch merged commit 509b414 into main Jul 23, 2026
9 checks passed
@seratch
seratch deleted the feat/tool-decorator-alias branch July 23, 2026 09:04
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.

1 participant