Normalize advisor observation contextual names - #6788
Conversation
Whitespace in advisor display names was preserved through camel-case splitting, producing span names like "tool _calling ". Strip whitespace before concatenating so contextual names stay identifier-shaped. Fixes spring-projects#6750 Signed-off-by: Abdullah <AzazelSensei@users.noreply.github.com>
|
Ran the reported input through
It is the other advisor in the codebase that overrides // StructuredOutputValidationAdvisor.java:109
return "Structured Output Validation Advisor";On This PR fixes it correctly ( The The only contextual-name test on One limitation worth recording, though I do not think it needs to block this: |
kycasdzxc
left a comment
There was a problem hiding this comment.
Reworded my earlier notes as suggestions so they're easier to apply. Test-only, and entirely up to you whether to take them.
Cover Structured Output Validation Advisor whitespace normalization and AroundAdvisor suffix stripping. See spring-projects#6750 Signed-off-by: Abdullah <AzazelSensei@users.noreply.github.com> Co-authored-by: kycasdzxc <105793579+kycasdzxc@users.noreply.github.com>
b4302c6 to
4ddcb74
Compare
|
Thanks for the suggestions. Pushed the two extra tests (Structured Output Validation Advisor + AroundAdvisor suffix). |
|
@AzazelSensei Glad they were useful. Since the suggestions were applied manually, |
|
Amended — added your Co-authored-by. |
4ddcb74 to
937f811
Compare
Summary
DefaultAdvisorObservationConvention.getContextualName()before camel-case concatenationtool _callingforTool Calling AdvisorTool Calling AdvisorcaseFixes #6750
Test plan
./mvnw -pl spring-ai-client-chat -am -Dtest=DefaultAdvisorObservationConventionTests -Dsurefire.failIfNoSpecifiedTests=false testtool_callingwith tool callbacks enabled