feat: add Requesty as an OpenAI-compatible provider - #208
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.
This adds Requesty as a first-class AI provider, mirroring the existing OpenRouter integration as closely as possible.
Requesty is an OpenAI-compatible LLM gateway that exposes many models through one API using
provider/modelnaming, the same convention as OpenRouter. Since the plugin already uses@ai-sdk/openai-compatiblefor OpenAI-compatible providers, Requesty reuses that path (no new dependency).Changes:
src/Services/Adapters/RequestyAdapter.ts: new adapter mirroringOpenRouterAdapter(Bearer auth,/modelsfetch with provider prefixing, base URLhttps://router.requesty.ai, path suffix/v1).src/Services/AiProviderService.ts: register the adapter and routerequestythroughcreateOpenAICompatible.src/Constants.ts,src/Services/DefaultConfigs.ts,src/Models/Config.ts: add therequestyservice constant, default config, API key and frontmatter settings.src/Services/ApiAuthService.ts,src/Utilities/ProviderHelpers.ts,src/Utilities/FrontmatterHelpers.ts,src/Services/SettingsService.ts,src/Services/SettingsMigration.ts,src/Commands/*,src/Views/ChatGPT_MDSettingsTab.ts: wire Requesty through auth, provider detection, settings UI and command handlers, parallel to OpenRouter.The final endpoint resolves to
https://router.requesty.ai/v1/chat/completions.Verification:
npx tsc --noEmitexits 0,yarn buildsucceeds, and the full test suite passes (117/117). I also confirmed the endpoint live:GET https://router.requesty.ai/v1/modelsreturned 200 and a chat completion returned 200.Docs: https://requesty.ai , https://docs.requesty.ai , https://app.requesty.ai/api-keys
I work at Requesty. This mirrors the existing OpenRouter provider as closely as possible. Happy to adjust or close it if it is not a fit.