Skip to content

feat(ai-providers): add Requesty as an AI provider - #3128

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

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

Conversation

@Thibaultjaigu

Copy link
Copy Markdown

Adds Requesty, an OpenAI-compatible LLM router, as an AI provider. It is wired exactly like OpenRouter and goes through the same OpenAICompatibleProvider transport, so there is no new client code.

Changes

  • AIModels.swift: new requesty case on AIProviderType, placed after openRouter, with display name, default endpoint https://router.requesty.ai (resolves to /v1/chat/completions and /v1/models) and the arrow.triangle.branch symbol. Auth and endpoint style fall through to the defaults OpenRouter uses (API key, chat completions).
  • AIProviderRegistration.swift: .requesty added 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).
  • Tests: .requesty added to the HTTP API-key provider capability test, and an endpoint resolution case next to the OpenRouter one.
  • docs/security/privacy.mdx: router.requesty.ai added 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

  1. Settings > AI > Add Provider > Requesty.
  2. Paste a key from https://app.requesty.ai/api-keys (the key is sent as Authorization: Bearer).
  3. Pick a model from the fetched list or type one, for example openai/gpt-4o-mini or anthropic/claude-sonnet-4-5, then Test Connection.
  4. EU routing: set the Base URL to https://router.eu.requesty.ai.

Checks

  • swiftlint lint --strict on the four touched Swift files: clean.
  • docs/scripts checks (writing style, docs against source, links): all pass.
  • Not built locally: this machine has no Xcode, only the Command Line Tools with Swift 5.10, so I could not run xcodebuild build or the test target. I did a manual compile review instead: the three exhaustive switches over AIProviderType (displayName, defaultEndpoint, symbolName) each get a .requesty arm, authStyle and endpointStyle keep their default: arms, and no other switch names openRouter. AIProviderCapabilitiesTests.everyTypeHasDescriptor and AIEndpointTests.resolvesEveryDefaultEndpoint cover the new case through allCases.
  • Live check: I compiled OpenAICompatibleProvider.swift unchanged together with AIModels.swift, AIEndpoint.swift and the chat wire types it depends on into a small command line harness, built an AIProviderConfig(type: .requesty, model: "openai/gpt-4o-mini") and used its endpoint. fetchAvailableModels() returned 762 models, testConnection() returned true, and streamChat streamed a reply with usage (14 input, 4 output tokens).

Disclosure: I work at Requesty. Happy to adjust anything to match project conventions.

This branch has not been deployed

No deployments
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