feat: add Requesty as a model provider#1599
Conversation
Add Requesty (https://requesty.ai), an OpenAI-compatible LLM router, as a model provider by mirroring the existing OpenRouter integration. Backend: - app/services/requesty_model_normalizer.py: normalizes Requesty's /v1/models catalogue, mapping its flat capability booleans (supports_tool_calling/ supports_vision/supports_image_generation) and context_window field onto the shared normalized shape (Requesty differs from OpenRouter's architecture + supported_parameters + context_length layout) - provider_registry.py: Requesty ProviderSpec (OpenAI-compatible, base URL https://router.requesty.ai/v1, REQUESTY_API_KEY bearer auth) - model_connection_service.py: key verification + live model discovery - quality_score.py: Requesty score entry - unit tests mirroring the OpenRouter normalizer coverage Frontend: - Requesty provider icon + registration, metadata entry, and base-url hint Signed-off-by: Thibault Jaigu <thibault.jaigu@gmail.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@Thibaultjaigu is attempting to deploy a commit to the Rohan Verma's projects Team on Vercel. A member of the Team first needs to authorize it. |
Summary
Adds Requesty — an OpenAI-compatible LLM router — as a model provider, mirroring the existing OpenRouter integration. Requesty exposes 400+ models through one endpoint, addressed as
provider/model.Targets
devper CONTRIBUTING.md.Changes
Backend
app/services/requesty_model_normalizer.py— normalizes Requesty's/v1/modelscatalogue. Requesty's payload differs from OpenRouter's: capabilities are flat booleans (supports_tool_calling/supports_vision/supports_image_generation) rather than anarchitectureblock plus asupported_parametersarray, and context size iscontext_window(notcontext_length). This module maps those onto the same normalized shape the rest of the backend consumes, mirroringopenrouter_model_normalizer.py.app/services/provider_registry.py— RequestyProviderSpec(OpenAI-compatible, base URLhttps://router.requesty.ai/v1,REQUESTY_API_KEYbearer auth)app/services/model_connection_service.py— key verification branch + async live model discoveryapp/services/quality_score.py— Requesty score entry (mirrors OpenRouter)tests/unit/services/test_requesty_model_normalizer.py— unit tests mirroring the OpenRouter normalizer coverageFrontend
defaultBaseUrl), and base-url hint in the connect formTesting
https://router.requesty.ai/v1/models: the normalizer processed the real 605-model catalogue and produced 512 chat models (370 vision-capable), correctly readingcontext_windowand thesupports_*booleans.ruff checkclean on the new Python files.The provider icon is a neutral monochrome
currentColorplaceholder — happy to swap in an official Requesty brand asset if you prefer.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.
High-level PR Summary
This PR integrates Requesty, an OpenAI-compatible LLM router providing access to 400+ models, as a new model provider. The implementation closely mirrors the existing OpenRouter integration, adding backend model normalization logic to handle Requesty's specific API schema (flat boolean capabilities like
supports_tool_callingandsupports_vision, andcontext_windowsizing), along with provider registration, authentication, and model discovery. Frontend changes include adding the Requesty provider icon, metadata configuration with default base URL, and UI hints for the connection form. The normalizer filters for chat models with tool-calling support and sufficient context length (≥100k tokens), excluding certain providers like Amazon.⏱️ Estimated Review Time: 15-30 minutes
💡 Review Order Suggestion
surfsense_backend/app/services/requesty_model_normalizer.pysurfsense_backend/tests/unit/services/test_requesty_model_normalizer.pysurfsense_backend/app/services/provider_registry.pysurfsense_backend/app/services/model_connection_service.pysurfsense_backend/app/services/quality_score.pysurfsense_web/components/icons/providers/requesty.svgsurfsense_web/components/icons/providers/index.tssurfsense_web/lib/provider-icons.tsxsurfsense_web/components/settings/model-connections/provider-metadata.tsxsurfsense_web/components/settings/model-connections/default-connect-form.tsx