Skip to content

Refine public comment moderation and pin DeepSeek via OpenRouter - #23

Merged
iamwavecut merged 2 commits into
masterfrom
fix/public-comment-moderation
Oct 5, 2026
Merged

iamwavecut merged 2 commits into
masterfrom
fix/public-comment-moderation

Conversation

@iamwavecut

@iamwavecut iamwavecut commented Oct 5, 2026 •

Copy link
Copy Markdown
Owner

Public discussion subscribers can post useful short comments without joining the group. Initial and reported checks now share a policy focused on promotional/referral redirection and vague income/work invitations. It preserves ordinary discussion, source links, social profiles, detailed vacancies and prior exceptions, while treating unexplained Telegram bot start/startapp payloads critically.

Add an OpenRouter adapter using current gopenrouter and the official SDK v0.9.22. Every classification pins DeepSeek V4.1 Flash to the official DeepSeek provider, disables fallbacks and requires parameter support. Low reasoning effort has a bounded 2,048-token budget; incomplete, refused or malformed replies cannot become verdicts. Native OpenAI and Gemini remain available.

Collect numeric usage/cost/cache fields without losing fields absent from SDK types. Delayed generation metadata is fetched in a bounded background queue with cancellation on runtime shutdown. Logs exclude message/reasoning text and credentials. The reporting script joins records by generation ID, avoids double billing and distinguishes unknown cache observations from zero hits. Refresh project dependencies and deployment configuration; exclude all .env files from Docker build contexts.

Validation: vet, full tests, race and shuffle suites, lint, module/format checks, vulnerability scan and deployment validation. Live official-provider regression: all 64 existing examples and 39 public-comment checks passed. All 104 earlier test generations were retrieved and confirmed as DeepSeek; token/cache/cost accounting was checked against real metadata. A later live check covers the final policy.

@iamwavecut
iamwavecut merged commit 259c55e into master Oct 5, 2026
2 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