feat: add Requesty as an OpenAI-compatible upstream#18
Open
Thibaultjaigu wants to merge 1 commit into
Open
Conversation
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.
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 URLhttps://router.requesty.ai/v1,Authorization: Bearer <key>,provider/modelnaming such asopenai/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)
packages/codex-provider-relay/src/capabilities/capability_presets.ts):'requesty'to theOpenAICompatibleCapabilityPresetIdunion.requestypreset toPRESETS(apiKeyEnv: REQUESTY_API_KEY,baseUrl: https://router.requesty.ai/v1,defaultModel: openai/gpt-4o-mini,ownedBy: requesty).{ presetId: 'requesty', envPrefix: 'REQUESTY' }entry toOPENAI_COMPATIBLE_PROFILE_PRESET_REGISTRATIONSso it is loaded from env exactly like the other presets.'requesty'to thenormalizePresetIdswitch.packages/codex-provider-relay/src/capabilities/cliproxy_model_catalog.ts): added'requesty'toCliproxyModelCategoryand arequesty/openai/gpt-4o-minicatalog entry mirroring the OpenRouter one.README.md): addedREQUESTY_API_KEY / REQUESTY_BASE_URL / REQUESTY_DEFAULT_MODELto the "Supported smoke env names" block, plus the provider listings and theCODEX_COMPAT_CAPABILITIES/ optional-keys references.test/providers/openai_compatible/live_provider_smoke.test.ts): added arequestyentry to the livePROVIDERSlist so the new env group is actually consumed (the preset registration drivesREQUESTY_*env loading vialoadCodexProfilesFromEnv), not docs-only.packages/codex-provider-relay/docs/RECIPES.md,LIVE_SMOKE_RECIPES.md): added a parallel RequestyCodexProviderRuntimerecipe (upstreamBaseUrl: "https://router.requesty.ai/v1",providerLabel: "requesty",apiKey: process.env.REQUESTY_API_KEY,defaultModel: "openai/gpt-4o-mini"), arequestycapability-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.tsc --noEmiterror count is identical before and after this change (pre-existing, unrelated test-file type issues only); my edited files introduce no new errors.getOpenAICompatibleProviderPreset('requesty')resolves tobaseUrl https://router.requesty.ai/v1,apiKeyEnv REQUESTY_API_KEY,defaultModel openai/gpt-4o-mini, and that theREQUESTYregistration is present.https://router.requesty.ai/v1/chat/completionswithopenai/gpt-4o-minireturned 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.