feat(providers): add Requesty as an OpenAI-compatible provider - #138
feat(providers): add Requesty as an OpenAI-compatible provider#138Thibaultjaigu wants to merge 1 commit into
Conversation
Requesty is an OpenAI-compatible LLM gateway using the same provider/model naming as OpenRouter, so this mirrors the existing OpenRouter provider on the generic openai_compat path. - core/providers/registry.py: requesty ProviderSpec (base URL https://router.requesty.ai/v1, REQUESTY_API_KEY, is_gateway) - core/providers/openai_compat.py: HTTP-Referer/X-Title attribution headers - new_ui/backend/services/requesty_models.py: models catalog service mapping Requesty's context_window / supports_* / flat price fields to the internal shape - new_ui/backend/api/routes/config.py: GET /config/requesty/models - core/config.py + deepcode_config.json.example + README provider list - tests mirroring the openrouter provider + models normalization Verified: ruff clean, 8 new tests pass; live completion through the provider code path and /v1/models both succeed against router.requesty.ai. Signed-off-by: Thibault Jaigu <thibault.jaigu@gmail.com>
Ports three provider contributions that could not merge as submitted: #138 and #130 also touched new_ui/ and nanobot/, and #116 targeted nanobot/ only. Those trees were removed in the v2.0 refactor. The provider work itself applies unchanged to core/providers. ProvidersConfig reads each provider via getattr(providers, spec.name), so a ProviderSpec without a matching field is silently skipped — all three get both halves, as the ProvidersConfig docstring requires. Endpoints verified reachable: router.requesty.ai (200), api.minimax.io (401), api.forge.tensorblock.co (401). Also fixes a gateway bug #116 found in nanobot's provider that core had only half-fixed: spec.env_key was forced for gateways, but env_extras still used setdefault, so a stale ambient variable outranked the gateway the user picked. Dropped from the originals: the tests covering new_ui's requesty_models service and nanobot's registry. One of those imported "nanobot.config.schema", which now resolves to an unrelated PyPI package (nanobot-ai) when installed — it fails locally and skips in CI, testing nothing either way. Co-authored-by: Thibault Jaigu <thibault.jaigu@gmail.com> Co-authored-by: Yiiii0 <yiqiaozhou@outlook.com> Co-authored-by: octo-patch <octo-patch@github.com> Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Ported to Closing this branch rather than merging it because it also touched
Worth noting what sold this one: |
Adds Requesty as an OpenAI-compatible provider, mirroring the existing OpenRouter provider. Requesty is an LLM gateway that uses the same
provider/modelnaming convention as OpenRouter (e.g.openai/gpt-4o-mini,anthropic/claude-sonnet-4-5).Changes:
core/providers/registry.py— arequestyProviderSpecafter openrouter:openai_compatbackend,is_gateway, default base URLhttps://router.requesty.ai/v1, envREQUESTY_API_KEY.core/providers/openai_compat.py— forwardsHTTP-Referer/X-Titleattribution headers for Requesty (parallel to the OpenRouter path).new_ui/backend/services/requesty_models.py— models catalog service mirroringopenrouter_models.py, mapping Requesty'scontext_window,supports_tool_calling/supports_reasoningbooleans, and flatinput_price/output_priceto the internal model shape.new_ui/backend/api/routes/config.py—GET /config/requesty/models.core/config.py,deepcode_config.json.example,README.md— provider config + docs.tests/test_requesty_provider.py— mirrors the OpenRouter provider tests plus the models normalization.Testing:
ruff checkclean; 8 new tests pass and the existing model-compat tests still pass. Live-verified: a chat completion through the actual DeepCode provider path (make_llm_provider("requesty") -> OpenAICompatProvider) returned successfully againsthttps://router.requesty.ai/v1, and the models service normalized the live/v1/modelspayload (605 models).Note: the React model-selector UI (
new_ui/frontend) was left untouched to avoid shipping a partial frontend change; the backend/config/requesty/modelsroute is in place for a follow-up to wire the selector.Docs: https://requesty.ai · https://docs.requesty.ai · https://app.requesty.ai/api-keys · https://app.requesty.ai/router/list
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.