RubyLLM 1.7 replaces simple string model fields with a DB-backed model registry implemented as ActiveRecord associations to improve data integrity and surface richer model metadata. The release notes emphasize that core functionality continues to work in legacy mode, but new and upgraded deployments can use the registry for structured model information. Fresh installs receive the model registry automatically, while existing 1.6 apps continue to function with string fields and will show a deprecation warning on Rails boot.
The model registry exposes richer metadata on model records. Examples in the documentation show fields and delegated methods such as name, context_window, supports_vision, and input_token_cost. Provider routing is supported by specifying a provider at creation time. The registry enables model associations and SQL-level queries such as joining chats to models and filtering by provider, and it supports delegated predicate methods for model capabilities. Alias resolution is documented so that a call supplying an aliased model id and a provider resolves to the canonical provider/model combination. Usage tracking is possible by joining models to chats and grouping and ordering by chat count for reporting.
The recommended upgrade path from 1.6 is to migrate to the model registry. The documented steps are to run rails generate ruby_llm:install, rails generate ruby_llm:migrate_model_fields, and rails db:migrate, then enable the registry in the initializer by setting config.model_registry_class = ´Model´. The migration creates the models table, loads models from models.json automatically, migrates existing string-based data to use foreign keys, and preserves existing columns by renaming the old model_id column to model_id_string. New applications should run the install generator and database migration to get the registry by default.
