langchain4j/code-execution-engines/langchain4j-code-execution-...
Dmytro Liubarskyi b3da4a12c4
Migrate Nomic, Jina, OVH AI, and Judge0 from Retrofit/OkHttp to the HttpClient abstraction (#5773)
## Change

Migrates four more integrations off Retrofit/OkHttp and onto
LangChain4j's own HttpClient abstraction (dev.langchain4j.http.client),
consistent with the already-migrated modules (OpenAI, Anthropic,
Mistral,
Gemini, Voyage). This removes the retrofit, okhttp, and
converter-jackson dependencies from each module and routes HTTP through
the pluggable, backend-agnostic client (defaulting to the JDK client at
runtime).
Each module's duplicated Request/Response logging interceptors are
deleted in favor of the abstraction's built-in LoggingHttpClient.

  langchain4j-nomic
- NomicClient rewritten on HttpClient; deleted NomicApi + 2
interceptors.
- Added NomicJsonUtils carrying the exact ObjectMapper config the
Retrofit converter used (SNAKE_CASE + NON_NULL + lenient) — the DTOs
have no @JsonProperty, so this preserves the wire format byte-for-byte.
- Exposed httpClientBuilder(...) on NomicEmbeddingModel, and wired the
logger option through to the client (see note below).

  langchain4j-jina
- JinaClient rewritten (endpoints v1/embeddings, multimodal, rerank);
deleted JinaApi + 2 interceptors.
- Added JinaJsonUtils (plain mapper — the DTOs self-annotate with
@JsonNaming(SnakeCase)).
- Exposed httpClientBuilder(...) on both JinaEmbeddingModel and
JinaScoringModel (logger was already wired).

  langchain4j-ovh-ai (module is @Deprecated(forRemoval))
- Minimal transport swap only: DefaultOvhAiClient rewritten on
HttpClient, OvhAiJsonUtils added, OvhAiApi + 2 interceptors deleted. No
new public API — the deprecated surface is left frozen. Preserved the
  @JsonValue request (raw array body) and float[][] response.

  langchain4j-code-execution-engine-judge0
- Judge0JavaScriptEngine (raw OkHttp) rewritten on HttpClient, keeping
its retry loop and per-status friendly messages. Non-2xx now surfaces as
HttpException (caught → mapped to the same messages, no retry);
network/timeout errors are retried; response parsing is kept outside the
retry catch so parse errors propagate exactly as before. Class is
package-private, so no public API change.

Each affected module got a revapi.json entry for the intentional
additions/removals (HttpClientBuilder exposure; removal of the public
JinaApi/OvhAiApi interfaces), matching the existing convention in
  langchain4j-chroma, langchain4j-open-ai, langchain4j-voyage-ai, etc.

Behavioral note: on non-2xx responses the clients now throw
dev.langchain4j.exception.HttpException (a RuntimeException subclass)
instead of a plain RuntimeException with a "status code: …" message —
the same
behavior all other migrated modules already exhibit. Judge0 still
returns its friendly strings.

## General checklist
  - [x] There are no breaking changes (API, behaviour)
  - [ ] I have added unit and/or integration tests for my change
  - [ ] The tests cover both positive and negative cases
- [x] I have manually run all the unit and integration tests in the
module I have added/changed, and they are all green
- [ ] I have manually run all the unit and integration tests in the core
and main modules, and they are all green
  - [ ] I have added/updated the documentation
- [ ] I have added an example in the examples repo (only for "big"
features)
  - [ ] I have added/updated Spring Boot starter(s) (if applicable)
2026-07-15 22:25:12 +02:00
..
src Migrate Nomic, Jina, OVH AI, and Judge0 from Retrofit/OkHttp to the HttpClient abstraction (#5773) 2026-07-15 22:25:12 +02:00
pom.xml Migrate Nomic, Jina, OVH AI, and Judge0 from Retrofit/OkHttp to the HttpClient abstraction (#5773) 2026-07-15 22:25:12 +02:00