Add Requesty as an LLM provider - #49
Merged
Merged
Conversation
Wires Requesty (OpenAI-compatible router) through the same code paths as OpenRouter: provider registry entry, keychain-backed API key, model catalog fetch from /v1/models, settings section, fallback chain, tools view and new tab model pickers. Requires APIProvider.requesty from AgentTools.
This was referenced Sep 12, 2026
Contributor
Author
|
CI note: the only compile error in the macOS run is |
Owner
|
Updated AgentTools and Agent repos. We will probably move APIProvider.swift to the main app in a future update and try to consolidate some of these entries, but not today. There is some risk involved. |
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
Re-adds Requesty as an LLM provider, this time wired through every code path a provider needs, following the shape of the OpenRouter and MiniMax integrations.
Depends on AgentiLoop/AgentTools#2, which adds
APIProvider.requesty. The Xcode project pins AgentTools to the1.0.0 ..< 10.0.0range, so once that lands and a tag is cut this builds without further changes here.Context
#25 added Requesty but, as the removal noted, the implementation was never completed: no keychain entry, no model catalog fetch, no settings section, no fallback chain or tools view support. This PR does all of that. Nothing from the old attempt is reused.
Requesty is an OpenAI-compatible router (
https://router.requesty.ai/v1), so requests go through the existingOpenAICompatibleServicepath via the registry, exactly like MiniMax. No new service type.Changes
Swift (12 files, all pre-existing since
project.pbxprojlists sources explicitly):Services/LLMProviderSetup.swift:requestyLLMProviderConfig(.cloudAPI,.openAIprotocol, chat and models URLs, streaming/tools/vision/systemPrompt) registered afteropenRouter.Services/KeychainService.swift:case requesty = "com.agent.requesty-api-key".AgentViewModel/Core/AgentViewModel.swift:requestyAPIKey(keychain backed),requestyModel(UserDefaults),requestyModels,isFetchingRequestyModels.AgentViewModel/Features/ModelFetching.swift:fetchRequestyModels()and a catalog fetcher forGET /v1/modelsthat keeps entries with a nonzerocontext_windowandsupports_tool_calling == true(the loop is tool driven). Ids are alreadyprovider/model, so the id is used as the display name.AgentViewModel/TaskExecution/Setup.swift:.requestyarm inresolveProviderAndModel(model name and vision detection); service construction falls through to the existing OpenAI-compatible default.AgentViewModel/Core/Colors.swift,AgentViewModel/Messages/Compression.swift,AgentViewModel/Features/ScriptTabs.swift: temperature, context window and global model / API key / display name arms, matching OpenRouter.Views/Settings/SettingsView.swift: Requesty section withLockedSecureFieldAPI key, model text field or picker, and refresh button.Views/Settings/FallbackChainView.swift,Views/Tabs/NewMainTabSheet.swift,Views/Tools/ToolsView.swift: model option and default model arms.Docs: the five READMEs go from 18 to 19 providers and gain a Requesty row after OpenRouter.
Intentionally not touched: the
OpenRouterProtocol/ Anthropic protocol switch (OpenRouter only), the OpenRouter free tier 429 handling inErrorHandler.swift, default fallback chains, judge or auto selection lists (OpenRouter is in none of them).Verification
case .foundationModelarm has matching.openRouterand.requestycounts; the remainingswitch providersites havedefault:. Compiling AgentTools from the Add Requesty to APIProvider AgentTools#2 branch and typechecking the changed files against it produced no "switch must be exhaustive" errors, and a control switch that omitted.requestydid fail withadd missing case: '.requesty'.GET https://router.requesty.ai/v1/modelsreturns 200 (with or without a key), 725 entries, 694 withsupports_tool_calling, all with a nonzerocontext_window.xcodebuildon this machine (no macOS 26 SDK), so please give it one build in Xcode with AgentTools bumped to a tag containing.requesty.Disclosure: I work at Requesty. Happy to adjust anything to match project conventions.