Skip to content

feat: add Requesty provider#20

Merged
zakirkun merged 1 commit into
zakirkun:mainfrom
Thibaultjaigu:add-requesty-provider
Jun 26, 2026
Merged

feat: add Requesty provider#20
zakirkun merged 1 commit into
zakirkun:mainfrom
Thibaultjaigu:add-requesty-provider

Conversation

@Thibaultjaigu

Copy link
Copy Markdown
Contributor

Summary

Adds Requesty as an OpenAI-compatible LLM provider, implemented as a new RequestyProvider(BaseProvider) that mirrors the existing OpenRouterProvider as closely as possible.

Requesty is an OpenAI-compatible LLM gateway:

  • Base URL: https://router.requesty.ai/v1
  • Auth: Authorization: Bearer $REQUESTY_API_KEY
  • Model naming: provider/model (same convention as OpenRouter, e.g. openai/gpt-4o-mini)

Implementation

ai/providers/requesty_provider.py copies the OpenRouter provider's structure:

  • Reads ai_config.get("requesty", {})
  • API key from config or REQUESTY_API_KEY env var
  • Backend is ChatOpenAI(openai_api_base="https://router.requesty.ai/v1", ...)
  • Default model openai/gpt-4o-mini
  • generate_with_usage sets the response dict "provider" field to "requesty"
  • All other logic (context formatting, sync/async generate, availability check) is identical to OpenRouter.

Wiring sites updated

  • ai/providers/__init__.py — registered "requesty" in the in-tree PROVIDERS registry
  • config/guardian.yaml — added a requesty: config block, updated the active-provider comment, and added a pricing entry
  • cli/commands/scan.py, workflow.py, recon.py — added requesty to each valid_providers list and the --provider help text
  • cli/commands/models.py — added a "REQUESTY MODELS" table section and the env-var hint
  • tests/test_provider_plugins.py — added requesty to the in-tree provider assertion tuple
  • README.md — added Requesty to provider lists/counts, config snippet, env-var examples, architecture/structure diagrams, and an API-key link

Verification

  • Ran a live chat completion against https://router.requesty.ai/v1/chat/completions with model openai/gpt-4o-mini — received a successful 200 completion.
  • Ran python -m pytest tests/test_provider_plugins.py — all 7 tests pass.

Links

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.

@zakirkun zakirkun merged commit b64529a into zakirkun:main Jun 26, 2026
1 of 5 checks passed
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