-
Notifications
You must be signed in to change notification settings - Fork 64
Include proxy support #52
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
Conversation
|
Please update the fix. Thank you very much. |
|
After a few days of use and testing, it appears stable. The only issue is a low-level library bug, for which I have already submitted a PR. |
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.
Pull Request Overview
This pull request adds proxy support for Gemini clients, fixes an issue where tool results were appearing in responses, and updates the GeminiClientPool to ensure it always returns healthy clients by implementing automatic restart logic.
- Adds optional per-client proxy configuration with validation
- Implements health checking and automatic client restart with lock-based coordination
- Introduces
_strip_tagged_blocks()function to filter out tool result markers from responses - Updates
pool.acquire()to be async and handle RuntimeError exceptions appropriately
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| config/config.yaml | Adds optional proxy field to client configuration with documentation |
| app/utils/config.py | Implements proxy field validation to convert empty strings to None |
| app/services/pool.py | Converts acquire() to async, adds client health checking and restart logic with lock management |
| app/server/chat.py | Updates all pool.acquire() calls to await, adds _strip_tagged_blocks() to filter tool markers, adds RuntimeError exception handling |
| README.md | Documents proxy configuration with usage examples in Docker deployment sections |
| README.zh.md | Chinese translation of proxy documentation and README updates |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
LGTM. I'll refine the Chinese docs in this branch and make sure the new proxy logic compatible with Thanks again for the contribution. |
|
A quick heads-up: I was editing the docs but didn’t have permission to commit on this branch, so I moved the changes to a new branch instead. @luuquangvu’s contribution is fully preserved there and properly credited with a Co-authored-by signature. Sorry for the inconvenience! |
Update: