-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Fix LLM API key #4623
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
Fix LLM API key #4623
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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.
PR Summary
This PR fixes critical issues with LLM provider configuration management, focusing on API key handling, model configuration persistence, and test call optimization.
- Added
api_key_changed
flag inTestLLMRequest
to prevent masked API keys from being used incorrectly during updates - Modified API key handling in
/backend/onyx/server/manage/llm/api.py
to only use existing provider's key when not explicitly changed - Added
isEqual
check in forms to prevent unnecessary test API calls when no changes are made - Fixed model configurations persistence by properly handling the configurations array and max_input_tokens values
- Improved type safety with proper Yup validation and consistent null handling for optional fields
4 file(s) reviewed, 2 comment(s)
Edit PR Review Bot Settings | Greptile
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.
I think there's one small Greptile change that I think is important. Other than that, seems good to me.
Seems as if some of the misc mistakes in here are due to weird default initialization values that I set.
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
* Fix LLM API key * Remove unused import * Update web/src/app/admin/configuration/llm/LLMProviderUpdateForm.tsx Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> --------- Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Description
Fixes a few things:
Fixes https://linear.app/danswer/issue/DAN-1912/fix-misc-model-configuration-stuff
How Has This Been Tested?
Tested locally. In the future, might want to add e2e tests for these.
Backporting (check the box to trigger backport action)
Note: You have to check that the action passes, otherwise resolve the conflicts manually and tag the patches.