File tree Expand file tree Collapse file tree 1 file changed +8
-13
lines changed
Expand file tree Collapse file tree 1 file changed +8
-13
lines changed Original file line number Diff line number Diff line change 145145
146146 describe '#resolve' do
147147 it 'delegates to the class method when called on instance' do
148- # This tests that RubyLLM.models.resolve works
149- # which is needed in the migration template
150148 model_id = 'gpt-4o'
151149 provider = 'openai'
152-
153- # Call resolve on the instance (RubyLLM.models returns an instance)
150+
154151 model_info , provider_instance = RubyLLM . models . resolve ( model_id , provider : provider )
155-
152+
156153 expect ( model_info ) . to be_a ( RubyLLM ::Model ::Info )
157154 expect ( model_info . id ) . to eq ( model_id )
158155 expect ( model_info . provider ) . to eq ( provider )
161158
162159 it 'resolves model without provider' do
163160 model_id = 'gpt-4o'
164-
165- # Should resolve based on model ID alone
161+
166162 model_info , provider_instance = RubyLLM . models . resolve ( model_id )
167-
163+
168164 expect ( model_info ) . to be_a ( RubyLLM ::Model ::Info )
169165 expect ( model_info . id ) . to eq ( model_id )
170166 expect ( provider_instance ) . to be_a ( RubyLLM ::Provider )
173169 it 'resolves with assume_exists option' do
174170 model_id = 'custom-model'
175171 provider = 'openai'
176-
177- # When assume_exists is true, it should create a default model
172+
178173 model_info , provider_instance = RubyLLM . models . resolve (
179- model_id ,
180- provider : provider ,
174+ model_id ,
175+ provider : provider ,
181176 assume_exists : true
182177 )
183-
178+
184179 expect ( model_info ) . to be_a ( RubyLLM ::Model ::Info )
185180 expect ( model_info . id ) . to eq ( model_id )
186181 expect ( model_info . provider ) . to eq ( provider )
You can’t perform that action at this time.
0 commit comments