{"record":{"id":"7a1a862986d57058","repo":"spring-projects/spring-ai","slug":"unknown-spring-ai-chat-client-tool-search-advisor","errorCode":null,"errorMessage":"Unknown 'spring.ai.chat.client.tool-search-advisor.tool-index-type' value: '. Known built-in values are: . If this is intentional, ensure a matching ToolIndex bean is declared in the application context.","messagePattern":"Unknown 'spring\\.ai\\.chat\\.client\\.tool-search-advisor\\.tool-index-type' value: '\\. Known built-in values are: \\. If this is intentional, ensure a matching ToolIndex bean is declared in the application context\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"auto-configurations/advisors/spring-ai-autoconfigure-tool-search-advisor/src/main/java/org/springframework/ai/chat/client/advisor/toolsearch/autoconfigure/ToolSearchAdvisorAutoConfiguration.java","lineNumber":113,"sourceCode":"@EnableConfigurationProperties(ToolSearchAdvisorProperties.class)\n@ConditionalOnProperty(prefix = ToolSearchAdvisorProperties.CONFIG_PREFIX, name = \"enabled\", havingValue = \"true\")\npublic class ToolSearchAdvisorAutoConfiguration implements InitializingBean {\n\n\tprivate static final Log logger = LogFactory.getLog(ToolSearchAdvisorAutoConfiguration.class);\n\n\tprivate static final Set<String> KNOWN_TOOL_INDEX_TYPES = Set.of(\"regex\", \"lucene\", \"vector\");\n\n\tprivate final ToolSearchAdvisorProperties properties;\n\n\tpublic ToolSearchAdvisorAutoConfiguration(ToolSearchAdvisorProperties properties) {\n\t\tthis.properties = properties;\n\t}\n\n\t@Override\n\tpublic void afterPropertiesSet() {\n\t\tString type = this.properties.getToolIndexType();\n\t\tif (type != null && !KNOWN_TOOL_INDEX_TYPES.contains(type.toLowerCase(Locale.ROOT))) {\n\t\t\tlogger.warn(\"Unknown 'spring.ai.chat.client.tool-search-advisor.tool-index-type' value: '\" + type\n\t\t\t\t\t+ \"'. Known built-in values are: \" + KNOWN_TOOL_INDEX_TYPES\n\t\t\t\t\t+ \". If this is intentional, ensure a matching ToolIndex bean is declared in the application context.\");\n\t\t}\n\t}\n\n\t/**\n\t * Registers a {@link ToolSearchToolCallingAdvisor.Builder} typed as\n\t * {@link ToolCallingAdvisor.Builder}. The broader declared return type ensures that\n\t * {@code ChatClientAutoConfiguration#toolCallingAdvisorBuilder} is skipped due to its\n\t * {@code @ConditionalOnMissingBean}.\n\t */\n\t@Bean\n\t@ConditionalOnMissingBean\n\t@ConditionalOnBean({ ToolCallingManager.class, ToolIndex.class })\n\tToolCallingAdvisor.Builder<?> toolCallingAdvisorBuilder(ToolSearchAdvisorProperties properties,\n\t\t\tToolCallingManager toolCallingManager, ToolIndex toolIndex,\n\t\t\tObjectProvider<ToolExecutionEligibilityChecker> toolExecutionEligibilityChecker) {\n","sourceCodeStart":95,"sourceCodeEnd":131,"githubUrl":"https://github.com/spring-projects/spring-ai/blob/98a7beda4f29d80a71c5837eb4053b03a93a46f7/auto-configurations/advisors/spring-ai-autoconfigure-tool-search-advisor/src/main/java/org/springframework/ai/chat/client/advisor/toolsearch/autoconfigure/ToolSearchAdvisorAutoConfiguration.java#L95-L131","documentation":"ToolSearchAdvisorAutoConfiguration.afterPropertiesSet validates spring.ai.chat.client.tool-search-advisor.tool-index-type against a set of known built-in types. If the configured value is not recognized, it logs this warning so you know Spring AI found no built-in ToolIndex for it and you must supply a matching ToolIndex bean yourself, or the advisor won't have an index.","triggerScenarios":"Setting spring.ai.chat.client.tool-search-advisor.tool-index-type to a value outside the KNOWN_TOOL_INDEX_TYPES set (typo like 'inmemmory' or a custom type name) while the tool-search-advisor auto-configuration initializes.","commonSituations":"Typos in application.yml/properties; copying a custom index type name from a blog post without declaring the corresponding ToolIndex bean; upgrading versions where a built-in type was renamed or removed.","solutions":["Correct the property to one of the known built-in values listed in the warning.","If a custom type is intended, declare a matching ToolIndex bean in the application context.","Remove the property to fall back to the default behavior if no special index is needed."],"exampleFix":"// before\nspring.ai.chat.client.tool-search-advisor.tool-index-type=inmemmory\n// after\nspring.ai.chat.client.tool-search-advisor.tool-index-type=in-memory","handlingStrategy":"validation","validationCode":"String type = properties.getToolIndexType();\nSet<String> known = Set.of(\"in-memory\" /* see KNOWN_TOOL_INDEX_TYPES in the warning */);\nif (type != null && !known.contains(type.toLowerCase(Locale.ROOT))) {\n    throw new IllegalArgumentException(\"Unknown tool-index-type: \" + type);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Copy property values from the documented built-in list, not by memory.","If using a custom ToolIndex, declare its bean and document the type name.","Add a config-metadata/IDE check for allowed values."],"tags":["spring-boot","auto-configuration","tool-search","configuration"],"backgroundTag":"invalid-config-value","analyzedSha":"98a7beda4f29d80a71c5837eb4053b03a93a46f7","analyzedAt":"2026-09-11T14:15:49.441Z","contentChangedAt":"2026-09-11T14:15:49.441Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}