Skip to content

openai is a development dependency but OpenRouterProvider requires it at runtime #416

Description

@TonsOfFun

activeagent.gemspec declares openai as a development dependency, but OpenRouterProvider requires it at runtime. Any consumer configuring an openrouter provider fails at execution:

Failed to load provider openrouter: The 'openai' gem is required for
OpenRouterProvider. Please add it to your Gemfile and run `bundle install`.

Reproduce

  1. gem 'activeagent', '~> 1.4' in a host app (no openai gem)
  2. Configure a provider with provider: "openrouter"
  3. Execute any generation → the error above

Evidence

$ gem spec activeagent-1.4.0.gem dependencies | grep -A3 'name: openai'
  name: openai
  type: :development

Confirmed against the published 1.4.0 gem. The workaround is for every host to add gem 'openai' by hand, which is what we ended up doing in Sparkle.

Expected

Either promote openai to a runtime dependency, or make it a documented optional dependency and have the provider raise a clear "add this gem" error at configuration time rather than mid-run.

The second is probably better: it keeps the gem lean for hosts that never touch OpenRouter, as long as the failure surfaces early and names the fix.

Impact

This also silently inflates telemetry error rates — in our install it produced ClaraAgent.ask failures that counted against a trace-error-rate evaluation criterion.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions