Skip to content

feat: add Requesty as an OpenAI-compatible provider#338

Open
Thibaultjaigu wants to merge 1 commit into
activeagents:mainfrom
Thibaultjaigu:add-requesty-provider
Open

feat: add Requesty as an OpenAI-compatible provider#338
Thibaultjaigu wants to merge 1 commit into
activeagents:mainfrom
Thibaultjaigu:add-requesty-provider

Conversation

@Thibaultjaigu

Copy link
Copy Markdown

Summary

Adds a Requesty provider, mirroring the existing OpenRouter provider. Requesty (https://requesty.ai) is an OpenAI-compatible LLM gateway, so this provider extends OpenAI::ChatProvider and reuses the OpenAI Chat request/response/transform pipeline unchanged.

  • Base URL: https://router.requesty.ai/v1
  • API key: REQUESTY_API_KEY
  • Model naming: provider/model (e.g. openai/gpt-4o-mini)
  • Requests, responses and transforms are identical to the OpenAI Chat API.

Like the OpenRouter provider, it loads via the existing dynamic provider resolution (service: "Requesty" -> requesty_provider -> RequestyProvider), so no central registry change is required for lookup.

Design note

The OpenRouter provider also ships routing-specific request machinery under open_router/ (plugins, provider preferences / ProviderPreferences, fallback models + route, prediction, and the "any" tool_choice / extended sampling params like top_k/min_p). Requesty does not expose those OpenRouter-routing-specific features, so they are intentionally omitted. The Requesty provider instead reuses the generic OpenAI Chat request type and transforms directly — the same approach the repo already uses for the Azure provider, which is likewise OpenAI-compatible.

New files

  • lib/active_agent/providers/requesty_provider.rbRequestyProvider < OpenAI::ChatProvider (service name, options class, OpenAI Chat request/embedding request types, response normalization).
  • lib/active_agent/providers/requesty/options.rbRequesty::Options < OpenAI::Options (base_url default https://router.requesty.ai/v1, resolves REQUESTY_API_KEY, no org/project).
  • lib/active_agent/providers/requesty/_types.rbRequesty::RequestType aliased to OpenAI::Chat::RequestType.
  • test/providers/requesty/provider_loading_test.rb — loading/registration + options defaults.

Registration / list site

  • lib/active_agent/dashboard/app/models/active_agent/dashboard/agent.rb — added requesty to the PROVIDERS list alongside openrouter.

Verification

  • ruby -c passes ("Syntax OK") on every new/changed .rb file.
  • bin/test test/providers/requesty/provider_loading_test.rb -> 3 runs, 6 assertions, 0 failures, 0 errors. Confirms RequestyProvider/Requesty::Options load, the provider concern resolves the Requesty service to RequestyProvider, and options default to the Requesty gateway + REQUESTY_API_KEY.
  • Existing test/providers/open_router/transforms_test.rb and test/providers/azure/provider_loading_test.rb still pass (24 runs, 54 assertions, 0 failures) — no regressions.
  • Live smoke test against the gateway: POST https://router.requesty.ai/v1/chat/completions with model: openai/gpt-4o-mini returned HTTP 200 with a valid completion.

Links

I work at Requesty. This mirrors the existing OpenRouter provider as closely as possible. Happy to adjust or close it if it's not a fit.

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.

1 participant