feat: add Anthropic API base URL configuration support#1
Merged
Conversation
- Added support for configuring custom Anthropic API base URLs to enable enterprise deployments and custom endpoints. - Enhanced the Credentials interface to include optional baseUrls field for storing custom API endpoints. - Updated the Claude provider to support ANTHROPIC_BASE_URL environment variable for the Anthropic SDK. - Modified the SettingsService to handle base URLs alongside API keys with proper persistence. - Updated setup API routes to accept and store base URL configuration from the UI. - Combined API key and base URL inputs into a single cohesive configuration section in the setup UI. - Enhanced the HTTP client and Electron API to pass base URL parameters through the save flow. - Updated all type definitions to ensure type safety for the new base URL functionality. This allows users to configure custom Anthropic API endpoints while maintaining backward compatibility for existing users who don't need this feature. Closes AutoMaker-Org#378
…nment variables - Updated the verification handler to clear both the API key and base URL when using CLI authentication. - Restored the original base URL after verification, ensuring proper environment management for different authentication methods. - Improved logging to reflect changes in environment variable handling during CLI verification.
- Added a function to build an environment object containing explicitly allowed environment variables for the SDK. - This ensures that only specified variables are passed to the SDK, enhancing security and control over the environment. - Updated the verification handler to utilize the new environment management function during authentication.
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
This PR adds support for configuring custom Anthropic API base URLs, enabling users to work with enterprise deployments or custom endpoints alongside the standard Anthropic API.
Changes Made
Core Features
Technical Implementation
Credentialsinterface with optionalbaseUrlsfieldSettingsServicefor base URL persistence and retrievalUser Experience
Use Cases
This feature enables:
Testing
Migration Notes