-
Notifications
You must be signed in to change notification settings - Fork 2.4k
API key from Env Var support #6178
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: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Geoff Wilson <[email protected]>
Signed-off-by: Geoff Wilson <[email protected]>
…ssage Signed-off-by: Geoff Wilson <[email protected]>
Signed-off-by: Geoff Wilson <[email protected]>
Signed-off-by: Geoff Wilson <[email protected]>
Signed-off-by: Geoff Wilson <[email protected]>
Signed-off-by: Geoff Wilson <[email protected]>
Signed-off-by: Geoff Wilson <[email protected]>
Signed-off-by: Geoff Wilson <[email protected]>
Signed-off-by: Geoff Wilson <[email protected]>
…viders Signed-off-by: Geoff Wilson <[email protected]>
Signed-off-by: Geoff Wilson <[email protected]>
Signed-off-by: Geoff Wilson <[email protected]>
Signed-off-by: Geoff Wilson <[email protected]>
Signed-off-by: Geoff Wilson <[email protected]>
Signed-off-by: Geoff Wilson <[email protected]>
Signed-off-by: Geoff Wilson <[email protected]>
Signed-off-by: Geoff Wilson <[email protected]>
Signed-off-by: Geoff Wilson <[email protected]>
Signed-off-by: Geoff Wilson <[email protected]>
Signed-off-by: Geoff Wilson <[email protected]>
Signed-off-by: Geoff Wilson <[email protected]>
Signed-off-by: Geoff Wilson <[email protected]>
Signed-off-by: Geoff Wilson <[email protected]>
vercel copy/pasta Signed-off-by: Geoff Wilson <[email protected]>
|
Thanks, @daniel-lxs -- addressed these issues and added some new providers, let me know if you see any other problems! |
Signed-off-by: Geoff Wilson <[email protected]>
|
@daniel-lxs would love to get this approved, can you take a look at the changes since your last comment? |
Review SummaryI've reviewed the latest changes (commit 7b24b89) and found no new issues. All previously flagged issues have been successfully addressed. Issues to Fix
Overall AssessmentThe implementation is well-structured and follows a consistent pattern across all providers. The core functionality for reading API keys from environment variables is solid. All validation logic for the newly added providers has been properly implemented. |
Signed-off-by: Geoff Wilson <[email protected]>
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.
Review complete. Found 3 issues that should be addressed before merging. Please see the inline comments for details.
|
@daniel-lxs I addressed the issues found by the review bot with 4597469 |
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.
No issues found in the latest commit (142412c). The translation updates look good.
Signed-off-by: Geoff Wilson <[email protected]>
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.
Review updated. The formatting commit looks good - all trailing whitespace issues have been resolved.
Signed-off-by: Geoff Wilson <[email protected]>
Signed-off-by: Geoff Wilson <[email protected]>
Related GitHub Issue
Closes: #4337
Description
This PR adds support for obtaining API keys from the environment. A checkbox is added to each configuration that allows inputting an API key -- when checked, a given environment variable (eg,
OPENAI_API_KEY, etc) is consulted for the key and the user is not required to provide one in the configuration. Env Var key is predictable but not editable.Test Procedure
I tested this using VS Code run configurations, where the expected environment variable could be provided or omitted.
Pre-Submission Checklist
A documentation update is advised, to describe environment variable usage to supply API keys.
Screenshots / Videos
Documentation Updates
Additional Notes
Get in Touch
Important
Adds support for using environment variables for API keys across multiple providers, updates UI components to reflect this, and enhances testing and translation capabilities.
anthropic,glama,openrouter,openai,gemini,mistral,deepseek,unbound,requesty,xai,groq,chutes,litellminprovider-settings.ts.validateModelsAndKeysProvided()invalidate.tsto check for environment variable usage for API keys.ApiKeycomponent inApiKey.tsxto handle API key input and environment variable toggle.Anthropic.tsx,Chutes.tsx,DeepSeek.tsx, etc., to use the newApiKeycomponent.index.spec.tsandApiKey.spec.tsx.--create-missingoption infind-missing-translations.jsfor generating placeholder translation keys.This description was created by
for f154eb2. You can customize this summary. It will automatically update as commits are pushed.