feat(agent): add Requesty as an LLM provider#1786
Open
Thibault Jaigu (Thibaultjaigu) wants to merge 1 commit into
Open
feat(agent): add Requesty as an LLM provider#1786Thibault Jaigu (Thibaultjaigu) wants to merge 1 commit into
Thibault Jaigu (Thibaultjaigu) wants to merge 1 commit into
Conversation
Requesty is an OpenAI-compatible LLM gateway that uses the same provider/model naming convention as OpenRouter, so this mirrors the existing OpenRouter provider on the generic OpenAI-compatible path (createOpenAICompatible + a dedicated fetch), not the openrouter SDK. - apps/server/src/lib/requesty-fetch.ts: createRequestyCompatibleFetch mirroring openrouter-fetch.ts (APICallError extraction, SDK-default retryable handling for Requesty's transient 502s) - provider-factory.ts + clients/llm/provider.ts: register requesty (baseURL https://router.requesty.ai/v1, apiKey, HTTP-Referer/X-Title headers) - packages/shared: REQUESTY_API url constant + REQUESTY in the LLM_PROVIDERS schema - apps/app: provider type, template (base URL, api-keys/docs links), form-schema enum, icon fallback - server + eval READMEs: Requesty added to the provider lists Verified: @browseros/server typecheck passes; live chat/completions to router.requesty.ai succeeds. The models.dev catalog is generated from an upstream that does not list Requesty, so it is intentionally not edited here. Signed-off-by: Thibault Jaigu <thibault.jaigu@gmail.com>
Contributor
|
PR author is not in the allowed authors list. |
Contributor
|
Thank you for your contribution! Before we can merge this PR, we need you to sign our Contributor License Agreement. To sign the CLA, please add a comment to this PR with the following text: You only need to sign once. After signing, this check will pass automatically. Troubleshooting
|
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.
Adds Requesty as an LLM provider, mirroring the existing OpenRouter provider. Requesty is an OpenAI-compatible LLM gateway that uses the same
provider/modelnaming convention as OpenRouter (e.g.openai/gpt-4o-mini,anthropic/claude-sonnet-4-5).Requesty is wired on the generic OpenAI-compatible path (
createOpenAICompatible+ a dedicated compatible-fetch), not the OpenRouter SDK, since it carries no OpenRouter-specific provider-routing bits.Changes:
apps/server/src/lib/requesty-fetch.ts—createRequestyCompatibleFetch()mirroringopenrouter-fetch.ts: extracts detailed upstream errors and throwsAPICallErrorso the AI SDK's retry logic handles Requesty's transient 502s.apps/server/src/agent/provider-factory.tsandapps/server/src/lib/clients/llm/provider.ts— register therequestyprovider (base URLhttps://router.requesty.ai/v1,apiKey,HTTP-Referer/X-Titleattribution headers).packages/shared/src/constants/urls.ts—REQUESTY_APIURL constant;packages/shared/src/schemas/llm.ts—REQUESTYadded toLLM_PROVIDERS, the enum type, and the zod enum.apps/app/lib/llm-providers/*— provider type, template (base URL,app.requesty.ai/api-keys,docs.requesty.ai), form-schema enum, and an icon fallback (the pinned icon set has no Requesty glyph).Testing:
@browseros/servertypecheck passes (exit 0); none of the edited files produce type errors. Live-verified: a chat/completions call tohttps://router.requesty.ai/v1withopenai/gpt-4o-miniand the attribution headers returned successfully.Notes:
models.devcatalog (models-dev-data.json) is generated from an upstream that does not list Requesty, so it is intentionally not edited here.@browseros/apptypecheck errors are missing generated GraphQL modules (@/generated/graphql/*), unrelated to this change.Docs: https://requesty.ai · https://docs.requesty.ai · https://app.requesty.ai/api-keys · https://app.requesty.ai/router/list
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.