Solution

Claude on Rails, done properly.

Anthropic prompt caching, tool use and streaming — exposed through the same Ruby DSL you already use for OpenAI.

One switch to change providers

class Concierge < RailsAgents::Base
  model "claude-3.5-sonnet"      # was "gpt-4o"
  cache :system_prompt            # anthropic prompt caching
end

Provider-aware defaults

  • Prompt caching flag on/off from the DSL
  • Tool schemas translated automatically
  • Cost dashboards per provider