Repository navigation
feat: add Requesty as a named AI provider - #588
Open
Thibaultjaigu wants to merge 1 commit into
Open
Thibaultjaigu wants to merge 1 commit into
Thibaultjaigu wants to merge 1 commit into
Conversation
Requesty is an OpenAI-compatible gateway, so RequestyEngine reuses OpenAiEngine with the Requesty base URL (https://router.requesty.ai/v1) by default while still allowing OCO_API_URL to override it (for example the EU endpoint). Registered alongside OpenRouter and OrcaRouter in the provider enum, config validators, model list, key and billing URLs, recommended model, engine factory, setup picker and model cache. Model discovery merges the managed policies list with the full catalog, fetching each on its own. Includes unit tests, README docs and the rebuilt bundle.
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 as a named AI provider. Requesty is an OpenAI-compatible gateway, so
RequestyEnginereusesOpenAiEnginethe same wayOrcaRouterEnginedoes. It defaults tohttps://router.requesty.ai/v1andOCO_API_URLcan still override it, for examplehttps://router.eu.requesty.ai/v1for the EU region.Changes
src/engine/requesty.ts: newRequestyEngine, only sets the base URL and provider namesrc/utils/provider.ts:OCO_AI_PROVIDER_ENUM.REQUESTYplus the API key requirementsrc/commands/config.ts:MODEL_LIST.requesty, default and recommended modelopenai/gpt-4o-mini, API key URL, validatorssrc/utils/engine.ts: engine dispatchsrc/utils/errors.ts: billing URL and recommended modelsrc/utils/modelCache.ts:fetchRequestyModelslists the managed policies (/v1/models/managed) first, then the full catalog (/v1/models), chat models only. Each list is fetched on its own so one failing does not drop the other, and it falls back toMODEL_LIST.requesty. Both endpoints work without a key, so the listing is not gated on one.src/commands/setup.ts: setup picker entry "Requesty (Multiple providers)"README.md: provider list and a "Use Requesty as the model gateway" sectiontest/unit/requesty.test.ts,test/unit/modelCache.test.ts,test/unit/setup.test.ts: provider coverageout/cli.cjs: rebuilt bundle (a clean build of master reproduces the committed bundle byte for byte, so the bundle diff is only this change)How to test
Keys come from https://app.requesty.ai/api-keys.
Validation
npm run lint(biome +tsc --noEmit): cleanprettier --checkon changed files: cleannpm test: 23 suites, 191 tests passednpm run build: succeedsRequestyEngine.generateCommitMessagewithopenai/gpt-4o-minireturned 200 and a commit message (feat: add greeting to a.txt).fetchRequestyModelsreturned 876 models without a key and 921 with one.Disclosure: I work at Requesty. Happy to adjust anything to match project conventions.