Skip to content

Conversation

@radanskoric
Copy link

What this does

This fixes an issue where models from unconfigured providers are not preserved when running rake models:update.

Since calling Models.refresh! refetches the list of models and fully replaces the old list, it will also completely skip unconfigured providers in the new list (except if they're coming from parsera as well).

This change ensures that configured providers are fetched fresh and unconfigured ones are preserved as they are. This allows partial model updating.

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation
  • Performance improvement

Scope check

  • I read the Contributing Guide
  • This aligns with RubyLLM's focus on LLM communication
  • This isn't application-specific logic that belongs in user code
  • This benefits most users, not just my specific use case

Quality check

  • I ran overcommit --install and all hooks pass
  • I tested my changes thoroughly
    • For provider changes: Re-recorded VCR cassettes with bundle exec rake vcr:record[provider_name]
    • All tests pass: bundle exec rspec
  • I updated documentation if needed not needed
  • I didn't modify auto-generated files manually (models.json, aliases.json)

API changes

  • Breaking change
  • New public methods/classes
  • Changed method signatures
  • No API changes

Related issues

No linked issues.

This fixes an issue where models from unconfigured providers are not preserved when running rake models:update. Since calling refresh! refetches the list of models and fully replaces the old list, it will also completely skip unconfigured providers in the new list (except if they're coming from parsera as well). This change ensures that configured providers are fetched fresh and unconfigured ones are preserved as they are, allow for partial model updating.
None of the model providers were configured while running this so the changes are purely from Parsera.
@radanskoric
Copy link
Author

@crmne there are two commits in this PR:

  1. Fix the bug in Models.refresh!
  2. Another one created by running models:update without providers configured which just updated it from Parsera.

If you would like me to split this into two PRs just let me know. I kept them together just since it seemed related enough and I was testing the rake task anyway. Second run produces no changes.

@radanskoric radanskoric mentioned this pull request Dec 18, 2025
19 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant