Package org.springframework.ai.anthropic.http.okhttp
@NullMarked
package org.springframework.ai.anthropic.http.okhttp
Spring AI's customized OkHttp-backed implementation of the Anthropic Java SDK's
HttpClient contract. Exists to wire Micrometer
HTTP-layer observability (span + metric + traceparent propagation) onto the
underlying OkHttp client, which the SDK's stock AnthropicOkHttpClient.Builder
does not expose a seam for. See the SDK's
Custom
HTTP client guide for the integration pattern.- Since:
- 2.0.0
- See Also:
-
ClassDescriptionCallback for customizing the
SpringAiAnthropicHttpClient.Builderused byAnthropicChatModelbefore the underlyingOkHttpClientis built.OkHttp-backedHttpClientfor the Anthropic Java SDK, with Micrometer'sOkHttpObservationInterceptorattached so each HTTP attempt produces an observation (span + metric + traceparent propagation).Builder forSpringAiAnthropicHttpClient.