Add Requesty as an opt-in OpenAI-compatible model provider - #283
Open
Thibaultjaigu wants to merge 1 commit into
Open
Add Requesty as an opt-in OpenAI-compatible model provider#283Thibaultjaigu wants to merge 1 commit into
Thibaultjaigu wants to merge 1 commit into
Conversation
Registers Requesty through the existing openai-completions models.json path with REQUESTY_API_KEY and an optional REQUESTY_BASE_URL for the EU router. The catalog is fetched from /v1/models/managed, optionally merged with the full /v1/models list, and mapped to context window, output limit, pricing, reasoning and vision metadata. feynman model login requesty walks through base URL, key and catalog choice. Provider list, catalog label, credential catalog, .env.example, README, RELEASES and website docs mirror OpenRouter.
|
@Thibaultjaigu is attempting to deploy a commit to the Advait Paliwal's projects Team on Vercel. A member of the Team first needs to authorize it. |
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.
Summary
Adds Requesty (router.requesty.ai) as an opt-in gateway provider alongside OpenRouter. Pi has no built-in Requesty id, so it is registered through the existing openai-compatible models.json path with
REQUESTY_API_KEYand an optionalREQUESTY_BASE_URLfor the EU router. One key reaches 700+ models plus Requesty's managed routing policies (short ids such asclaude-sonnet-4-5orgpt-5.4-mini).Changes
src/model/requesty.ts: constants, base URL resolution honoringREQUESTY_BASE_URL, catalog fetch with an 8s timeout, and field mapping toModelsJsonModelConfig(context window, output limit, input/output/cache pricing converted to per million, reasoning and vision flags, chat models only).GET /v1/models/managedis the primary source;GET /v1/modelsis merged on request or used as the fallback when the managed list is unavailable.src/model/commands.ts:feynman model login requestywalks through base URL (EU hint), key paste or$REQUESTY_API_KEY, and the catalog choice (managed only, about 150 entries, or managed plus full catalog, about 900).CustomProviderSetupgains typedmodelsand averifyModelIdsopt-out, since managed ids are not all listed by/models.src/model/models-json.ts: exportsModelsJsonModelConfig;ProviderConfigPatch.modelsis typed with it.src/model/api-key-providers.ts,src/model/catalog.ts,src/workbench/credential-catalog.ts:requestyentry after openrouter, label, credential section..env.example,README.md,RELEASES.md(Unreleased, Model providers), website docs (setup.mdnew Requesty section,configuration.md,cli-commands.md).tests/requesty.test.ts(8 tests: mapping, defaults, merge, env base URL, mocked managed first / merge / fallback, Pi registry round trip via models.json, label and credential catalog).tests/model-harness.test.tsgainsREQUESTY_API_KEYin the env key list and a gateway test;tests/catalog-snapshot.test.tsaddsrequesty/deepseek-v4-proto the bypass list.Requesty is not added to any automatic model preference, judge or fallback list; it is only used when selected.
Validation
npx tsc --noEmitandnpm run typecheck(including workbench-web) pass.git diff --checkclean, no lockfile churn.tests/requesty.test.ts8/8 pass; catalog-snapshot, model-harness, content-policy, workbench-setup-decisions and workbench-secret-ledgers all pass. Fullnpm test: 1210 pass, with 1 failure (native-bundle-runtimeoffline repair, blocked by the sandbox) and 3 cancelled stream watchdog tests that behave identically on a cleanmainin this environment.fetchRequestyCatalogtoupsertProviderConfigtocreateModelRegistryto pi-aicomplete): managed catalog 154 models, merged 932, registry exposed 885 requesty models, andrequesty/openai/gpt-4o-minireturned a reply withstopfinish reason. The ids used in docs and tests (openai/gpt-4o-mini,claude-sonnet-4-5,gpt-5.4-mini,deepseek-v4-pro) were confirmed in the live listings.Disclosure: I work at Requesty. Happy to adjust anything to match project conventions.