module RubyLLM::ActiveRecord::ModelMethods

ModelMethods is mixed into the model registry class by acts_as_model. Each record stores one entry of the RubyLLM model registry and answers the same capability and pricing queries as RubyLLM::Model. Those queries delegate to the Model object returned by to_llm.

class Model < ApplicationRecord
  acts_as_model
end

Model.refresh!
model = Model.find_by(model_id: 'claude-sonnet-4-6')
model.supports?(:vision) # => true