Skip to content

Conversation

@luuquangvu
Copy link
Collaborator

@luuquangvu luuquangvu commented Nov 8, 2025

  • Add proxy support.
  • For the README.zh.md file, I used GPT for translation. Please help review and make corrections.

Update:

  • Fixes issues with tool results appearing in responses.
  • Update GeminiClientPool to ensure it always returns a healthy client

@khaisilk1910
Copy link

Please update the fix. Thank you very much.

@luuquangvu
Copy link
Collaborator Author

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.

Copy link
Contributor

Copilot AI left a 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.

@Nativu5
Copy link
Owner

Nativu5 commented Nov 20, 2025

LGTM. I'll refine the Chinese docs in this branch and make sure the new proxy logic compatible with HTTP_PROXY variables before it is merged.

Thanks again for the contribution.

@Nativu5
Copy link
Owner

Nativu5 commented Nov 20, 2025

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants