Skip to content

feat(inbox_ai): add Gemini as a selectable reply provider - #98

Merged
heshanlk merged 2 commits into
mainfrom
feat/inbox-ai
Sep 18, 2026
Merged

heshanlk merged 2 commits into
mainfrom
feat/inbox-ai

Conversation

@heshanlk

Copy link
Copy Markdown
Member

Summary

  • Add INBOX_AI_PROVIDER (openai default, or gemini) so the inbox AI reply extension can generate replies with either OpenAI or Gemini, keeping OpenAI as the default so existing deployments are unaffected.
  • Rewrite the reply system/style prompts for a natural, conversational tone instead of stiff boilerplate, and add a new "fact-based, opinionated" style that takes a clear stance against the commenter while never arguing against the account's own post or introducing a different narrative than it.

Test plan

  • pytest apps/inbox_ai/tests — 35/35 pass, including new Gemini provider coverage (ran with local Postgres via docker compose up -d postgres)
  • ruff check / ruff format --check apps/inbox_ai
  • Manual check in the inbox UI: generate a reply with INBOX_AI_PROVIDER=gemini and confirm output quality/formatting matches the OpenAI path

🤖 Generated with Claude Code

Add INBOX_AI_PROVIDER (openai|gemini) so replies can be generated with
Gemini instead of OpenAI, keeping OpenAI as the default so existing
deployments are unaffected. Both providers share the same prompts and
error-handling shape.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bcf9c36eed

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/inbox_ai/service.py Outdated
The Gemini candidate check only rejected a denylist of policy finish
reasons (SAFETY, RECITATION, ...), so MAX_TOKENS and other non-success
reasons fell through and a truncated/partial reply was returned as if
complete. Require finishReason == "STOP" to accept a candidate.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@heshanlk
heshanlk merged commit 8cf2c3e into main Sep 18, 2026
4 checks passed
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.

1 participant