fix(sdk): improve input handling and separate input from options#2993
Merged
waleedlatif1 merged 2 commits intostagingfrom Jan 25, 2026
Merged
fix(sdk): improve input handling and separate input from options#2993waleedlatif1 merged 2 commits intostagingfrom
waleedlatif1 merged 2 commits intostagingfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
Greptile OverviewGreptile SummaryThis PR refactors SDK input handling to align both TypeScript and Python SDKs with the curl/API behavior. The key changes:
The refactoring improves API ergonomics by making the calling pattern more intuitive - Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Client as SDK Client
participant API as Sim API
Note over Client: Input Handling Logic
alt Dict/Object Input
Client->>Client: Spread at root level<br/>{ticker: "NVDA"} → {ticker: "NVDA"}
else Primitive/Array Input
Client->>Client: Wrap in input field<br/>"NVDA" → {input: "NVDA"}
end
Client->>Client: Convert files to base64
Client->>Client: Add options (stream, selectedOutputs)
alt Async Execution
Client->>API: POST /api/workflows/:id/execute<br/>Header: X-Execution-Mode: async
API-->>Client: 202 {taskId, status: "queued"}
else Sync Execution
Client->>API: POST /api/workflows/:id/execute
API-->>Client: 200 {success, output}
end
Note over Client: Retry Logic
alt Rate Limited (429)
API-->>Client: 429 Rate Limit Exceeded
Client->>Client: Wait with exponential backoff
Client->>API: Retry request
API-->>Client: 200 Success
end
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
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
{input: value}inputparameter fromoptionsto match curl/API behaviorRateLimitStatusclass and dead code from Python SDKType of Change
Testing
Checklist