RubyLLM 2.0.0.rc4 fixes prompt caching and improves Rails copy upgrades.
- Keep automatic prompt caching enabled alongside explicit
cache_until_hereboundaries across Anthropic, OpenRouter, Bedrock Converse, and OpenAI-compatible protocols (#930). RubyLLM sends both requested controls and lets the provider apply its caching rules. On supported OpenAI-compatible models, usewith_caching(mode: "explicit")to request explicit-only caching. - Preserve Active Record autosave behavior with the Rails copy-upgrade guards, and configure RubyLLM before loading those guards.
- Add
--discard-incomplete-tool-callsto copy-upgrade finish migrations. This opt-in cleanup removes incomplete legacy calls before verification while preserving calls with results and protected 2.0 conversations. Read the upgrade guide before using it; discarded calls are not restored by rollback or resume. - Generate simpler copy-upgrade migrations without rename-only helpers.
- Use provider instance names in instrumentation so delegated providers report the correct name (#926).
- Refresh the bundled model catalog and available-models documentation.
- Make 2.0 the default documentation site, with 1.x documentation available at rubyllm.com/v1.
Install this prerelease with:
gem 'ruby_llm', '2.0.0.rc4'Coming from 1.x? Follow the 2.0 upgrade guide before upgrading an existing application.