I think the documentation is yet lacking but when looking at the source code and docs.
(Example for Anthropic)
@Bean
@ConditionalOnMissingBean
public AnthropicApi anthropicApi(AnthropicConnectionProperties connectionProperties,
ObjectProvider<RestClient.Builder> restClientBuilderProvider,
ObjectProvider<WebClient.Builder> webClientBuilderProvider, ResponseErrorHandler responseErrorHandler) {
return AnthropicApi.builder()
.baseUrl(connectionProperties.getBaseUrl())
.completionsPath(connectionProperties.getCompletionsPath())
.apiKey(connectionProperties.getApiKey())
.anthropicVersion(connectionProperties.getVersion())
.restClientBuilder(restClientBuilderProvider.getIfAvailable(RestClient::builder))
.webClientBuilder(webClientBuilderProvider.getIfAvailable(WebClient::builder))
.responseErrorHandler(responseErrorHandler)
.anthropicBetaFeatures(connectionProperties.getBetaVersion())
.build();
}
So either implement a bean of type AnthropicApi (or of the models you are using) or you could try implementing a WebClient.Builder & Rest client.Builder bean (as far as I know, this should overwrite the Auto configurations, but you could face problems due to ordering, I am in no place to try it out right now)