Upgrading
Move a RubyLLM AG-UI application to the next release, one release at a time.
After reading this guide, you will know:
- How to move between versioned releases.
- Where to find changes that need code updates.
Move from 1.0.0 to 1.0.1
Upgrade the adapter before updating RubyLLM to 2.2.3. You can keep RubyLLM 2.1.0 or 2.1.1. The adapter uses the existing run table and initializer.
Treat toolCallId as opaque. RubyLLM 2.2.3 assigns its own invocation ID. The tool events, approval interrupt, and resumed result use the same ID, which can differ from the provider’s. When restoring a chat with a pending approval, keep the original RubyLLM call ID and arguments. Answer the stored interrupt using its interruptId. The adapter upgrade test reloads a 1.0.0 completed run and both approval decisions from SQLite. On Rails, load the authorized chat with its registered tools before passing it to the adapter. RubyLLM 2.2 leaves pre-upgrade approvals out of the record’s pending_questions. For an existing interrupt, the adapter checks the undecided database row, the host chat’s pending call, and the original arguments before applying the decision. Follow RubyLLM’s database upgrade instructions for its own models.
Move from 0.4 to 1.0
Update your Gemfile and dependency:
gem 'ruby_llm-ag_ui', '~> 1.0'
bundle update ruby_llm-ag_ui
1.0 keeps the 0.4 public API, configuration, and store contract. It needs no SQL migration, and the generated migration and initializer are unchanged. Records written by 0.4 stay readable: an exact retry reconnects to a 0.4 run, and a 0.4 interrupt can be resumed after the upgrade.
Clients now receive tool argument deltas that join to valid JSON for every
streamed call. If your client worked around the old {} prefix or Ruby
Hash#to_s arguments, remove that workaround.
Requiring the gem no longer loads ActiveRecord::Base during a Rails boot.
Code that relied on the gem to load Active Record must load it itself.
1.0 requires Ruby 3.3 or newer. Upgrade an application on Ruby 3.2 before you update the gem; Bundler refuses to install 1.0 on Ruby 3.2.
Move from 0.3 to 0.4
Update your Gemfile and dependency:
gem 'ruby_llm-ag_ui', '~> 0.4.0'
bundle update ruby_llm-ag_ui
This release keeps JSON 2.x and the 0.3 store revision contract. It needs no additional SQL migration. Drain old workers before replacing their code.
Remove assignments to config.allow_client_history. The unused setting is
removed, including its diagnostic key. The gem never imports client messages
into the host chat; reconcile history in your host application.
config.protocol_version remains "1.0". Assigning any other value now raises
ConfigurationError instead of accepting a setting the emitted events ignore.
Nested request and JSON record values are now read-only. In-place edits raise
FrozenError. Build a new input, or use record transitions and store.save,
instead of mutating ids, snapshots, failure hashes, or interrupt values.
Caller-owned JSON objects remain mutable and do not alias the stored record.
Older Releases
Read the 0.3 upgrading guide for JSON 2.x, worker draining, and the custom-store revision contract.