Skip to content

fix(server): send response feedback for translated non-streaming messages - #1358

Merged
SantiagoDePolonia merged 1 commit into
mainfrom
fix/messages-translated-feedback
Nov 5, 2026
Merged

SantiagoDePolonia merged 1 commit into
mainfrom
fix/messages-translated-feedback

Conversation

@SantiagoDePolonia

@SantiagoDePolonia SantiagoDePolonia commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Before this change, a non-streaming /v1/messages request translated to a chat provider (an Anthropic-format client served by a non-Anthropic model) never notified ResponseFeedbackObservers. Chat completions, Responses, native messages and every streaming path already do.

So an extension that tracks prompt-cache usage per session got nothing for these requests. GoModel Pro's courtesy_reply guardrail (ENTERPILOT/GoModel-pro#58) found this in its e2e tests: such conversations never get past cache state unknown.

Change

  • messages_handler.go: call notifyChatResponseFeedback after the translated non-streaming response, the same way the chat completions handler does.
  • TestMessages_TranslatedNonStreamingNotifiesFeedbackObservers: the observer is called once, with input and cached tokens. It fails without the fix (expected: 1, actual: 0).

Tests

  • go test ./internal/server/ -run "Messages|Feedback|Rewrite" passes.
  • The pre-commit hooks pass, including make test-race, the hot-path performance guard and make lint.
  • The TestAdmin* dashboard tests in internal/server fail locally, because the dashboard assets aren't built in this worktree. The change doesn't touch them.

Written with Claude Code (Claude Opus 5.5).

View guided diff Turn on auto-fix

…ages

/v1/messages requests translated to a chat provider never notified
ResponseFeedbackObservers on the non-streaming path. Chat completions,
Responses, native messages and every streaming path already do. An
extension tracking prompt-cache usage per session saw nothing for
Anthropic-format clients served by a non-Anthropic model.
@coderabbitai

coderabbitai Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 42 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: b0df044c-9d6e-4028-a8e6-9c0586c5059e
Commits

Reviewing files that changed from the base of the PR and between 74c9aea and f0a2030.

Files selected for processing: 2
  • internal/server/messages_handler.go
  • internal/server/messages_handler_test.go
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@github-actions github-actions Bot added the size:XS 0-9 effective changed lines (test files excluded in mixed PRs). label Nov 4, 2026

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No issues found across 2 files

Tip: cubic could auto-approve low-risk PRs like this, if it thinks it's safe to merge. Learn more

View guided diff | Turn on auto-fix | Re-trigger cubic

@greptile-apps

greptile-apps Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] This PR appears safe to merge.

Reviews (1) · Last reviewed commit: "fix(server): send response feedback for ..." · Reviewed by Greptile

@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@SantiagoDePolonia
SantiagoDePolonia merged commit ebf1711 into main Nov 5, 2026
26 checks passed
@SantiagoDePolonia
SantiagoDePolonia deleted the fix/messages-translated-feedback branch November 5, 2026 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS 0-9 effective changed lines (test files excluded in mixed PRs).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants