improvement(tools): support duplicate provider instances - #7064
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Greptile SummaryThe PR replaces resource-derived provider tool IDs with deterministic request-scoped aliases so duplicate provider instances remain independently executable without exposing credentials or resource identifiers.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| apps/sim/providers/tool-identity.ts | Introduces deterministic duplicate-instance alias assignment and canonical projection for normal and streaming provider results. |
| apps/sim/providers/index.ts | Applies request-scoped identities around provider execution and canonicalizes returned tool names. |
| apps/sim/providers/runtime-context.ts | Resolves provider wire aliases before canonical tool execution while preserving instance-bound parameters. |
| apps/sim/executor/handlers/pi/local/sim-tools.ts | Reuses the identity assignment mechanism for local Pi tools while executing canonical IDs with each instance's bound parameters. |
| apps/sim/providers/utils.ts | Stops embedding workflow, table, knowledge-base, and custom-block resource identifiers in provider-facing tool IDs. |
| apps/sim/tools/index.ts | Retains legacy suffixed-ID execution compatibility and removes credential identifiers from access-token logs. |
Sequence Diagram
sequenceDiagram
participant Caller
participant ProviderBoundary
participant Provider
participant RuntimeContext
participant ToolRegistry
Caller->>ProviderBoundary: Request with duplicate canonical tool IDs
ProviderBoundary->>ProviderBoundary: Assign request-scoped wire aliases
ProviderBoundary->>RuntimeContext: Install wire-to-canonical map
ProviderBoundary->>Provider: Send uniquely named tool instances
Provider->>RuntimeContext: Execute selected wire ID with bound parameters
RuntimeContext->>ToolRegistry: Execute canonical ID with selected instance parameters
ToolRegistry-->>Provider: Tool result
Provider-->>ProviderBoundary: Response or stream using wire ID
ProviderBoundary->>ProviderBoundary: Project wire ID back to canonical ID
ProviderBoundary-->>Caller: Canonicalized result
Reviews (3): Last reviewed commit: "fix(tools): cover duplicate Pi tool inst..." | Re-trigger Greptile
|
@greptile review |
|
@cubic review |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
All reported issues were addressed across 12 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
aa44971 to
926cffc
Compare
|
@greptile review |
|
@cubic review |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
Summary
Type of Change
Testing
Checklist