Repository navigation
Refine public comment moderation and pin DeepSeek via OpenRouter - #23
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.