Add Requesty adapter (OpenAI-compatible)#53
Open
Thibaultjaigu wants to merge 1 commit into
Open
Conversation
Signed-off-by: Thibault Jaigu <thibault.jaigu@gmail.com>
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.
This adds a dedicated
requestyadapter, mirroring the existing OpenRouter adapter as closely as possible.Requesty is an OpenAI-compatible gateway (base URL
https://router.requesty.ai/v1) that usesprovider/modelnaming — the same convention as OpenRouter — so it reuses the existingclient.OpenAICompatClientwith no new client code.Changes (mirror of the OpenRouter wiring)
pkg/adapters/requesty.go—RequestyAgentmirroringOpenRouterAgent: readsREQUESTY_API_KEY, targetshttps://router.requesty.ai/v1, registers viaagent.RegisterFactory("requesty", NewRequestyAgent)ininit(). Same Initialize/HealthCheck/SendMessage/StreamMessage/buildConversationHistory logic.pkg/adapters/requesty_test.go— unit + integration tests mirroringopenrouter_test.go(integration tests skip unlessREQUESTY_API_KEYis set).cmd/model_validation.go— adds therequestyentry (Supported + Required), matchingopenrouter.internal/providers/providers.json— minimalrequestyprovider entry (id, OpenAI type, endpoint, a few known models) so cost/validation lookups resolve; unknown models still fall through to the existing "not in registry → warning" path.examples/requesty-conversation.yaml,examples/requesty-solo.yaml— mirror the OpenRouter examples.README.md— adds Requesty to the supported-agents list and the model-support table.Testing
go build ./...,go vet ./..., andgofmt -lare clean.go test -short ./pkg/adapters/... ./internal/providers/...passes (the embedded providers.json loads correctly).https://router.requesty.ai/v1pass:HealthCheckandSendMessagewithopenai/gpt-4o-minireturned a real completion ("Test successful.").I work at Requesty. This mirrors the existing OpenRouter provider as closely as possible. Happy to adjust wording/placement or close it if it's not a fit.