Skip to content

fix(adk): disable automatic instruction rendering in DeepAgent#726

Merged
hi-pender merged 2 commits intomainfrom
fix/no_prompt_render
Jan 29, 2026
Merged

fix(adk): disable automatic instruction rendering in DeepAgent#726
hi-pender merged 2 commits intomainfrom
fix/no_prompt_render

Conversation

@hi-pender
Copy link
Contributor

Summary

This PR customizes the GenModelInput function for DeepAgent to disable automatic instruction rendering from session values.

Background

The default GenModelInput in ChatModelAgent automatically retrieves session values via GetSessionValues(ctx) and renders placeholders in the instruction using prompt.FromMessages. While this feature is explicitly documented and exposed in ChatModelAgent, it can be confusing for DeepAgent users who may not be aware of this implicit behavior.

Changes

  • Added a custom genModelInput function in the deep package that simply combines the instruction and messages without template rendering
  • Configured DeepAgent to use this custom function instead of the default one

Impact

  • DeepAgent will no longer automatically render instruction placeholders from session values
  • Users who need instruction rendering can still use ChatModelAgent directly with its default behavior
  • All existing tests pass

@hi-pender hi-pender changed the title adk/deep: disable automatic instruction rendering in DeepAgent fix(adk): disable automatic instruction rendering in DeepAgent Jan 29, 2026
@codecov
Copy link

codecov bot commented Jan 29, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.75%. Comparing base (d970d34) to head (0db92ee).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #726      +/-   ##
==========================================
- Coverage   81.82%   81.75%   -0.08%     
==========================================
  Files         129      129              
  Lines       12416    12423       +7     
==========================================
- Hits        10160    10157       -3     
- Misses       1500     1510      +10     
  Partials      756      756              

☔ 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 a0a346a into main Jan 29, 2026
18 of 19 checks passed
@hi-pender hi-pender deleted the fix/no_prompt_render branch January 29, 2026 11:44
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