Add Google temporary chat mode with metadata fallback#135
Add Google temporary chat mode with metadata fallback#135Nativu5 merged 6 commits intoNativu5:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Adds configurable support for Google “temporary chat” mode and improves resilience when metadata-based chat reuse fails.
Changes:
- Introduces
gemini.chat_mode(normalvstemporary) andgemini.fallback_to_internal_on_missing_chatconfiguration options. - Skips LMDB metadata session reuse when
chat_mode=temporary, and plumbs atemporaryflag into Gemini send paths. - Adds a retry path that falls back to internal history replay when metadata-backed chat reuse cannot be restored.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| config/config.yaml | Adds new Gemini configuration keys for chat mode and fallback behavior. |
| app/utils/config.py | Extends GeminiConfig schema with chat_mode and fallback toggle. |
| app/server/chat.py | Implements temporary-mode behavior, safer session reuse handling, and internal fallback retry logic. |
| README.md | Documents new configuration options and environment variables. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Hi @Vigno04, thanks for your contribution. Providing a way to utilize temporary session is really helpful. I'm looking forward to merging it once we resolved all the comments. |
|
Temporary chat mode doesn't simply work by disabling all chat metadata for all chats and resending the entire content. If you did that with clients that have large prompts like Home Assistant, you'd likely encounter no response from Gemini after only the second or third request. |
|
i've added compaction and file context as options |
Nativu5
left a comment
There was a problem hiding this comment.
Generally good with serval remaining comments to be resolved. Thanks!
Summary
Notes