Open
Conversation
5 new issues
|
4dd7990 to
f4f1525
Compare
f4f1525 to
f4aa7a3
Compare
Scra3
reviewed
Mar 27, 2026
|
|
||
| export default class McpConfigChecker { | ||
| static check(mcpConfig: McpConfiguration) { | ||
| static isForestIntegrationConfig( |
Decouple Router from McpClient/IntegrationClient by introducing a ToolProvider interface. Router now receives ToolProvider[] instead of raw configs, and a factory handles the MCP vs integration split. - Add ToolProvider interface (loadTools, checkConnection, dispose) - Add createToolProviders factory to split configs - McpClient/IntegrationClient implement ToolProvider - Router accepts toolProviders[] instead of mcpConfigs - McpConfigChecker uses factory instead of manual type guard - Fix McpClient.loadTools() tool accumulation bug - Fix validateZendeskConfig response.json() before response.ok check - Clean McpConfiguration type (remove ForestIntegrationConfig union) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The class no longer has any MCP-specific logic — it delegates to the ToolProvider factory. The new name reflects its actual responsibility. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Use Parameters<AiRouter['route']>[0] from agent-toolkit instead of maintaining a local copy that can diverge silently. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Internal lib, no need for backward compat shim. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ider RemoteTools was both an aggregator and a Brave tool factory. Now Brave is a ToolProvider like McpClient and IntegrationClient. RemoteTools becomes a pure container. - Add BraveToolProvider implementing ToolProvider - Router creates BraveToolProvider from localToolsApiKeys - Simplify RemoteTools constructor (no more apiKeys) - Remove getIntegratedTools dispatcher (no longer needed) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

Definition of Done
General
Security
Note
Add Zendesk and Brave Forest connector integrations to ai-proxy
IntegrationClientclass that acceptsForestIntegrationConfigentries and loads tools from supported integrations (Zendesk, Brave) into the remote tools pipeline.DynamicStructuredTooloperations: list tickets, get ticket, get ticket comments, create ticket, add comment, and update ticket — each wrapped as aServerRemoteToolwithsourceId: 'zendesk'.getIntegratedTools, keeping the existingbrave_searchtool behavior intact.Router.routeto split incomingmcpConfigsinto standard MCP server configs and Forest integration configs, constructingMcpClientandIntegrationClientindependently before merging their tools.McpConfigChecker.checkto validateForestIntegrationConfigentries — callingvalidateZendeskConfigfor Zendesk and throwing on unsupported integration names.McpConfiguration.configsnow accepts either MCP server configs orForestIntegrationConfigrecords; requests mixing both types are now split and handled separately.Changes since #1505 opened
ToolProviderinterface andcreateToolProvidersfactory [60b8a0c]Router.routeto accept and manageToolProviderinstances [60b8a0c]ToolProviderinterface inMcpClientandIntegrationClient[60b8a0c]McpConfigChecker.checkto validate usingToolProviderabstraction [60b8a0c]createAiProviderfactory to resolve and passToolProviderinstances at routing time [60b8a0c]injectOauthTokensto operate on flatToolSourceConfigrecords [60b8a0c]validateZendeskConfigto handle non-JSON responses [60b8a0c]ToolProviderarchitecture [60b8a0c]McpConfigCheckerclass toToolSourceCheckerand updated all imports, references, and test descriptions throughout theai-proxypackage [0f37a16]AiRouterRouteArgsinterface with type derived from@forestadmin/agent-toolkitAiRouterclass [a891b59]validMcpConfigurationOrThrowfrom theai-proxypackage [50f0037]validToolConfigurationOrThrowinstead of removed alias [50f0037]RemoteToolsclass to remove API key handling and integration configuration logic [ab6b929]Routerclass to use a provider-based architecture for loading tools [ab6b929]BraveToolProviderclass as a concreteToolProviderimplementation [ab6b929]integrations/tools.tsfile and its associated test file [ab6b929]RemoteToolsandRouterconstructor APIs and provider pattern [ab6b929]Macroscope summarized 7ee4b1c.