RubyLLM (gateway)
RubyLLM (gateway)
RubyLLM does not have a Ruby-side tracing instrumentor. Route all calls through the Respan gateway to capture every request as a trace.
Setup
Set environment variables
No provider key needed — the Respan gateway handles provider authentication.
View your trace
Open the Traces page to see your gateway-routed calls with prompts, tokens, and cost.
Switch models
Use another OpenAI model ID that Respan exposes through the same OpenAI-compatible endpoint.
RubyLLM’s OpenAI-compatible adapter does not provide a provider-neutral way to show Claude or Gemini model switches in this setup. Use the Respan API or OpenAI SDK gateway pages for provider-neutral Claude and Gemini examples.
See the full model list.
Streaming
Multi-tenancy with contexts
Use RubyLLM contexts to isolate per-tenant configuration.
Rails integration
Set your Respan config in an initializer.
Use acts_as_chat as normal — all LLM calls will be routed through Respan.