-
Notifications
You must be signed in to change notification settings - Fork 3.3k
fix(mistral): restore mistral configs for v2 version #3138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Greptile OverviewGreptile SummaryThis PR restores backwards compatibility for the Mistral v2 block configuration that was changed in a previous update. The key changes:
The approach maintains compatibility for existing v2 workflows while steering new users toward v3 with better file normalization. Confidence Score: 4/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant V2Block as MistralParseV2Block
participant V3Block as MistralParseV3Block
participant V2Tool as mistralParserV2Tool
participant V3Tool as mistralParserV3Tool
participant API as Mistral API
Note over V2Block,V3Block: Backwards Compatibility Approach
alt V2 Block (Hidden, Legacy)
User->>V2Block: fileUpload (object) OR filePath (string)
V2Block->>V2Block: Smart handling: typeof check
alt Object Input
V2Block->>V2Tool: parameters.fileUpload = documentInput
else String Input
V2Block->>V2Tool: parameters.filePath = documentInput
end
V2Tool->>V2Tool: Reuses V1 tool logic (flexible params)
V2Tool->>API: POST /api/tools/mistral/parse
API-->>V2Tool: OCR Result (raw Mistral format)
V2Tool-->>V2Block: pages, model, usage_info, document_annotation
V2Block-->>User: Result
end
alt V3 Block (Visible, New Pattern)
User->>V3Block: fileUpload OR fileReference
V3Block->>V3Block: normalizeFileInput(params, {single: true})
V3Block->>V3Tool: parameters.file = UserFile (normalized)
V3Tool->>V3Tool: Validates UserFile object
V3Tool->>API: POST /api/tools/mistral/parse
API-->>V3Tool: OCR Result (raw Mistral format)
V3Tool-->>V3Block: pages, model, usage_info, document_annotation
V3Block-->>User: Result
end
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 files reviewed, no comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Summary
Don't break backwards compat for v2 mistral block.
Type of Change
Testing
Tested manually
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)
Cursor Bugbot found 1 potential issue for commit 0db8777