Skip to content

Add Requesty adapter (OpenAI-compatible)#53

Open
Thibaultjaigu wants to merge 1 commit into
kevinelliott:mainfrom
Thibaultjaigu:add-requesty-adapter
Open

Add Requesty adapter (OpenAI-compatible)#53
Thibaultjaigu wants to merge 1 commit into
kevinelliott:mainfrom
Thibaultjaigu:add-requesty-adapter

Conversation

@Thibaultjaigu

Copy link
Copy Markdown

This adds a dedicated requesty adapter, mirroring the existing OpenRouter adapter as closely as possible.

Requesty is an OpenAI-compatible gateway (base URL https://router.requesty.ai/v1) that uses provider/model naming — the same convention as OpenRouter — so it reuses the existing client.OpenAICompatClient with no new client code.

Changes (mirror of the OpenRouter wiring)

  • New pkg/adapters/requesty.goRequestyAgent mirroring OpenRouterAgent: reads REQUESTY_API_KEY, targets https://router.requesty.ai/v1, registers via agent.RegisterFactory("requesty", NewRequestyAgent) in init(). Same Initialize/HealthCheck/SendMessage/StreamMessage/buildConversationHistory logic.
  • New pkg/adapters/requesty_test.go — unit + integration tests mirroring openrouter_test.go (integration tests skip unless REQUESTY_API_KEY is set).
  • cmd/model_validation.go — adds the requesty entry (Supported + Required), matching openrouter.
  • internal/providers/providers.json — minimal requesty provider 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 ./..., and gofmt -l are clean.
  • go test -short ./pkg/adapters/... ./internal/providers/... passes (the embedded providers.json loads correctly).
  • Live integration tests against https://router.requesty.ai/v1 pass: HealthCheck and SendMessage with openai/gpt-4o-mini returned 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.

Signed-off-by: Thibault Jaigu <thibault.jaigu@gmail.com>
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