feat(requesty): add Requesty provider#2435
Open
Thibaultjaigu wants to merge 1 commit into
Open
Conversation
Add Requesty (https://requesty.ai), an OpenAI-compatible LLM router, as a provider, mirroring the existing OpenRouter provider. - instructor/v2/providers/requesty/ (from_requesty factory + JSON-schema handler) - Provider.REQUESTY enum + get_provider URL detection - PROVIDER_SPECS spec entry + OpenAI-compat/parallel-tools registration - from_provider('requesty/<provider>/<model>') dispatch + _build_requesty - instructor.__init__ export + lazy import - docs/integrations/requesty.md + mkdocs nav + example + CHANGELOG Signed-off-by: Thibault Jaigu <thibault.jaigu@gmail.com>
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.
Summary
Adds Requesty — an OpenAI-compatible LLM router — as a provider, mirroring the existing OpenRouter provider (
instructor/v2/providers/openrouter/). Requesty exposes 400+ models through one endpoint, addressed asprovider/model.Changes
instructor/v2/providers/requesty/—from_requesty()factory +RequestyJSONSchemaHandler(mirrors the OpenRouter provider; reuses the generic OpenAI-compatible JSON-schema wiring)instructor/v2/core/providers.py—Provider.REQUESTY+get_provider()URL detectioninstructor/v2/core/provider_specs.py—PROVIDER_SPECSentry (TOOLS / JSON_SCHEMA / MD_JSON / PARALLEL_TOOLS)instructor/v2/providers/openai/handlers.py— Requesty added to the OpenAI-compat + parallel-tools provider sets (same as OpenRouter)instructor/__init__.py— export + lazy import forfrom_requestyinstructor/v2/auto_client.py—_build_requesty()(base URLhttps://router.requesty.ai/v1, envREQUESTY_API_KEY) +requestyin the provider builders andsupported_providersdocs/integrations/requesty.md+mkdocs.ymlnav +examples/open_source_examples/requesty.py+ CHANGELOG entryTesting
Verified end-to-end through the real
from_provider("requesty/openai/gpt-4o-mini")code path against the live endpoint: a structured extraction into a Pydantic model returned the expected value.ruff checkis clean on the touched files.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.