feat: add custom API base URL support for OpenAI-compatible wrappers#7
Open
aaronlippold wants to merge 3 commits intosteveyegge:mainfrom
Open
feat: add custom API base URL support for OpenAI-compatible wrappers#7aaronlippold wants to merge 3 commits intosteveyegge:mainfrom
aaronlippold wants to merge 3 commits intosteveyegge:mainfrom
Conversation
Add BaseURL field to Config struct and VC_API_BASE environment variable support. This enables using VC with OpenAI-compatible API wrappers like claude-code-openai-wrapper for multi-agent workflows. - Add BaseURL field to ai.Config struct - Check VC_API_BASE env var if BaseURL not provided in config - Use option.WithBaseURL() when creating Anthropic client - Log when custom base URL is active Authored by: Aaron Lippold<lippold@gmail.com>
- Add baseurl_test.go with unit tests for Config.BaseURL handling - Add baseurl_integration_test.go for testing with actual API wrapper - Tests verify config precedence (Config.BaseURL > VC_API_BASE env var) Authored by: Aaron Lippold<lippold@gmail.com>
- Add APIKey: "test-key" to TestCircuitBreakerWithRetry tests - Add APIKey: "test-key" to TestCircuitBreakerDisabled test - Run go fmt on all internal/ai files - All tests now pass Authored by: Aaron Lippold<lippold@gmail.com>
Author
|
Related PR: RichardAtCT/claude-code-openai-wrapper#31 This PR works in conjunction with the wrapper PR above. Together they enable VC to leverage Claude Code's tool execution capabilities (file read/write, bash, etc.) through the wrapper service. Integration flow:
This enables multi-agent workflows where VC can orchestrate Claude Code for more sophisticated automation. |
8 tasks
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
Add support for custom API base URLs, enabling VC to work with OpenAI-compatible API wrappers like
claude-code-openai-wrapper.Changes:
BaseURLfield toai.ConfigstructVC_API_BASEenvironment variable ifBaseURLnot providedoption.WithBaseURL()when creating Anthropic clientAPIKeyin circuit breaker tests (pre-existing bug)go fmton internal/ai packageUsage:
Test Plan
go fmtandgolangci-lintcleanAuthored by: Aaron Lippoldlippold@gmail.com