PromptingTools.jl icon indicating copy to clipboard operation
PromptingTools.jl copied to clipboard

[FR] Move model registry to TOML-based

Open svilupp opened this issue 9 months ago • 1 comments

New models and their aliases are currently defined in src/user_preferences.jl The file is getting hard to manage.

It would be great to move model registry (ie, model name, aliases, prompt schema, description, and prices — ideally including caching discounts!) to several separate TOML files (organized by providers?).

These model files could be easily extended by users and it would make it easier to manage.

Key functionality:

  • prevent name collisions (but allow for overwrite when refreshing)
  • prevent alias collisions
  • allow for a list of aliases
  • refresh models on demand
  • register a file with user’s model preferences // or just load it (similar to prompt template loading)
  • add some nice pretty print that will list all models by provider and their aliases where applicable

Extra

  • could we support adding new models via LocalPreferences to make it even simpler for users?
  • is there a scope to support more complex model definitions like base_url, api_key, etc?

svilupp avatar Feb 25 '25 07:02 svilupp

@svilupp I have a thought this related: whichever might be the new implementation, it would be very much appreciated if it can be ensured that models can still be registered at runtime with immediate effect. :)

omlins avatar May 26 '25 10:05 omlins