Skip to content

fix(adk): return modified message from AfterChatModel#717

Merged
hi-pender merged 2 commits intomainfrom
feat/after_model_state
Jan 27, 2026
Merged

fix(adk): return modified message from AfterChatModel#717
hi-pender merged 2 commits intomainfrom
feat/after_model_state

Conversation

@hi-pender
Copy link
Contributor

Summary

  • Fix AfterChatModel hook to return the potentially modified message from
    state.Messages instead of the original input
  • This aligns the behavior with BeforeChatModel, which correctly returns
    state.Messages after middleware execution
  • Previously, modifications made to state.Messages in AfterChatModel hooks were
    ignored

@codecov
Copy link

codecov bot commented Jan 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.60%. Comparing base (9e6963f) to head (0552102).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #717   +/-   ##
=======================================
  Coverage   81.59%   81.60%           
=======================================
  Files         127      127           
  Lines       12253    12253           
=======================================
+ Hits         9998     9999    +1     
  Misses       1512     1512           
+ Partials      743      742    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@hi-pender hi-pender merged commit f527532 into main Jan 27, 2026
19 checks passed
@hi-pender hi-pender deleted the feat/after_model_state branch January 27, 2026 02:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants