Repository navigation
Add Requesty as an OpenAI-compatible AI provider - #1720
Thibaultjaigu wants to merge 2 commits into
Conversation
Add Requesty, an OpenAI-compatible LLM router that exposes upstream models via provider/model naming (the same convention as OpenRouter). Mirrors the existing dedicated OpenAI-compatible providers (e.g. Z.ai): a RequestyProvider extending OpenAICompatibleProvider with base URL https://router.requesty.ai/v1 and REQUESTY_API_KEY auth. Wires it through the provider index, the PROVIDERS registry in ai-services-unified.js, the api-key map in config-manager.js, the VALIDATED_PROVIDERS / CUSTOM_PROVIDERS constants in tm-core, and adds a requesty model block to supported-models.json. Documents it in the README, docs/models.md, docs/configuration.md, llms-install.md, and env examples. Signed-off-by: Thibault Jaigu <thibault.jaigu@gmail.com>
🦋 Changeset detectedLatest commit: ebaa1c4 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughRequesty is added as an OpenAI-compatible provider with API-key configuration, runtime registration, supported model metadata, documentation, and a Changesets release note. ChangesRequesty provider support
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Feature Sequence Diagram(s)sequenceDiagram
participant UnifiedService
participant RequestyProvider
participant RequestyAPI
UnifiedService->>RequestyProvider: Resolve provider key requesty
RequestyProvider->>RequestyAPI: Send OpenAI-compatible request
RequestyAPI-->>RequestyProvider: Return model response
Merge Risk: ⚪ Minimal · up to The reviewed change adds the Requesty API-key status branch without an established merge-blocking risk. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@scripts/modules/config-manager.js`:
- Line 903: Update the MCP provider switch in getMcpApiKeyStatus to add a
requesty case that uses the existing REQUESTY_API_KEY mapping and isApiKeySet
handling, preventing it from falling through to unknown-provider handling.
Preserve the behavior of all other providers.
In `@src/ai-providers/requesty.js`:
- Around line 15-24: The Requesty provider currently uses the class-based
architecture while the coding guidelines require legacy function-based
providers. In src/ai-providers/requesty.js lines 15-24, replace RequestyProvider
with standalone generateRequestyText, streamRequestyText, and
generateRequestyObject wrappers using Vercel AI SDK adapters and imports from ai
and the log utility; in scripts/modules/ai-services-unified.js line 75, register
those functions in PROVIDER_FUNCTIONS instead of PROVIDERS. If class-based
providers are now intentional, update the coding guidelines instead and preserve
the corresponding registry architecture.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 9a23afc0-0888-4e51-b26c-05a64f3a2bab
📒 Files selected for processing (13)
.changeset/requesty-provider.md.env.exampleREADME.mdassets/env.exampledocs/configuration.mddocs/models.mdllms-install.mdpackages/tm-core/src/common/constants/providers.tsscripts/modules/ai-services-unified.jsscripts/modules/config-manager.jsscripts/modules/supported-models.jsonsrc/ai-providers/index.jssrc/ai-providers/requesty.js
Add Requesty as an OpenAI-compatible AI provider
This adds Requesty as a supported AI provider by mirroring the existing dedicated OpenAI-compatible providers.
Requesty is an OpenAI-compatible LLM router that exposes 400+ upstream models behind a single endpoint using the
provider/modelnaming convention (the same convention as OpenRouter), so it fits the existing provider architecture directly.Changes
src/ai-providers/requesty.js,RequestyProviderextendingOpenAICompatibleProvider(same pattern as the existingZ.aiprovider), base URLhttps://router.requesty.ai/v1,REQUESTY_API_KEYauth.src/ai-providers/index.js: exportRequestyProvider.scripts/modules/ai-services-unified.js: registerrequestyin thePROVIDERSmap.scripts/modules/config-manager.js: addrequesty: 'REQUESTY_API_KEY'to the API-key map.packages/tm-core/src/common/constants/providers.ts: addrequestytoVALIDATED_PROVIDERSandCUSTOM_PROVIDERS.scripts/modules/supported-models.json: add arequestymodel block (mirrors theopenrouterschema exactly) withopenai/gpt-4o-mini,openai/gpt-4o,openai/gpt-4.1-mini,anthropic/claude-sonnet-4-5,google/gemini-2.5-flash,deepseek/deepseek-chat.README.md,docs/models.md,docs/configuration.md,llms-install.md,assets/env.example,.env.example.Testing
npm run turbo:typecheck: passes (9/9 tasks, includes the full tm-core + extension compile).supported-models.jsonvalidated as JSON; therequestyblock has the same key shape as theopenrouterblock.openai/gpt-4o-minireturned the expected completion with HTTP 200.Note on the OpenRouter provider: it uses the OpenRouter-specific
@openrouter/ai-sdk-providerSDK, which isn't appropriate for a different endpoint, so Requesty is implemented via the repo's ownOpenAICompatibleProviderbase, the established form here for dedicated OpenAI-compatible brands. The OpenRouter-specific live model-fetching UI inapps/cli/src/commands/models/*(which hitsopenrouter.ai/api) was intentionally left untouched; Requesty models are served through the committedsupported-models.jsonlist.Config: get a key at https://app.requesty.ai/api-keys, model list at https://app.requesty.ai/router/list, docs at https://docs.requesty.ai.
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.
Summary by CodeRabbit
New Features
REQUESTY_API_KEY.provider/modelnames.Documentation