Include_lower / include_upper is deprecated?

After upgrading to elasticsearch 8.17 it seems I started seeing this deprecation log.

],[299 Elasticsearch-8.17.0-2b6a7fed44faa321997703718f07ee0420804b41 "Deprecated field [include_upper] used, this field is unused and will be removed entirely"]

172.42.0.18 <172>2025-01-16T18:37:17,585 WARN [Puller|] RestClient: request [POST http://172.42.0.12:9200/myindex/_search?typed_keys=true&max_concurrent_shard_requests=5&allow_partial_search_results=false&search_type=query_then_fetch&batched_reduce_size=512] returned 4 warnings: [299 Elasticsearch-8.17.0-2b6a7fed44faa321997703718f07ee0420804b41 "Deprecated field [from] used, this field is unused and will be removed entirely"],[299 Elasticsearch-8.17.0-2b6a7fed44faa321997703718f07ee0420804b41 "Deprecated field [to] used, this field is unused and will be removed entirely"],[299 Elasticsearch-8.17.0-2b6a7fed44faa321997703718f07ee0420804b41 "Deprecated field [include_lower] used, this field is unused and will be removed entirely"],[299 Elasticsearch-8.17.0-2b6a7fed44faa321997703718f07ee0420804b41 "Deprecated field [include_upper] used, this field is unused and will be removed entirely"]

The app is using the Java High Level REST Client built with compatibility mode.

new RestHighLevelClientBuilder(this.lowLevelClient)
            .setApiCompatibilityMode(this.getVersion().after(Version.V_7_11_0))

I search elasticsearch docs for "include_lower" expecting to find some hit about the deprecation and what to use instead, but results are pretty useless:

A bit more searching through the release notes and found:

Details
Range query will not longer accept to, from, include_lower, and include_upper parameters.

Impact
Instead use gt, gte, lt and lte parameters.

Of course it's never that simple. I'm using the Java elasticsearch-rest-high-level-client 7.17.14 with elasticsearch 8 "compatibility mode" enabled:

Yes I know this SDK was deprecated for the Java API Client but that requires a lot of application code rewrite.

I thought changing application code currently using RangeQueryBuilder.from() to use RangeQueryBuilder.lte() would fix this deprecation warning but nope!

The "new" methods like gt() simply call the old, deprecated methods like from()!. Why? Anyone know of a workaround?

Since elasticsearch 8 knows the client and version seems it should not log this deprecation. Note the java methods themselves were never actually declared @deprecated.

-                    .should(QueryBuilders.rangeQuery(FIELD_NAME).from(keyMarker).includeLower(false))
+                    .should(QueryBuilders.rangeQuery(FIELD_NAME).gt(keyMarker))

RangeQueryBuilder.java uses

    public RangeQueryBuilder from(Object from) {
        return from(from, this.includeLower);
    }
    ...
    public RangeQueryBuilder gt(Object from) {
        return from(from, false);
    }

FWIW I'm asking in Range queries logs inconsistent with documentation · Issue #48538 · elastic/elasticsearch · GitHub if there's any chance for a fix in the SDK or server for this.

Any chance of either making a Java REST Client SDK 7.17 release with this fix? Or if that's not going to happen, making the next elasticearch 8.17 release not log the deprecation warning when it sees that the client is Elastic's own 7.17 SDK?