Skip to content

[BUG] Failed to refresh the model registry from models.dev #798

Description

@mtgto

Basic checks

  • I searched existing issues - this hasn't been reported
  • I can reproduce this consistently
  • This is a RubyLLM bug, not my application code

What's broken?

Following the documented procedure at https://rubyllm.com/models/#refreshing-the-registry, RubyLLM.models.refresh! appears to complete without error but the model registry is not updated. models.dev data is silently dropped.

How to reproduce

require 'ruby_llm'

RubyLLM.models.refresh!
# No exception is raised, but the registry is not updated

Running with log output reveals the failure:

W, WARN -- RubyLLM: Failed to fetch models.dev (ArgumentError: argument out of range). Keeping existing.
W, WARN -- RubyLLM: Using cached models.dev data due to fetch failure.

Expected behavior

RubyLLM.models.refresh! updates the in-memory registry with the latest model data from models.dev, as described in the documentation.

What actually happened

W, WARN -- RubyLLM: Failed to fetch models.dev (ArgumentError: argument out of range). Keeping existing.
W, WARN -- RubyLLM: Using cached models.dev data due to fetch failure.

The model registry is silently not updated. No exception is raised to the caller.

models.rb line 330: created_at: created_date ? "#{created_date} 00:00:00 UTC" : nil,

When created_date is "2025-09", this produces "2025-09 00:00:00 UTC".
It is invalid input for Time.parse.

Environment

  • Ruby version: 3.4.9
  • RubyLLM version: 1.15.0
  • OS: macOS 26.5

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions