Urgent.News

What's breaking now, across thousands of outlets.

Tech

Humanize OpenRouter Output in Java: A Zero-Dependency Linter for Bold-Label Bullets, Emoji and Title Case + 5 Free Tools (2026)

Last verified November 2026. Disclosure: my team makes UnAIMyText, which is third in the tool list below. The Java is free to copy. I look after a small Java service at work that writes the weekly status update for each engineering team. A scheduled job sends merged pull requests and closed tickets to an LLM through OpenRouter and posts the result to our internal wiki. The updates were accurate,…

This Java linter checks OpenRouter-generated Markdown for consistency with company style guidelines, which require sentence case and no emojis. The tool flags markdown that violates these conventions. The linter focuses on three main issues: bold-label bullets, emojis, and title case headings. When more than 50% of bullets in a three-or-more line list are prefixed with a bold label, the linter flags the markdown.

Any markdown containing more than one emoji is also flagged, with the caveat that fenced code blocks and inline code do not count towards the emoji count. Similarly, headings that are three or more words long with all words after the first capitalized (excluding small words like "and" or "or" and acronyms like "API") are considered title case headings.

The presence of more than one such heading triggers a failure. The exit code indicates the result: 0 for a pass, 1 for required rewriting, and 2 for an API failure. The tool can output a machine-readable report using the --json flag. OpenRouter's API documentation outlines the POST request required for generating completions, specifying headers such as HTTP-Referer and X-OpenRouter-Title for app identification.

The linter sends these headers if the OPENROUTER_APP_URL environment variable is set. The tool reads the finish_reason field in the API response, normalizing it to values like tool_calls, stop, length, content_filter, or error. Anything other than "stop" is logged as a warning to stderr so that truncated updates are not posted silently.

The linter only reads the content field from the response messages, as this is what ultimately gets posted. The default model used is openai/gpt-oss-20b, a reasoning model. OpenRouter notes that reasoning tokens guide advises that reasoning is omitted from the response when reasoning.exclude is set, but the tokens are still charged.

The linter reads only the content field, regardless of whether reasoning is included or excluded, as that is what will be posted. The linter requires Java 17 or newer. Once the source code is in place, it can be run directly with the java StatusLint.java command, with no additional build steps needed.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

This story

This is one outlet's version. Read the fullest account.

Read the original at dev.to →

More in Tech

I built a fake courtroom for life's pettiest arguments

Look, we've all been there. Someone leaves two seconds on the microwave and doesn't hit clear. Someone eats the last slice of cold pizza with your name on the box.

  • "Petty Court" platform addresses minor grievances with exaggerated drama
  • Users choose from Classic Court, AI Judge, or People's Court for rulings
  • App emphasizes zero friction with no accounts or databases required

More from Sunday 1 November →