Skip to content

feat: add Requesty as an OpenAI-compatible upstream#18

Open
Thibaultjaigu wants to merge 1 commit into
Gan-Xing:mainfrom
Thibaultjaigu:add-requesty-provider
Open

feat: add Requesty as an OpenAI-compatible upstream#18
Thibaultjaigu wants to merge 1 commit into
Gan-Xing:mainfrom
Thibaultjaigu:add-requesty-provider

Conversation

@Thibaultjaigu

Copy link
Copy Markdown

Add Requesty as a supported OpenAI-compatible upstream

This adds Requesty as a first-class OpenAI-compatible upstream in codex-provider-relay, mirroring the existing OpenRouter provider as closely as possible. Requesty is an OpenAI-compatible LLM gateway (base URL https://router.requesty.ai/v1, Authorization: Bearer <key>, provider/model naming such as openai/gpt-4o-mini), so it slots into the same generic adapter path without any new provider plugin class.

What changed (mirrors OpenRouter at every wiring site)

  • Capability preset (packages/codex-provider-relay/src/capabilities/capability_presets.ts):
    • Added 'requesty' to the OpenAICompatibleCapabilityPresetId union.
    • Added a requesty preset to PRESETS (apiKeyEnv: REQUESTY_API_KEY, baseUrl: https://router.requesty.ai/v1, defaultModel: openai/gpt-4o-mini, ownedBy: requesty).
    • Added a { presetId: 'requesty', envPrefix: 'REQUESTY' } entry to OPENAI_COMPATIBLE_PROFILE_PRESET_REGISTRATIONS so it is loaded from env exactly like the other presets.
    • Added 'requesty' to the normalizePresetId switch.
  • Model catalog (packages/codex-provider-relay/src/capabilities/cliproxy_model_catalog.ts): added 'requesty' to CliproxyModelCategory and a requesty / openai/gpt-4o-mini catalog entry mirroring the OpenRouter one.
  • README smoke env group (README.md): added REQUESTY_API_KEY / REQUESTY_BASE_URL / REQUESTY_DEFAULT_MODEL to the "Supported smoke env names" block, plus the provider listings and the CODEX_COMPAT_CAPABILITIES / optional-keys references.
  • Smoke env consumer (test/providers/openai_compatible/live_provider_smoke.test.ts): added a requesty entry to the live PROVIDERS list so the new env group is actually consumed (the preset registration drives REQUESTY_* env loading via loadCodexProfilesFromEnv), not docs-only.
  • Recipes (packages/codex-provider-relay/docs/RECIPES.md, LIVE_SMOKE_RECIPES.md): added a parallel Requesty CodexProviderRuntime recipe (upstreamBaseUrl: "https://router.requesty.ai/v1", providerLabel: "requesty", apiKey: process.env.REQUESTY_API_KEY, defaultModel: "openai/gpt-4o-mini"), a requesty capability-preset server-env example, and a Requesty live-smoke env block. The OpenRouter examples are unchanged.

Verification

  • tsc -p packages/codex-provider-relay/tsconfig.json --noEmit — clean (0 errors).
  • tsx --test packages/codex-provider-relay/test/*.test.ts — 181 pass, 1 skip, 0 fail.
  • Root tsc --noEmit error count is identical before and after this change (pre-existing, unrelated test-file type issues only); my edited files introduce no new errors.
  • Confirmed via the real loader code path that getOpenAICompatibleProviderPreset('requesty') resolves to baseUrl https://router.requesty.ai/v1, apiKeyEnv REQUESTY_API_KEY, defaultModel openai/gpt-4o-mini, and that the REQUESTY registration is present.
  • Live chat completion against https://router.requesty.ai/v1/chat/completions with openai/gpt-4o-mini returned HTTP 200 with a real completion, confirming the documented base URL and model naming work.

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