feat: add Requesty as an OpenAI-compatible provider#338
Open
Thibaultjaigu wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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::ChatProviderand reuses the OpenAI Chat request/response/transform pipeline unchanged.https://router.requesty.ai/v1REQUESTY_API_KEYprovider/model(e.g.openai/gpt-4o-mini)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, fallbackmodels+route,prediction, and the"any"tool_choice / extended sampling params liketop_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.rb—RequestyProvider < OpenAI::ChatProvider(service name, options class, OpenAI Chat request/embedding request types, response normalization).lib/active_agent/providers/requesty/options.rb—Requesty::Options < OpenAI::Options(base_url defaulthttps://router.requesty.ai/v1, resolvesREQUESTY_API_KEY, no org/project).lib/active_agent/providers/requesty/_types.rb—Requesty::RequestTypealiased toOpenAI::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— addedrequestyto thePROVIDERSlist alongsideopenrouter.Verification
ruby -cpasses ("Syntax OK") on every new/changed.rbfile.bin/test test/providers/requesty/provider_loading_test.rb-> 3 runs, 6 assertions, 0 failures, 0 errors. ConfirmsRequestyProvider/Requesty::Optionsload, the provider concern resolves theRequestyservice toRequestyProvider, and options default to the Requesty gateway +REQUESTY_API_KEY.test/providers/open_router/transforms_test.rbandtest/providers/azure/provider_loading_test.rbstill pass (24 runs, 54 assertions, 0 failures) — no regressions.POST https://router.requesty.ai/v1/chat/completionswithmodel: openai/gpt-4o-minireturned 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.