-
Notifications
You must be signed in to change notification settings - Fork 7
fix(adminPanel): RN-1802 update Sonnet 3.5 → 4.5, handle fenced code block completions #6570
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
base: dev
Are you sure you want to change the base?
Conversation
Summary of ChangesHello @jaskfla, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses a regression issue by updating core Langchain dependencies and implementing robust handling for fenced JSON code blocks. The changes ensure that data sent to and received from the prompt manager is correctly formatted and parsed, which is crucial for reliable AI model interactions, particularly with updated models like Sonnet 4.5. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
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.
Code Review
This pull request updates LangChain dependencies, likely to support a new Anthropic model version, and adds logic to handle fenced code blocks in AI model completions. The changes are generally good, introducing helper functions to improve code clarity. I've provided a few suggestions to improve robustness: one to make the new unfence function handle whitespace better, and another to add a type check for the AI model's response to prevent potential runtime errors. I also noted a maintainability concern regarding the use of resolutions in package.json for a major version override.
packages/admin-panel-server/src/routes/PresentationOptionsPromptRoute.ts
Outdated
Show resolved
Hide resolved
packages/admin-panel-server/src/routes/PresentationOptionsPromptRoute.ts
Show resolved
Hide resolved
3170580 to
0d97f09
Compare
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.
This dependency bump accompanies a change in environment variable
See #6570 (comment)
3a1575e to
915210b
Compare
915210b to
07c6a2e
Compare
packages/admin-panel-server/src/routes/PresentationOptionsPromptRoute.ts
Show resolved
Hide resolved
f7fa45d to
fb04012
Compare
fb04012 to
211c3a9
Compare
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.
| "rimraf": "^6.0.1" | ||
| }, | ||
| "resolutions": { | ||
| "@langchain/core": "0.3.79" |
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.
Workspace-level resolutions silently ignored by Yarn Berry
Medium Severity
The resolutions field was added to packages/admin-panel-server/package.json, but this project uses Yarn Berry v3.2.1 (per root "packageManager": "yarn@3.2.1"), which only processes resolutions from the root package.json. The root already has its own resolutions block (for other packages). This means the @langchain/core pin to 0.3.79 will be silently ignored, defeating the purpose of preventing @langchain/core version duplication — a known pain point in the langchain ecosystem. The resolution needs to be in the root package.json to take effect.


RN-1802
Changes