Skip to content

Bump openai dep from ~> 0.43 to ~> 0.59#65

Merged
raghubetina merged 1 commit into
mainfrom
bump-openai-0.59
Apr 22, 2026
Merged

Bump openai dep from ~> 0.43 to ~> 0.59#65
raghubetina merged 1 commit into
mainfrom
bump-openai-0.59

Conversation

@raghubetina
Copy link
Copy Markdown
Contributor

Summary

  • Bumps openai from ~> 0.43 to ~> 0.59 in ai-chat.gemspec, refreshes Gemfile.lock (0.43.00.59.0).
  • No lib/ changes are required — every method the gem calls keeps the same signature, and the response shape it consumes (id / output / output_text / model / usage / image_generation_call items) is unchanged.

What we pick up

  • Typed action field on the image_generation tool (auto/generate/edit), added after 0.43. Unknown keys were already passing through BaseModel.coerce/dump, so nothing depended on this — but the SDK surface is now closer to OpenAI's docs.
  • gpt-5.4 mini/nano model slugs in ChatModel (added in 0.56.0).
  • Short-lived tokens, phase field on Conversations messages, WEB_SEARCH_CALL_RESULTS in ResponseIncludable (0.57–0.58). Not used in lib/ today, but available.
  • Assorted fixes: RFC 3986 path encoding, multipart form-field name encoding, multipart array-field encoding.

There is still no typed gpt-image-2 constant — the announcement landed 2026-04-21, one week after openai-ruby 0.59.0 shipped. The tool's model field is a String|Symbol union, so "gpt-image-2" already passes through.

Test plan

  • bundle exec rspec spec/unit — 72 examples, 0 failures under 0.59.0
  • bundle exec standardrb lib/ ai-chat.gemspec — clean on the diff (two pre-existing warnings at lib/ai/chat.rb:49 and :178 are unrelated)
  • Gem loads cleanly under the new SDK (bundle exec ruby -e 'require "ai-chat"')
  • Integration smoke test against real API — leaving to the reviewer since it costs credits

Relates to

#64 (image_generation Hash options) will be rebased on top of this branch so reviewers can see a clean diff.

Tracks the upstream SDK forward by sixteen minor versions
(0.43 → 0.59, released 2026-04-14). No code changes in lib/ are
required: every method we call (OpenAI::Client.new, responses.create,
conversations.items.list) keeps the same signature, and the response
object shape we consume (id / output / output_text / model / usage /
image_generation_call items) is unchanged.

Notable things this brings along:

- Typed `action` field on the image_generation tool (auto/generate/
  edit), added after 0.43. Unknown keys were passing through via
  BaseModel anyway, but the typed field makes the SDK-facing surface
  closer to the docs.
- gpt-5.4 mini/nano model slugs in ChatModel (added in 0.56).
- Short-lived tokens, phase field on Conversations messages, and the
  WEB_SEARCH_CALL_RESULTS Includable (0.57–0.58) — not used here yet,
  but available for future work.

The SDK still has no typed `gpt-image-2` constant (the announcement
landed on 2026-04-21, a week after 0.59 shipped), but the model field
is a String|Symbol union, so `"gpt-image-2"` passes through.

72 unit examples pass; StandardRB is clean on the diff (the two
pre-existing warnings on lib/ai/chat.rb:49 and :178 are unrelated).
@raghubetina raghubetina merged commit df1198e into main Apr 22, 2026
2 checks passed
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