Conversation
Co-authored-by: sawka <2722291+sawka@users.noreply.github.com>
Deploying waveterm with
|
| Latest commit: |
1019c2a
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://912998a2.waveterm.pages.dev |
| Branch Preview URL: | https://copilot-add-proxyurl-to-aimo.waveterm.pages.dev |
Co-authored-by: sawka <2722291+sawka@users.noreply.github.com>
ai:proxyurl to Wave AI mode config and wire proxy support through Gemini/OpenAI Chat
Co-authored-by: sawka <2722291+sawka@users.noreply.github.com>
ai:proxyurl to Wave AI mode config and wire proxy support through Gemini/OpenAI ChatCo-authored-by: sawka <2722291+sawka@users.noreply.github.com>
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (9 files)
Review NotesThis PR successfully adds proxy URL support to all AI backends through a clean refactoring: ✅ Code Quality: Excellent code deduplication by extracting duplicate proxy setup logic into a shared utility function ✅ Error Handling: All error cases properly handled with descriptive error messages ✅ Test Coverage: Added appropriate test to verify ProxyURL is preserved through provider defaults ✅ Consistency: All AI backends (Anthropic, OpenAI, Gemini, OpenAIChat) now use the same proxy implementation ✅ Backward Compatible: Empty ProxyURL means no proxy, maintaining existing behavior ✅ Schema Updated: JSON schema correctly updated with the new field The implementation follows the project's coding conventions and best practices. |
makeHTTPClient(proxyURL)had been duplicated across AI backends with equivalent behavior. This change consolidates the logic into a single helper inaiutiland updates backends to consume it, then removes backend-local tests that only re-verified that shared utility behavior.Shared client construction
aiutil.MakeHTTPClient(proxyURL string) (*http.Client, error)inpkg/aiusechat/aiutil/aiutil.go.http.Transport.Proxysetup in one place.Timeout: 0) and existing invalid proxy URL error behavior.Backend refactor
pkg/aiusechat/openaichat/openaichat-backend.gopkg/aiusechat/gemini/gemini-backend.gopkg/aiusechat/openai/openai-backend.gopkg/aiusechat/anthropic/anthropic-backend.goTest cleanup
pkg/aiusechat/openaichat/openaichat-backend_test.gopkg/aiusechat/gemini/gemini-backend_test.go💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.