Skip to content

fix(deps): update openai agents sdk to ^0.15.0 - #152

Merged
dawsontoth merged 2 commits into
mainfrom
claude/pr-150-gha-build-step-7abb4a
Aug 17, 2026
Merged

fix(deps): update openai agents sdk to ^0.15.0#152
dawsontoth merged 2 commits into
mainfrom
claude/pr-150-gha-build-step-7abb4a

Conversation

@dawsontoth

@dawsontoth dawsontoth commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Supersedes Renovate #150. Bumps @openai/agents and @openai/agents-extensions from ^0.14.0 to ^0.15.0, adapts getModel to the SDK's new Model typing, and adds a CI Build job so PRs are gated on a clean type-check — which is what surfaced the upgrade's type break in the first place.

For the human reviewer

  1. getModel now returns core's Model and casts the aisdk() result once. 0.15.0 adds an optional rawUsage to ModelResponse; the AiSdkModel wrapper declares its getResponse rawUsage as Record<string, unknown> | undefined, which isn't assignable to core's rawUsage?: Record<string, unknown> under our exactOptionalPropertyTypes. AiSdkModel genuinely implements Model, so this is an upstream declaration quirk, not a runtime issue — I bridged it with a single cast at the getModel boundary (and split provider selection into getLanguageModel so there's exactly one cast) rather than sprinkling casts at the two call sites (AgentManager, compactConversation). Reversible; the alternative is per-call-site casts.
  2. Build gate added to verify-pr.yaml only, not release.yaml. The release workflow already builds via prepublishOnly before npm publish, so a broken build fails the release regardless; the actual gap was PR-time validation. Say the word if you'd also like an explicit build step in release.

Verification

Rebased onto current main, so the 0.15.0 agents bump is validated alongside the recently landed ai v7 / @ai-sdk/* v4 majors (only package.json + the lockfile conflicted; kept main's ai ^7.0.0). Ran the full local gate against Node 24:

  • npm run build → tsup ESM + --dts type-check succeed (fails on main+bump without the getModel change — this is the break the new CI job catches).
  • npm run lint (oxlint) → clean.
  • npm run format (dprint) → clean.
  • npm test (vitest) → 53 files, 345 tests passed.

Review coverage

Authored by Claude (Opus 4.8). No outside cross-model review has run yet — flagging per Harper guidelines step 10; happy to run the cross-model-review pre-push pass before this leaves draft.

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request upgrades the @openai/agents and @openai/agents-extensions dependencies to version ^0.15.0. To accommodate this upgrade and resolve type-declaration mismatches under exactOptionalPropertyTypes, lifecycle/getModel.ts has been refactored. Specifically, the getModel function now returns the core Model type, and its provider-specific logic has been extracted into a new helper function getLanguageModel. There are no review comments, so no further feedback is provided.

dawsontoth and others added 2 commits August 17, 2026 14:12
Bumps @openai/agents and @openai/agents-extensions from ^0.14.0 to
^0.15.0 (supersedes the Renovate PR #150, resolving its lockfile
conflict by regenerating against current main).

0.15.0 adds an optional rawUsage field to core's ModelResponse. The
AiSdkModel wrapper from @openai/agents-extensions declares its
getResponse rawUsage as `Record<string, unknown> | undefined`, which is
not assignable to core's `rawUsage?: Record<string, unknown>` under this
repo's exactOptionalPropertyTypes. Have getModel return the core `Model`
type and bridge that upstream declaration mismatch with a single cast so
the --dts build type-checks again.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Adds a Build job to verify-pr.yaml that runs `npm run build` on pull
requests, alongside the existing lint, format, and test jobs. The build
runs tsup with --dts, so this gates PRs on a clean type-check and catches
compile/type breakage from dependency bumps and refactors before merge
(the @openai/agents 0.15.0 upgrade in this PR is one such case).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@dawsontoth
dawsontoth force-pushed the claude/pr-150-gha-build-step-7abb4a branch from 84fb53c to 99170f1 Compare August 17, 2026 18:13
@dawsontoth
dawsontoth marked this pull request as ready for review August 17, 2026 18:15
@dawsontoth
dawsontoth merged commit fe15625 into main Aug 17, 2026
7 checks passed
@dawsontoth
dawsontoth deleted the claude/pr-150-gha-build-step-7abb4a branch August 17, 2026 18:15
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.

1 participant