feat: add Requesty as an OpenAI-compatible AI driver#243
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.
Add Requesty as an OpenAI-compatible AI driver
This adds Requesty (
https://router.requesty.ai/v1) as a dedicated AI driver, mirroring the existing OpenRouter driver inserver/ai/drivers/.Implementation
Requesty is an OpenAI-compatible gateway that speaks the same Responses wire protocol (
POST /v1/responses) the OpenAI and OpenRouter drivers use, so the new driver reuses the sharedresponses-shared.tsadapter.server/ai/drivers/requesty.ts— mirror ofopenrouter.ts: base URLhttps://router.requesty.ai/v1, Bearer auth, and a/v1/modelsparser that maps Requesty's real field shape (context_window,input_price/output_price,supports_tool_calling/supports_vision/supports_caching,api == "chat") rather than blindly copying OpenRouter's field names.server/ai/drivers/requesty.test.ts— 8 tests (auth mode, capability/price/context mapping, chat-only filter, tool-calling default, non-OK error, no-key error).server/ai/drivers/index.ts,server/ai/runtime/types.ts(AiProviderId),server/ai/handlers/credentials.ts,server/ai/handlers/models.ts(VALID_PROVIDERS),src/admin/ai/api.ts, andsrc/admin/pages/ai/tabs/ProvidersTab.tsx.README.mdanddocs/features/agent.md.provider_idis validated at the app boundary.Verification
tsc -b: clean.bun test(driver + architecture + AI suites): 163 pass / 0 fail, including the newrequesty.test.tsand theai-driver-isolationgate (the driver uses direct HTTP, no SDK).openai/gpt-4o-mini→ 200;POST /v1/responses→ 200 with the same SSE events the shared translator handles;GET /v1/models→ 200 with 596 models.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.