Skip to content

Add local models registry config and rubyrt models command#32

Merged
kplawver merged 1 commit into
mainfrom
kplawver-update-models
Jun 29, 2026
Merged

Add local models registry config and rubyrt models command#32
kplawver merged 1 commit into
mainfrom
kplawver-update-models

Conversation

@kplawver

Copy link
Copy Markdown
Collaborator

Summary

  • Adds a models_file config option (also RUBYRT_MODELS_FILE env var) that points to a local RubyLLM models registry JSON. When set and the file exists, reviews load model metadata from there instead of the registry shipped with the ruby_llm gem, which can lag behind new provider models.
  • Adds a rubyrt models command that refreshes the registry (RubyLLM.models.refresh!) and persists it to the configured path (RubyLLM.models.save_to_json), with an optional --path flag for one-off overrides. Creates parent dirs as needed and exits with a usage message when no path is configured.
  • Extracts LlmClient.apply_provider_config! as a reusable class method so the models command can expose provider credentials to refresh! without duplicating the provider-key mapping.

Test plan

  • bundle exec rspec — full suite passes (116 examples, 0 failures).
  • Smoke-tested rubyrt models with no config (exits 1 with usage message) and with --path (refreshes, writes the JSON, creates nested dirs, reports model count).
  • RuboCop is clean on every touched file; pre-existing offenses in debug_output.rb/verifier.rb/specs are unchanged and out of scope.

@rubyrt

rubyrt Bot commented Jun 29, 2026

Copy link
Copy Markdown

RubyRT Code Review

✅ No issues found across 13 file(s).

@kplawver kplawver merged commit 423d121 into main Jun 29, 2026
2 checks passed
@kplawver kplawver deleted the kplawver-update-models branch June 29, 2026 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant