Add API provider customization with auth-source integration#122
Open
lewang wants to merge 3 commits intomanzaltu:mainfrom
Open
Add API provider customization with auth-source integration#122lewang wants to merge 3 commits intomanzaltu:mainfrom
lewang wants to merge 3 commits intomanzaltu:mainfrom
Conversation
added 2 commits
October 3, 2025 16:07
Enable declarative configuration of alternative Anthropic-compatible API providers through a simple customization variable. - Add defcustom claude-code-ide-api-provider for selecting provider - Add provider registry mapping hostnames to API endpoints - Implement automatic credential retrieval from auth-source at startup - Inject provider env vars (ANTHROPIC_BASE_URL, ANTHROPIC_AUTH_TOKEN) - Log errors when provider configured but credentials missing - Add comprehensive test coverage (5 new tests) - Update documentation with setup instructions Supported providers: Anthropic, Moonshot AI, Z.ai
Add documentation for alternative API provider support: - Add claude-code-ide-api-provider to configuration variables table - Add API Provider Configuration section with setup examples - Document supported providers (Anthropic, Moonshot, Z.ai)
lewang
pushed a commit
to lewang/claude-code-ide.el
that referenced
this pull request
Oct 3, 2025
Combines both environment variable features: - Additional custom env vars (PR manzaltu#121) - Declarative API provider selection (PR manzaltu#122) Both features are complementary and work together.
Update claude-code-ide--api-providers to support environment variables per provider, with Z.ai configured for GLM models. Modify claude-code-ide--get-provider-env-vars to handle new structure and include provider-specific variables in addition to standard API configuration.
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
Enable declarative configuration of alternative Anthropic-compatible API providers through a simple customization variable.
Changes
claude-code-ide-api-providercustomization variable for selecting providerUsage
Users can now configure alternative providers declaratively:
The API endpoint and credentials are automatically configured at startup with no user interaction needed.
Test plan