🎯 fix: Google AI Client Stability; feat: gemini-exp models#4781
Merged
Conversation
…`@google/generative-ai` explicitly for latest models
Contributor
|
learnlm is still not working |
BertKiv
pushed a commit
to BertKiv/LibreChat
that referenced
this pull request
Dec 10, 2024
…vila#4781) * fix: Google timing out and issuing AbortError, bump package, and use `@google/generative-ai` explicitly for latest models * feat: gemini-exp-
|
Hey @danny-avila , this issue appears to still be happening, particularly with the new gemini 2.0 models, for a longer response they cutoff towards the end (but nowhere near the token limit max) |
MichielMAnalytics
pushed a commit
to MichielMAnalytics/ProAI
that referenced
this pull request
Jun 6, 2025
…vila#4781) * fix: Google timing out and issuing AbortError, bump package, and use `@google/generative-ai` explicitly for latest models * feat: gemini-exp-
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
Removed the 7-second timeout constraint that was likely causing AbortError in the Google client
Increased delay timings from 12 to 15 seconds for generative models to prevent premature timeouts
Created a regex constant
EXCLUDED_GENAI_MODELSto better identify and handle Gemini modelsUpdated model detection logic to use regex testing instead of string, to use
@google/generative-aiexplicitly for latest modelsRemoved beta API version specification for generative models to use the stable release
Simplified the GenAI client initialization by removing unnecessary configuration
Updated
@langchain/google-genaipackage from 0.1.3 to 0.1.4 for latest model supportImproved debug logging to accurately reflect the model type being used
Bug fix (non-breaking change which fixes an issue)
My code adheres to this project's style guidelines
I have performed a self-review of my own code
My changes do not introduce new warnings
Local unit tests pass with my changes