Skip to content

feat: add Requesty as an OpenAI-compatible binding#701

Open
Thibaultjaigu wants to merge 1 commit into
ParisNeo:mainfrom
Thibaultjaigu:add-requesty-binding
Open

feat: add Requesty as an OpenAI-compatible binding#701
Thibaultjaigu wants to merge 1 commit into
ParisNeo:mainfrom
Thibaultjaigu:add-requesty-binding

Conversation

@Thibaultjaigu

Copy link
Copy Markdown

Add Requesty as an OpenAI-compatible binding

This PR adds a new requesty binding to zoos/bindings_zoo/, mirroring the existing open_router binding as closely as possible. Requesty is an OpenAI-compatible LLM gateway/router, so the request/response shapes and the binding logic are identical to OpenRouter.

What it does

  • Base URL: https://router.requesty.ai/v1 (chat at /v1/chat/completions, model list at /v1/models)
  • Auth: Authorization: Bearer <key> via a requesty_key config field (or the REQUESTY_API_KEY environment variable)
  • Model naming: provider/model (e.g. openai/gpt-4o-mini)
  • The /v1/models endpoint is OpenAI-shaped (a data array), consumed by the models scraper

New files (zoos/bindings_zoo/requesty/)

  • __init__.pyclass Requesty(LLMBinding), binding_name = "Requesty", binding_folder_name = "requesty", DEFAULT_CONFIG with requesty_key, override_api_url = "https://router.requesty.ai/v1", API_URL = "https://router.requesty.ai/v1/models". All LLMBinding method logic is identical to the OpenRouter binding (OpenAI-compatible).
  • models_scraper.pyclass RequestyModelFetcher, API_URL = "https://router.requesty.ai/v1/models". Same OpenAI-shaped data-array parsing as the OpenRouter scraper. Requesty's model objects expose context_window and capability flags (supports_vision, etc.) instead of OpenRouter's architecture/pricing objects, so the field reads are guarded defensively with .get() and sensible fallbacks (mirroring the OpenRouter scraper's defensive style). The output YAML structure is preserved field-for-field.
  • binding_card.yaml — Requesty metadata.
  • models.yaml — generated by running the new scraper against the live /v1/models endpoint (550 models).
  • requirements.txt, .gitignore — copied unchanged from the OpenRouter binding.

Discovery / registry

Bindings in zoos/bindings_zoo/ are auto-discovered by directory scan — there is no central binding registry/list to edit. A grep for open_router/openrouter across *.py/*.yaml/*.json (excluding the binding dir and tests) found only scraped model artifacts, no code-level registry. So the new directory is sufficient.

Logo

The OpenRouter binding ships logo.png/logo2.png. I intentionally omitted these rather than ship the OpenRouter-branded image under a Requesty binding; the binding falls back to the default icon. Happy to add a proper Requesty logo if you'd like one included.

Verification

  • ast.parse on both __init__.py and models_scraper.py — OK.
  • yaml.safe_load on binding_card.yaml and models.yaml — OK.
  • Confirmed the requesty/ directory mirrors open_router/ file-for-file (minus the omitted logos), with all OpenRouter identifiers/URLs/keys renamed.
  • Live POST https://router.requesty.ai/v1/chat/completions (model openai/gpt-4o-mini) → HTTP 200, real completion returned.
  • Live GET https://router.requesty.ai/v1/models → HTTP 200, data array with 572 models (proves the scraper path works end-to-end).

Docs: https://requesty.ai , 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant