feat(ai-providers): add Requesty as an AI provider - #3128
Thibaultjaigu wants to merge 1 commit into
Conversation
|
Hi @Thibaultjaigu, thanks for the contribution. Why we don't just use the OpenAI Compatible provider instead of creating new providers? |
c436262 to
0372d16
Compare
|
Fair question. Custom works for Requesty today, so this is only about setup, and the delta is small. It is the same footprint as the OpenRouter entry and reuses
It does not add pricing, curated models or extra headers. I checked the requests the app builds against the live API: I also rebased onto main (v0.76.0) and moved the changelog line under Unreleased. If you would rather keep the provider list short, that is fine too: I can close this and send a docs PR instead, with a row in |
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.