-
Notifications
You must be signed in to change notification settings - Fork 324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ensure the -best
model points to the appropriate language model
#604
base: main
Are you sure you want to change the base?
Ensure the -best
model points to the appropriate language model
#604
Conversation
-best
model points to another language model
-best
model points to another language model-best
model points to the appropriate language model
I reviewed this PR but I'm torn with regards to the implementation. The challenge with replacing all the My first thought was: can we make the call to .language_model somehow recognize that it's a special "virtual/pointer/best" model and actually return the model that we want it to act like. But since language_model is an association, I couldn't figure out an appropriate way to hook in there. So then I was thinking that we could let language_model be the virtual one, but within it, any call to any attribute would do a lookup of the actual best: true model and return that attribute instead. But @attributes is an ivar, not a method, and I couldn't figure out an elegant way to tap into that and intercept any attempt to reference an attribute. I see how you ended up where you did. I can't think of a better solution. But I worry that this solution will be too brittle. There may already be subtle bugs in the code for places where we aren't using the correct language_model attribute. I don't have a good idea for how to resolve... I'm stuck... :) |
I don't know, this seems to get very general. How often does the "best" of today change features compared to the "best" of yesterday? |
The more I think about it, I think the better change would be to remove support for any magical "best" model. For example, I can't objectively say which is the "best" OpenAI model these days. 4o is better in some ways and o3 is better in other ways and o1 is better in yet other ways. These LLMs are really weird animals. Considering the technical complexity that "best" introduces plus the ambiguity around it, I think it was a mistaken feature. Would you be up for reverting your work and instead:
I'm hoping it's actually fairly easy to back out this feature. Whereas if we really lean into it, we're introducing a lot of hacks throughout the code for a win that might not even be a win. :) |
Added new method
LanguageModel#effective_api_name
. When theapi_name
of aLanguageModel
ends in-best
this method looks up the language model of itsAPIService
that has thebest
flag set.app/controllers/settings/language_models_controller.rb
)Fixes issue #592