Skip to content

[FIX] slug method should return string instead of symbol to allow Mod…#6

Merged
khasinski merged 1 commit intokhasinski:mainfrom
noelblaschke:main
Mar 26, 2026
Merged

[FIX] slug method should return string instead of symbol to allow Mod…#6
khasinski merged 1 commit intokhasinski:mainfrom
noelblaschke:main

Conversation

@noelblaschke
Copy link
Copy Markdown
Contributor

@noelblaschke noelblaschke commented Mar 24, 2026

Hey, thanks for your work!

RubyLLM's Model.refresh! will throw

Model.refresh!
I, [2026-03-24T11:56:12.238875 #55381]  INFO -- RubyLLM: Fetching models from providers: OpenAI, OpenAIResponses
I, [2026-03-24T11:56:12.238943 #55381]  INFO -- RubyLLM: Fetching models from models.dev API...
'<main>': comparison of Array with Array failed (ArgumentError)

because of RubyLLMs sorting mechanism in:
https://github.com/crmne/ruby_llm/blob/3c6e53c36e8eef44e4a48583c68d34ba3675043a/lib/ruby_llm/models.rb#L236

This will fail trying to compare a string provider (e.g. "open_ai") with a symbol provider (e.g. :openai_responses)

@noelblaschke noelblaschke reopened this Mar 26, 2026
@noelblaschke
Copy link
Copy Markdown
Contributor Author

Fixed linting issues and updated spec

@khasinski khasinski merged commit 8cdb958 into khasinski:main Mar 26, 2026
@khasinski
Copy link
Copy Markdown
Owner

khasinski commented Mar 26, 2026

Thanks @noelblaschke, good catch! Merged.

EDIT: Released in 0.5.3

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.

2 participants