Skip to content

fix(deps): allow temporalio 1.35 and openai-agents 0.20 - #567

Merged
gergelyhunyady merged 8 commits into
mainfrom
fix/allow-temporalio-1.35
Nov 9, 2026
Merged

gergelyhunyady merged 8 commits into
mainfrom
fix/allow-temporalio-1.35

Conversation

@scale-ballen

@scale-ballen scale-ballen commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

What changes

  • adk/pyproject.toml:
    • temporalio>=1.26.0,<1.35 becomes temporalio>=1.35.0,<2.
    • Adds temporalio-openai-agents>=1.0.0,<2.
    • openai-agents>=0.14.3,<0.15 becomes openai-agents>=0.20,<0.23.
    • openai>=2.2,<2.45 becomes openai>=2.45,<4. The <2.45 cap only existed because openai-agents 0.14 could not build InputTokensDetails on openai 2.45+.
  • temporal_streaming_model.py passes cache_write_tokens, which openai 2.45 made a required field of InputTokensDetails. It reads the value from the streamed usage and falls back to 0. Three test files get the same field.
  • The temporal-openai-agents and sync-openai-agents-local-sandbox init templates, five Temporal tutorials and the procurement demo now pin temporalio[openai-agents]>=1.35.0,<2 and openai-agents>=0.20,<0.23. These replace the pins added in fix(deps): cap temporalio below 1.35 #556.
  • uv.lock changes:
    • temporalio 1.27.2 → 1.35.0
    • temporalio-openai-agents 1.0.0 added
    • openai-agents 0.14.8 → 0.20.0
    • openai 2.40.0 → 2.54.0

Why

#556 capped temporalio below 1.35 because 1.35 moved the OpenAI Agents integration out of the core wheel. This PR is the follow-up #556 described. The integration now ships as temporalio-openai-agents, which needs openai-agents 0.20 or later. temporalio.contrib.openai_agents remains as a shim that re-exports the new package. With that package installed, the SDK's existing imports work unchanged.

The cap also blocks dependency fixes. temporalio bundles a Rust bridge (temporalio/bridge/Cargo.lock). 1.35.0 is the first release that ships rustls >=0.23.46 and zip >=9.0.5. While agentex-sdk caps temporalio below 1.35, projects that depend on it can't pick up those versions.

Breaking changes reviewed

  • temporalio 1.35:
    • The OpenAI Agents integration moved to its own package. This PR adds it as a direct dependency, and the contrib imports still resolve.
    • It also removed TemporalIdGenerator.seed_span_id() and seed_trace_id(), and it rejects naive datetimes in typed search attributes. The SDK uses neither.
  • openai-agents 0.15–0.20:
    • The implicit default model changed: gpt-5.4-mini in 0.16, then gpt-5.6-luna in 0.20. This only affects agents that don't set a model.
    • 0.20 adds optional support for MCP v2. That only matters for apps with custom local HTTP transports. The lock keeps mcp at 1.27.2.
    • Pyright found no API breaks other than cache_write_tokens.
  • The temporalio floor is now 1.35. This is deliberate. It keeps the plugin import path and the openai-agents range consistent.

Checks

  • uv lock --check passes.
  • ./scripts/lint passes: ruff, pyright (0 errors), and import agentex.
  • ./scripts/check-slim-deps passes.
  • ./scripts/test on Python 3.12: 1774 passed, 1622 skipped. The skipped tests need the mock server, which CI runs.
  • A smoke test passes on temporalio 1.35.0, temporalio-openai-agents 1.0.0 and openai-agents 0.20.0. It imports OpenAIAgentsPlugin and ModelActivityParameters from temporalio.contrib.openai_agents, imports the worker, temporal client utils and plugin modules, and constructs the plugin.
  • Not done: the tutorial agents were not run end to end against a live Temporal server.

Release

This PR does not release anything. After merge, release-please adds a patch bump to its release PR.

🤖 Generated with Claude Code

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge; the previous test gap is addressed and no new blocking issue was found.

Summary

Updates Temporal and OpenAI dependencies and adds the standalone Temporal OpenAI Agents package.

  • Agentex projects can use Temporal 1.35 with newer OpenAI Agents packages.
  • Reasoning settings keep unset fields out of OpenAI requests.
  • Streamed usage keeps the cache-write token count.
  • Tutorial agents use a fixed OpenAI model.
  • The tutorial runner uses local SDK wheels with the tutorial environment.

Reviews (12) · Last reviewed commit: "test: assert cache_write_tokens is copie..." · Reviewed by Greptile

temporalio 1.35 moves the OpenAI Agents integration into the
temporalio-openai-agents package, which needs openai-agents 0.20+.
Depend on it directly, raise openai-agents to >=0.20,<0.23 and openai
to >=2.45,<4, and pass the now-required cache_write_tokens to
InputTokensDetails. Update the templates and examples capped in #556.

This lets consumers pick up temporalio 1.35's bundled Rust bridge with
fixed rustls (>=0.23.46) and zip (>=9.0.5).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@socket-security

socket-security Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedpypi/​openai-agents@​0.14.8 ⏵ 0.22.380 -7100100100100
Updatedpypi/​openai-agents@​0.14.8 ⏵ 0.20.085 -2100100100100
Updatedpypi/​openai@​2.40.0 ⏵ 2.54.090 -6100100100100
Addedpypi/​temporalio-openai-agents@​1.0.099100100100100

View full report

danielmillerp and others added 7 commits November 9, 2026 11:30
Tutorial CI failed on this branch for two reasons:

- uv run --with resolved each tutorial against the released agentex-sdk
  first, then overlaid the local wheel. Every released SDK caps
  openai-agents below 0.15, so the >=0.20 pins were unsatisfiable. The
  overlay also dropped tutorial extras, so 130_langgraph lost
  temporalio-langgraph on temporalio 1.35.
- The Docker builds install agentex-sdk from PyPI, where no release
  allows temporalio 1.35 yet.

run_agent_test.sh now resolves the tutorial and both wheels together
(--no-project --with-editable .). The tutorial pins are wide again, so
agentex-sdk picks the temporalio and openai-agents versions: the
released SDK today, 1.35 once this ships.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
openai-agents changed its implicit default model from gpt-4.1 (0.14) to
gpt-5.6-luna (0.20+). The new default writes a text preamble before
calling tools, so 040_other_sdks stopped seeing the tool request message
before the first agent text. Pin the model these tutorials were written
and tested against.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
temporalio-openai-agents ships two incompatible sets: 1.0 needs
openai-agents 0.20 with openai 2.x, and 1.1 needs openai-agents 0.22
with openai 3.x. The old ranges let a fresh install pick the 1.1 set,
which neither uv.lock nor the test suite covers, and the
010_agent_chat tutorial stopped responding on it. Narrow the ranges to
the 1.0 set. The locked versions don't change.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Five slow retries can hit the 15-minute job timeout before the
workflow's "Print agent logs on failure" step runs, so a timed-out
tutorial left no agent logs to debug from.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
ModelSettings.to_oai_model_settings() used model_dump(), which writes
every unset Reasoning field as an explicit None. openai 2.45+ added
Reasoning.mode, context and generate_summary. After a Temporal activity
round-trip, the Responses API got {"reasoning": {"mode": null}} and
returned 400 ("Invalid type for 'reasoning.mode'"). That is why
010_agent_chat stopped responding. Rebuild Reasoning from its set
fields only, and add a regression test.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The narrowing wasn't the cause of the 010_agent_chat failure: the
Reasoning null-field bug was (fixed in the previous commit). It also
blocked consumers that need openai-agents 0.21+, so restore the
>=0.20,<0.23 / openai <4 ranges.

This reverts commit 2675ec7.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Use a nonzero cache_write_tokens in the usage fixture and assert it on
the response, so a hardcoded zero would fail. Cover payloads where the
field is missing or None.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@gergelyhunyady
gergelyhunyady merged commit d36969a into main Nov 9, 2026
56 checks passed
@gergelyhunyady
gergelyhunyady deleted the fix/allow-temporalio-1.35 branch November 9, 2026 19:31
@agentex-sdk-release agentex-sdk-release Bot mentioned this pull request Nov 9, 2026
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