Update default model to gpt-5.6-terra, require Ruby 3.3 - #67
Merged
Conversation
- Default model: gpt-5.2 -> gpt-5.6-terra (also in generate_schema!) - Default reasoning_effort: nil -> "none", since GPT-5.5+ fall back to medium reasoning when the parameter is omitted; nil still omits it - Only request a reasoning summary when effort is not "none" - Require Ruby >= 3.3 and bump openai gem ~> 0.59 -> ~> 0.80 - CI runs on Ruby 3.3 - Specs for default model/effort and the reasoning parameter shapes - README and CHANGELOG updates
gpt-4.1 models reject the reasoning parameter, which is now sent by default (effort: none). Set reasoning_effort = nil to omit it.
examples/all.rb loads each example with require_relative, so exit 0 terminated the whole suite and silently skipped 16_get_items and 17_verbosity. A top-level return ends only this file.
bpurinton
marked this pull request as ready for review
August 24, 2026 19:09
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Updates the default model from
gpt-5.2togpt-5.6-terra, and adjusts the reasoning default so the upgrade doesn't silently make every call slower and more expensive. Also bumps Ruby/openaigem.Targets the 0.7.0 release — two changes here are breaking (Ruby >= 3.3, and
reasoning_effortdefaulting to"none"), so this goes out as a minor bump rather than a patch. The version bump itself will follow in a separateRelease 0.7.0PR, matching how 0.6.1 shipped.Why
gpt-5.6-terra?gpt-5.2(old default)gpt-5.5gpt-5.6-solgpt-5.6-terragpt-5.6-lunaTerra is essentially price-neutral vs. gpt-5.2, is a newer generation, and supports everything the gem uses (web search, image generation, code interpreter, structured outputs, image input, 1M context). Luna would be ~10x cheaper if we ever want to go that way.
Reasoning default change (the important bit)
GPT-5.5 and newer models default to
reasoning.effort: "medium"when the parameter is omitted. Previouslyreasoning_effortdefaulted toniland the gem sent nothing, which on gpt-5.2 meant no reasoning. Left alone, this PR would have flipped every default call into medium-reasoning mode.reasoning_effortnow defaults to"none"and the gem sendsreasoning: { effort: "none" }.reasoning_effort = nilstill means "omit the parameter" — needed for models that reject it (e.g.gpt-4o).summary: "auto"is only sent alongside a non-"none"effort.I went with an explicit
"none"default rather than translatingnil->"none"under the hood so that older/non-reasoning models keep a working escape hatch, and soinspectshows what's actually being sent.Ruby 3.3 +
openai~> 0.80openai>= 0.76 requires Ruby 3.3, so bumping the SDK means dropping Ruby 3.2 (EOL since 2026-03-31). CI now runs on Ruby 3.3. This is technically breaking, which is part of why this ships as 0.7.0.Test plan
bundle exec rspec spec/uniton Ruby 3.4.8 (96 examples, 0 failures; my local 3.3.x rbenv builds are x86_64 and can no longer compile native extensions on this machine, so CI is the real 3.3 check) (new specs cover the default model, default effort, and the threereasoningparameter shapes)standardrb/reekoutput identical tomain(2 pre-existing standardrb offenses, 34 pre-existing reek warnings; none in changed lines)bundle exec ruby examples/all.rb(the live validation suite per CONTRIBUTING.md) against the real API on Ruby 3.4.8: all 17 examples pass, 0✗, responses reportmodel: "gpt-5.6-terra". Two example fixes came out of this:17_verbosity.rbsetsreasoning_effort = nilbefore switching togpt-4.1-nano, since the gpt-4.1 family rejects thereasoningparameter now sent by default (test 7 now fails for the intended verbosity reason, not the reasoning one)15_proxy.rbusedexit 0whenAICHAT_PROXY_KEYwas unset, which killedall.rband silently skipped examples 16 and 17 (pre-existing); it now uses a top-levelreturnSources: OpenAI pricing, gpt-5.6-terra, model guidance, deprecations.