Skip to content

Remove OpenAI Agents integration - #1868

Merged
tconley1428 merged 23 commits into
mainfrom
remove-openai-agents-integration
Oct 1, 2026
Merged

tconley1428 merged 23 commits into
mainfrom
remove-openai-agents-integration

Conversation

@brianstrauch

@brianstrauch brianstrauch commented Sep 15, 2026 •

Copy link
Copy Markdown
Member

Summary

  • remove the bundled OpenAI Agents implementation and its SDK-owned test suite
  • retain temporalio[openai-agents] as a forwarding extra that installs temporalio-openai-agents
  • preserve the old public temporalio.contrib.openai_agents imports with explicit compatibility modules
  • make temporalio.openai_agents the canonical standalone import path
  • remove the temporalio.contrib.__getattr__ migration hook
  • extend the temporalio package path so editable standalone plugins can be discovered
  • remove the dedicated CI step and CODEOWNERS entries for the formerly bundled implementation

This is the SDK half of the OpenAI Agents plugin cutover. The standalone distribution installs under temporalio.openai_agents, so it can coexist with an SDK-bundled temporalio.contrib.openai_agents implementation without sharing files.

Release order

temporalio-openai-agents 1.0.0 is published on PyPI. The two-week dependency age window has passed, and this branch now locks the published package without a per-package override.

  1. Prepare OpenAI Agents package cutover ai-integrations#23 was merged, and temporalio-openai-agents 1.0.0 was published through its normal release workflow.
  2. The lockfile was regenerated and local validation completed. GitHub CI runs on the updated branch.
  3. Merge this PR and publish the Temporal SDK release after review and CI pass.

Migration

Remove the openai-agents extra from the existing Temporal dependency and install the standalone package directly:

# Before
dependencies = [
    "temporalio[openai-agents,otel,pydantic]",
]

# After
dependencies = [
    "temporalio[otel,pydantic]",
]

Remove the brackets if no extras remain. Then install the standalone package:

uv add temporalio-openai-agents

Change application imports to the standalone package:

from temporalio.openai_agents import OpenAIAgentsPlugin

The new import path selects the standalone implementation instead of the SDK-bundled temporalio.contrib.openai_agents implementation.

The forwarding extra and old public imports remain available for compatibility, but direct dependency on temporalio-openai-agents and the temporalio.openai_agents import are the recommended migration.

Validation

Completed on macOS with Python 3.14:

  • uv lock --check
  • uv sync --all-extras
  • poe build-develop
  • poe lint
  • poe test -s -k openai_agents_compatibility (2 passed)

The full SDK test matrix runs in CI.

@brianstrauch
brianstrauch requested review from a team as code owners September 15, 2026 22:19
@brianstrauch
brianstrauch marked this pull request as draft September 15, 2026 22:19
@brianstrauch
brianstrauch marked this pull request as draft September 16, 2026 02:57
@brianstrauch
brianstrauch marked this pull request as ready for review September 16, 2026 21:09
Comment thread temporalio/__init__.py Resolved
Comment thread pyproject.toml Resolved
@brianstrauch
brianstrauch marked this pull request as ready for review September 30, 2026 21:05
@DABH

DABH commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Side note from watching this branch's CI: maturin develop --uv now downloads PyPI temporalio==1.33.0 (12.9 MiB) before overwriting it with the local build, because the dev dependency temporalio-openai-agents depends on temporalio[opentelemetry,pydantic]. Tests still import the source tree, so results are fine, but a [tool.uv.sources] override for temporalio (or --no-deps on that install) would save the round trip and avoid a surprise if the PyPI version ever diverges from the tree.

Separately, the test_opentelemetry_safe_detach failures on the macos-arm lanes here are deterministic, not flaky: with the OpenAI Agents suite gone, strands tests (which enable OpenTelemetry's ThreadingInstrumentor) now share an xdist worker with that test and defeat the interceptor's detach guard. Fix in #1911; once it lands and you merge main, those lanes should settle.

@tconley1428
tconley1428 merged commit 6e66be6 into main Oct 1, 2026
45 of 49 checks passed
@tconley1428
tconley1428 deleted the remove-openai-agents-integration branch October 1, 2026 15:55
tconley1428 pushed a commit that referenced this pull request Oct 5, 2026
The OpenAI Agents OTel interceptor, the only caller of seed_span_id and
seed_trace_id, now propagates the caller's span as a remote parent instead
of re-minting it under the caller's IDs (temporalio/ai-integrations#26), and
#1868 removes it from this repository. Drop the two methods, their
context-local seed queues, the seed-consumption branches in the generate_*
methods, and the test that only exercised the seeding.
tconley1428 pushed a commit that referenced this pull request Oct 5, 2026
* Remove TemporalIdGenerator span/trace ID seeding

The OpenAI Agents OTel interceptor, the only caller of seed_span_id and
seed_trace_id, now propagates the caller's span as a remote parent instead
of re-minting it under the caller's IDs (temporalio/ai-integrations#26), and
#1868 removes it from this repository. Drop the two methods, their
context-local seed queues, the seed-consumption branches in the generate_*
methods, and the test that only exercised the seeding.

* condense changelog
osamastro7-droid pushed a commit to osamastro7-droid/ai-integrations that referenced this pull request Oct 9, 2026
* Remove OpenAI Agents integration

* Add OpenAI Agents migration error

* Load standalone OpenAI Agents module

* Keep contrib migration helpers private

* Forward OpenAI Agents extra to standalone package

* Apply suggestion from @brianstrauch

* Add OpenAI Agents migration guide

* Recommend direct OpenAI Agents dependency

* Remove SDK upgrade from migration steps

* Remove versions from migration guide

* Simplify OpenAI Agents migration steps

* Apply batched suggestions from code review

Co-authored-by: Brian Strauch <brian@brianstrauch.com>

* Deprecate OpenAI Agents compatibility imports

* Lock released OpenAI Agents integration

* Address OpenAI integration review feedback

* Explain Temporal namespace extension

* Fix OpenAI Agents compatibility documentation references

* Remove OpenAI Agents compatibility deprecations

* Discover and forward OpenAI Agents public modules

* Preserve typed OpenAI Agents compatibility imports

Migrated-From: temporalio/sdk-python@6e66be6
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.

3 participants