Skip to content

Add Requesty as an opt-in OpenAI-compatible model provider - #283

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

Add Requesty as an opt-in OpenAI-compatible model provider#283
Thibaultjaigu wants to merge 1 commit into
advaitpaliwal:mainfrom
Thibaultjaigu:add-requesty-provider

Conversation

@Thibaultjaigu

Copy link
Copy Markdown

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_KEY and an optional REQUESTY_BASE_URL for the EU router. One key reaches 700+ models plus Requesty's managed routing policies (short ids such as claude-sonnet-4-5 or gpt-5.4-mini).

Changes

  • New src/model/requesty.ts: constants, base URL resolution honoring REQUESTY_BASE_URL, catalog fetch with an 8s timeout, and field mapping to ModelsJsonModelConfig (context window, output limit, input/output/cache pricing converted to per million, reasoning and vision flags, chat models only). GET /v1/models/managed is the primary source; GET /v1/models is merged on request or used as the fallback when the managed list is unavailable.
  • src/model/commands.ts: feynman model login requesty walks 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). CustomProviderSetup gains typed models and a verifyModelIds opt-out, since managed ids are not all listed by /models.
  • src/model/models-json.ts: exports ModelsJsonModelConfig; ProviderConfigPatch.models is typed with it.
  • src/model/api-key-providers.ts, src/model/catalog.ts, src/workbench/credential-catalog.ts: requesty entry after openrouter, label, credential section.
  • .env.example, README.md, RELEASES.md (Unreleased, Model providers), website docs (setup.md new Requesty section, configuration.md, cli-commands.md).
  • Tests: new 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.ts gains REQUESTY_API_KEY in the env key list and a gateway test; tests/catalog-snapshot.test.ts adds requesty/deepseek-v4-pro to 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 --noEmit and npm run typecheck (including workbench-web) pass. git diff --check clean, no lockfile churn.
  • tests/requesty.test.ts 8/8 pass; catalog-snapshot, model-harness, content-policy, workbench-setup-decisions and workbench-secret-ledgers all pass. Full npm test: 1210 pass, with 1 failure (native-bundle-runtime offline repair, blocked by the sandbox) and 3 cancelled stream watchdog tests that behave identically on a clean main in this environment.
  • Live, through the repo code path (fetchRequestyCatalog to upsertProviderConfig to createModelRegistry to pi-ai complete): managed catalog 154 models, merged 932, registry exposed 885 requesty models, and requesty/openai/gpt-4o-mini returned a reply with stop finish 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.

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.
@vercel

vercel Bot commented Sep 11, 2026

Copy link
Copy Markdown

@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.

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