Skip to content

[BUG] Generator doesn't work well if you've namespaced your models #425

@jpowell

Description

@jpowell

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?

In our application, chat and message are a thing, so we wanted to namespace the models for AI / LLM activities, and there's really no support for this in the gem currently.

How to reproduce

run the chat_ui generator with any model names that may have a nested prefix (ie, LLM::Chat) and you'll get syntax errors

Image

Expected behavior

support namespacing of llm gem models in generator

What actually happened

syntax errors

Image

Environment

ruby 3.4.5 (2025-07-16 revision 20cda200d3) +PRISM [aarch64-linux]
ruby_llm 1.8.0

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