Skip to content

💥 Streamline OpenAI module layout - #947

Merged
tconley1428 merged 14 commits into
mainfrom
openai_module_layout
Jul 8, 2025
Merged

💥 Streamline OpenAI module layout#947
tconley1428 merged 14 commits into
mainfrom
openai_module_layout

Conversation

@tconley1428

@tconley1428 tconley1428 commented Jul 8, 2025

Copy link
Copy Markdown
Contributor

What was changed

Consolidated exposed objects from the openai agents module.

Why?

Easier use

Checklist

  1. Closes

  2. How was this tested:
    Existing tests

  3. Any docs updates needed?
    OpenAI readme and samples will need to be updated.

@tconley1428
tconley1428 requested a review from a team as a code owner July 8, 2025 15:39
Comment thread temporalio/contrib/openai_agents/temporal_openai_agents.py
Comment thread temporalio/contrib/openai_agents/__init__.py Outdated
Comment thread temporalio/contrib/openai_agents/temporal_openai_agents.py Outdated
Comment thread temporalio/contrib/openai_agents/temporal_openai_agents.py
@cretz

cretz commented Jul 8, 2025

Copy link
Copy Markdown
Contributor

Let's also make sure to put a big 💥 on this PR as breaking compatibility. Doesn't have to be on PR title, can just be in description, we just need to make sure we call it out in next release notes.

@tconley1428 tconley1428 changed the title Streamline OpenAI module layout 💥 Streamline OpenAI module layout Jul 8, 2025

@cretz cretz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nothing blocking. We'll need to remember when we get to release time to 1) update release notes, and 2) update samples.

Comment on lines +17 to +18
TestModel,
TestModelProvider,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is a bit more than "streamline OpenAI module layout", this gets into testing approach. We can leave in this PR since it's all alpha/experimental anyways, but would like to have a discussion on ideas/approaches for a test harness here (which may end up looking similar).

@tconley1428
tconley1428 merged commit 61af3ea into main Jul 8, 2025
26 of 27 checks passed
@tconley1428
tconley1428 deleted the openai_module_layout branch July 8, 2025 17:37
tconley1428 added a commit that referenced this pull request Aug 28, 2025
* WIP module layout overhaul

* WIP. Mostly test model changes

* Finish decorator definition and docstrings

* Also tag activity_as_tool as a temporal tool

* Remove temporal only tool restriction

* Rearrange imports

* Fix 3.9 typing

* Addressing comments

* Updating readme

* Remove ellipsis

* Fix linting

* Reduce research workflow quantity, extend timeout
DABH added a commit that referenced this pull request Aug 10, 2026
BREAKING CHANGE: `temporalio.contrib.google_adk_agents.workflow.activity_tool`
is renamed to `activity_as_tool`, with no compatibility alias.

Every other Temporal plugin that wraps an activity as an agent tool names
the helper `activity_as_tool`: openai_agents, strands (plus
`activity_as_hook`), and google_genai. google_adk_agents was the only
outlier at `activity_tool`.

The divergence is also cross-language. sdk-go's plugin for the same
framework already uses `ActivityAsTool`, with `ActivityToolOptions` for
the options struct and `activityTool` for the private impl type -- the
verb names the conversion, the noun names the result. Python used the
noun for the verb. sdk-typescript uses `activityAsTool` in its
openai-agents and strands plugins. Left alone, a Go user and a Python
user reading Temporal's Google ADK guide see different names for the
same primitive.

No compatibility alias. The ADK integration is Pre-release at every
level -- the docs page carries a prerelease banner, the 1.24.0 release
notes list it under Pre-release, and the function docstring warns it is
experimental -- and Temporal's published policy for that stage is
"Experimental; API is subject to change". This matches how prior plugin
renames landed (#1139 made `set_open_ai_agent_temporal_overrides`
private, #947 privatized the openai_agents module layout), neither of
which shipped an alias.

Mechanical only. `**kwargs: Any` on this helper is still out of step with
the siblings, which enumerate activity options explicitly or take an
`ActivityConfig`, and the docstring's "Decorator/Wrapper" claim is wrong
(`@activity_as_tool(...)` parameterized use fails). Both are left for a
follow-up so this diff stays reviewable as a rename.

Docs and samples PRs follow once this merges: temporalio/documentation
(docs/develop/python/integrations/google-adk.mdx), samples-python
(google_adk_agents/), and google/adk-docs
(docs/integrations/temporal.md).
DABH added a commit that referenced this pull request Aug 11, 2026
…1735)

BREAKING CHANGE: `temporalio.contrib.google_adk_agents.workflow.activity_tool`
is renamed to `activity_as_tool`, with no compatibility alias.

Every other Temporal plugin that wraps an activity as an agent tool names
the helper `activity_as_tool`: openai_agents, strands (plus
`activity_as_hook`), and google_genai. google_adk_agents was the only
outlier at `activity_tool`.

The divergence is also cross-language. sdk-go's plugin for the same
framework already uses `ActivityAsTool`, with `ActivityToolOptions` for
the options struct and `activityTool` for the private impl type -- the
verb names the conversion, the noun names the result. Python used the
noun for the verb. sdk-typescript uses `activityAsTool` in its
openai-agents and strands plugins. Left alone, a Go user and a Python
user reading Temporal's Google ADK guide see different names for the
same primitive.

No compatibility alias. The ADK integration is Pre-release at every
level -- the docs page carries a prerelease banner, the 1.24.0 release
notes list it under Pre-release, and the function docstring warns it is
experimental -- and Temporal's published policy for that stage is
"Experimental; API is subject to change". This matches how prior plugin
renames landed (#1139 made `set_open_ai_agent_temporal_overrides`
private, #947 privatized the openai_agents module layout), neither of
which shipped an alias.

Mechanical only. `**kwargs: Any` on this helper is still out of step with
the siblings, which enumerate activity options explicitly or take an
`ActivityConfig`, and the docstring's "Decorator/Wrapper" claim is wrong
(`@activity_as_tool(...)` parameterized use fails). Both are left for a
follow-up so this diff stays reviewable as a rename.

Docs and samples PRs follow once this merges: temporalio/documentation
(docs/develop/python/integrations/google-adk.mdx), samples-python
(google_adk_agents/), and google/adk-docs
(docs/integrations/temporal.md).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants