Skip to content

Add Google temporary chat mode with metadata fallback#135

Merged
Nativu5 merged 6 commits intoNativu5:mainfrom
Vigno04:temporary-chats-and-memory-fallback
Apr 3, 2026
Merged

Add Google temporary chat mode with metadata fallback#135
Nativu5 merged 6 commits intoNativu5:mainfrom
Vigno04:temporary-chats-and-memory-fallback

Conversation

@Vigno04
Copy link
Copy Markdown
Contributor

@Vigno04 Vigno04 commented Mar 27, 2026

Summary

  • add configurable gemini.chat_mode with normal and temporary options
  • wire Google temporary chat mode (temporary=true) into send paths
  • skip metadata reuse when temporary mode is enabled
  • add fallback to internal history replay when metadata-backed Google chat cannot be found
  • document new config options in README and config comments

Notes

  • temporary mode now keeps account history clean on Google side
  • normal mode retains existing reuse behavior with safer fallback

Copy link
Copy Markdown
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

Adds configurable support for Google “temporary chat” mode and improves resilience when metadata-based chat reuse fails.

Changes:

  • Introduces gemini.chat_mode (normal vs temporary) and gemini.fallback_to_internal_on_missing_chat configuration options.
  • Skips LMDB metadata session reuse when chat_mode=temporary, and plumbs a temporary flag 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.

@Nativu5
Copy link
Copy Markdown
Owner

Nativu5 commented Mar 28, 2026

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.

@luuquangvu
Copy link
Copy Markdown
Collaborator

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.

@Vigno04 Vigno04 requested a review from Nativu5 March 28, 2026 12:16
@Vigno04
Copy link
Copy Markdown
Contributor Author

Vigno04 commented Mar 28, 2026

i've added compaction and file context as options

Copy link
Copy Markdown
Owner

@Nativu5 Nativu5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally good with serval remaining comments to be resolved. Thanks!

@Vigno04 Vigno04 requested a review from Nativu5 March 31, 2026 15:20
@Nativu5 Nativu5 merged commit 4e09045 into Nativu5:main Apr 3, 2026
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.

4 participants