feat(router): LLM-generated contextual acknowledgment messages#483
Merged
zbigniewsobiecki merged 1 commit intodevfrom Feb 22, 2026
Merged
feat(router): LLM-generated contextual acknowledgment messages#483zbigniewsobiecki merged 1 commit intodevfrom
zbigniewsobiecki merged 1 commit intodevfrom
Conversation
Replace hardcoded INITIAL_MESSAGES lookups in webhook ack handlers with a single-shot LLM call that produces a short, context-aware message reflecting the actual request (e.g., card name, PR title, comment text). Uses the existing progressModel config (defaults to gemini-2.5-flash-lite via OpenRouter) with a 5-second timeout. On any failure — no model configured, missing API key, LLM error, timeout, or empty output — gracefully falls back to the static INITIAL_MESSAGES. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
Summary
INITIAL_MESSAGESlookups in webhook ack handlers (Trello, GitHub, JIRA) with a single-shot LLM call that generates a short, context-aware acknowledgment message reflecting the actual request content (card name, PR title, comment text)progressModelconfig (defaults toopenrouter:google/gemini-2.5-flash-lite) with a 5-second timeout — zero new configuration requiredINITIAL_MESSAGESon any failure: no model configured, missing API key, LLM error, timeout, or empty outputChanges
src/router/ackMessageGenerator.tsgenerateAckMessage(), context extractors for each provider, LLM call with fallback chainsrc/router/trello.tsgenerateAckMessage()intryPostTrelloAck()src/router/github.tsgenerateAckMessage()intryPostGitHubAck()src/router/jira.tsgenerateAckMessage()intryPostJiraAck()tests/unit/router/ackMessageGenerator.test.tstests/unit/router/{trello,github,jira}.test.tsFallback chain
Test plan
ackMessageGenerator(context extractors, all fallback paths, env var restoration, timeout)🤖 Generated with Claude Code