Skip to content

Conversation

@zzx1314
Copy link

@zzx1314 zzx1314 commented May 22, 2025

Issue

Closes #3073

Change

support ToolProvider automatically wired into the AI Service if available in the application contex

General checklist

  • There are no breaking changes
  • I have added unit and/or integration tests for my change
  • The tests cover both positive and negative cases
  • I have manually run all the unit and integration tests in the module I have added/changed, and they are all green

Copy link
Member

@dliubarskyi dliubarskyi left a comment

Choose a reason for hiding this comment

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

@zzx1314 thanks a lot!

Please improve the test, then this can be merged

.withConfiguration(AutoConfigurations.of(AiServicesAutoConfig.class));

@Test
void should_fail_to_create_AI_service_when_conflicting_chat_models_are_found() {
Copy link
Member

Choose a reason for hiding this comment

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

This is a very brittle test and it also has a wrong name.

Please change the test to not use reflection, but use a real tool instead.
For example, TestMcpToolProvider could provide an actual tool which does somehting (e.g., returns an amount by a unique transaction ID). When asked AI Service to provide an amout for this specific transaction, check that LLM returns correct (hardcoded) value.

Copy link

Choose a reason for hiding this comment

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

@zzx1314 please follow @dliubarskyi , wait for your feature.

@dliubarskyi
Copy link
Member

Hi @zzx1314, do you plan to finalize this PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] support ToolProvider automatically wired into the AI Service if available in the application contex

3 participants