Skip to content

feat(providers): add Requesty provider to TS and Python SDKs - #1150

Open
Thibaultjaigu wants to merge 1 commit into
superagent-ai:mainfrom
Thibaultjaigu:feat/requesty-provider
Open

feat(providers): add Requesty provider to TS and Python SDKs#1150
Thibaultjaigu wants to merge 1 commit into
superagent-ai:mainfrom
Thibaultjaigu:feat/requesty-provider

Conversation

@Thibaultjaigu

@Thibaultjaigu Thibaultjaigu commented Jul 12, 2026

Copy link
Copy Markdown

Summary

Adds a dedicated requesty provider to both the TypeScript and Python SDKs, mirroring the existing OpenRouter provider.

Requesty (https://requesty.ai, docs: https://docs.requesty.ai) is an OpenAI-compatible LLM router. Because it uses the same OpenAI Chat Completions wire format and Bearer auth as OpenRouter, the new provider reuses the same request/response transforms.

Details

  • Base URL: https://router.requesty.ai/v1/chat/completions
  • Env var: REQUESTY_API_KEY
  • Model naming: requesty/{provider}/{model} (e.g. requesty/openai/gpt-4o-mini), same nested convention OpenRouter uses since parseModel/parse_model split on the first /.

Changes

  • sdk/typescript/src/providers/requesty.ts — new provider (mirror of openrouter.ts)
  • sdk/typescript/src/providers/index.ts — registered requesty in the provider registry
  • sdk/python/src/safety_agent/providers/requesty.py — new provider (mirror of openrouter.py)
  • sdk/python/src/safety_agent/providers/__init__.py — registered requesty in the provider registry
  • Added requesty/openai/gpt-4o-mini to the guard/redact provider test matrices in both SDKs
  • Documented Requesty in docs/content/docs/sdk/providers.mdx (table, env setup, usage example, text-only note) and the TypeScript README provider table

Testing

TypeScript (Node 24):

  • npm run build (tsc) — clean
  • npx vitest run — 153 tests pass (guard/redact matrices include the new requesty/... model)

Python (3.12 venv, editable install):

  • pytest — 165 tests pass
  • ruff check on touched files — no new findings

Live endpoint check through the actual provider code path (Python call_provider("requesty/openai/gpt-4o-mini", ...) against https://router.requesty.ai/v1) returned a successful completion, confirming base URL, auth header, model naming, and the request/response transforms all work end to end.

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.


Note

Low Risk
Additive provider registration and documentation; no changes to auth, guard defaults, or shared call paths beyond a new registry entry.

Overview
Adds Requesty as a first-class LLM provider in the TypeScript and Python SDKs, following the same pattern as OpenRouter (OpenAI Chat Completions wire format, Bearer auth, nested requesty/{provider}/{model} names).

New requesty modules register in each SDK’s provider registry (REQUESTY_API_KEY, base URL https://router.requesty.ai/v1/chat/completions). guard and redact provider test matrices include requesty/openai/gpt-4o-mini. Docs (providers.mdx, TypeScript README) cover the provider table, env setup, usage example, and text-only (no vision) note.

Reviewed by Cursor Bugbot for commit 2b9f9a6. Configure here.

Add a dedicated "requesty" provider mirroring the existing OpenRouter
provider in both the TypeScript and Python SDKs. Requesty is an
OpenAI-compatible LLM router, so it reuses the same request/response
transforms and Bearer auth as OpenRouter.

- Base URL: https://router.requesty.ai/v1/chat/completions
- Env var: REQUESTY_API_KEY
- Model naming: requesty/{provider}/{model} (e.g. requesty/openai/gpt-4o-mini)

Registered in both provider registries, added to the guard/redact
provider test matrices, and documented in the providers docs table and
the TypeScript README.

Signed-off-by: Thibault Jaigu <thibault.jaigu@gmail.com>
@vercel

vercel Bot commented Jul 12, 2026

Copy link
Copy Markdown

@Thibaultjaigu is attempting to deploy a commit to the Superagent Team on Vercel.

A member of the Team first needs to authorize it.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want higher recall? High effort reviews run extra passes and find more bugs. A team admin can switch effort levels in the Cursor dashboard.

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 2b9f9a6. Configure here.

"groq": groq_provider,
"fireworks": fireworks_provider,
"openrouter": openrouter_provider,
"requesty": requesty_provider,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesty skips structured output

Medium Severity

Registering requesty enables models like requesty/openai/gpt-4o-mini in guard() and redact(), but _supports_structured_output / supportsStructuredOutput only special-case openrouter, not requesty. Those flows therefore omit JSON schema response_format for Requesty where the same nested model would use structured output via OpenRouter.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 2b9f9a6. Configure here.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Thibaultjaigu could you have a look at this and I will have it merged.

@homanp homanp left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Thibaultjaigu Thanks for adding this. Could please check the bugbot comment?

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.

2 participants