From 6cbff2c66ca6b5c0c5fcae9ef94a4a3f17821959 Mon Sep 17 00:00:00 2001 From: Raghu Betina Date: Tue, 21 Apr 2026 17:50:57 -0500 Subject: [PATCH] Bump openai from ~> 0.43 to ~> 0.59 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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). --- Gemfile.lock | 4 ++-- ai-chat.gemspec | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 47a61a1..ad1e680 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -6,7 +6,7 @@ PATH base64 (~> 0.1, > 0.1.1) json (~> 2.0) marcel (~> 1.0) - openai (~> 0.43) + openai (~> 0.59) tty-spinner (~> 0.9.3) GEM @@ -66,7 +66,7 @@ GEM lint_roller (1.1.0) logger (1.7.0) marcel (1.1.0) - openai (0.43.0) + openai (0.59.0) base64 cgi connection_pool diff --git a/ai-chat.gemspec b/ai-chat.gemspec index c7c0f84..2abf042 100644 --- a/ai-chat.gemspec +++ b/ai-chat.gemspec @@ -19,7 +19,7 @@ Gem::Specification.new do |spec| } spec.required_ruby_version = ">= 3.2" - spec.add_runtime_dependency "openai", "~> 0.43" + spec.add_runtime_dependency "openai", "~> 0.59" spec.add_runtime_dependency "marcel", "~> 1.0" spec.add_runtime_dependency "base64", "~> 0.1", "> 0.1.1" spec.add_runtime_dependency "json", "~> 2.0"