feat(ai-providers): add Requesty as an AI provider - #3128
Open
Thibaultjaigu wants to merge 1 commit into
Open
Thibaultjaigu wants to merge 1 commit into
Thibaultjaigu wants to merge 1 commit into
Conversation
This branch has not been deployed
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, an OpenAI-compatible LLM router, as an AI provider. It is wired exactly like OpenRouter and goes through the same
OpenAICompatibleProvidertransport, so there is no new client code.Changes
AIModels.swift: newrequestycase onAIProviderType, placed afteropenRouter, with display name, default endpointhttps://router.requesty.ai(resolves to/v1/chat/completionsand/v1/models) and thearrow.triangle.branchsymbol. Auth and endpoint style fall through to the defaults OpenRouter uses (API key, chat completions).AIProviderRegistration.swift:.requestyadded to the OpenAI-compatible family loop next to.openRouter, so it gets the same capabilities (chat, models, reasoning, images, configurable Base URL, max output tokens, model list fetch)..requestyadded to the HTTP API-key provider capability test, and an endpoint resolution case next to the OpenRouter one.docs/security/privacy.mdx:router.requesty.aiadded to the list of preset endpoints.CHANGELOG.md: entry under Unreleased, Added.It is not the default provider and is only used when picked from Add Provider.
How to test
Authorization: Bearer).openai/gpt-4o-minioranthropic/claude-sonnet-4-5, then Test Connection.https://router.eu.requesty.ai.Checks
swiftlint lint --stricton the four touched Swift files: clean.docs/scriptschecks (writing style, docs against source, links): all pass.xcodebuild buildor the test target. I did a manual compile review instead: the three exhaustive switches overAIProviderType(displayName,defaultEndpoint,symbolName) each get a.requestyarm,authStyleandendpointStylekeep theirdefault:arms, and no other switch namesopenRouter.AIProviderCapabilitiesTests.everyTypeHasDescriptorandAIEndpointTests.resolvesEveryDefaultEndpointcover the new case throughallCases.OpenAICompatibleProvider.swiftunchanged together withAIModels.swift,AIEndpoint.swiftand the chat wire types it depends on into a small command line harness, built anAIProviderConfig(type: .requesty, model: "openai/gpt-4o-mini")and used its endpoint.fetchAvailableModels()returned 762 models,testConnection()returned true, andstreamChatstreamed a reply with usage (14 input, 4 output tokens).Disclosure: I work at Requesty. Happy to adjust anything to match project conventions.