Sitelet https://github.com/simstudioai/sim/pull/7064
Skip to content

improvement(tools): support duplicate provider instances - #7064

Merged
waleedlatif1 merged 2 commits into
stagingfrom
codex/universal-tool-identities
Aug 25, 2026
Merged

improvement(tools): support duplicate provider instances#7064
waleedlatif1 merged 2 commits into
stagingfrom
codex/universal-tool-identities

Conversation

@waleedlatif1

@waleedlatif1 waleedlatif1 commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add deterministic, request-scoped aliases for duplicate provider tool IDs
  • Keep credentials and resource IDs out of provider-visible names and canonicalize execution logs and outputs
  • Replace resource-specific suffixing while preserving legacy suffixed-ID execution

Type of Change

  • Improvement

Testing

  • Passed 280 focused provider and tool identity tests
  • Passed apps/sim type-check, full repository lint, block registry checks, and all 33 repository audits

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Aug 25, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Aug 25, 2026 5:56am

Request Review

@waleedlatif1 waleedlatif1 changed the title Support duplicate provider tool instances improvement(tools): support duplicate provider instances Aug 25, 2026
@greptile-apps

greptile-apps Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The 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.

  • Assigns collision-safe wire aliases while preserving canonical registry IDs and instance-bound parameters.
  • Resolves aliases during provider tool execution and canonicalizes response, timing, and streaming output names.
  • Preserves compatibility with legacy resource-suffixed IDs and adds focused identity and streaming tests.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

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
Loading

Reviews (3): Last reviewed commit: "fix(tools): cover duplicate Pi tool inst..." | Re-trigger Greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile review

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic review

@cubic-dev-ai

cubic-dev-ai Bot commented Aug 25, 2026

Copy link
Copy Markdown

@cubic review

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 12 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread apps/sim/providers/utils.ts
Comment thread apps/sim/providers/tool-identity.test.ts
Comment thread apps/sim/tools/index.ts Outdated
@waleedlatif1
waleedlatif1 force-pushed the codex/universal-tool-identities branch from aa44971 to 926cffc Compare August 25, 2026 05:55
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile review

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic review

@cubic-dev-ai

cubic-dev-ai Bot commented Aug 25, 2026

Copy link
Copy Markdown

@cubic review

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 14 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

@waleedlatif1
waleedlatif1 merged commit 174c773 into staging Aug 25, 2026
31 checks passed
@waleedlatif1
waleedlatif1 deleted the codex/universal-tool-identities branch August 25, 2026 06:30
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