Skip to content

Route Discord bot chat through OpenRouter - #93

Merged
Navneethd8 merged 2 commits into
mainfrom
feat/openrouter-bot-chat
Oct 27, 2026
Merged

Navneethd8 merged 2 commits into
mainfrom
feat/openrouter-bot-chat

Conversation

@Navneethd8

@Navneethd8 Navneethd8 commented Oct 27, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Discord rusty chat calls OpenRouter's free models instead of Gemini, and the free pool leaves out content-safety guards whose only reply is a verdict like User Safety: safe.
  • Hidden reasoning is stripped before a reply is posted or stored, and authorization is applied as a system instruction rather than being pasted into the prompt.
  • When a request fails, the bot and AI logs record the OpenRouter status, error text, and whether the poll timed out, instead of only the generic Discord line.

Test plan

  • In the configured channel, send rusty plus a short question and confirm a normal reply with no think tags or User Safety: verdict.
  • Confirm swecc-ai logs OpenRouter served model= and that model is not nvidia/nemotron-3.5-content-safety:free.
  • Stop the AI service and send another rusty message. Discord still shows the generic failure, and swecc-bot logs the HTTP or transport detail.
  • Send a message without rusty, and one outside the configured channel from a non-officer, and confirm the bot stays silent.

Made with Cursor


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

Leave content-safety guards out of the free pool, strip hidden reasoning, and log the OpenRouter error behind the bot's generic failure message.

Co-authored-by: Cursor <cursoragent@cursor.com>
Copilot AI balanced review requested due to automatic review settings October 27, 2026 05:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

Co-authored-by: Cursor <cursoragent@cursor.com>
@Navneethd8
Navneethd8 merged commit bf5b66f into main Oct 27, 2026
18 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.

2 participants