Class AnthropicProvider<E extends AnthropicSDKClient>

java.lang.Object
ai.redouble.nucleo.harness.llm.AbstractClientProvider<E>
ai.redouble.nucleo.providers.anthropic.AnthropicProvider<E>
Type Parameters:
E - the Anthropic client type this provider builds
All Implemented Interfaces:
ClientProvider<E>
Direct Known Subclasses:
AnthropicBedrockMantleProvider, AnthropicBedrockProvider, AnthropicDirectProvider

public abstract class AnthropicProvider<E extends AnthropicSDKClient> extends AbstractClientProvider<E>
Anthropic-family provider layer. Mirrors the client hierarchy (AnthropicBedrockSDKClient extends AnthropicSDKClient) so endpoint variants share Anthropic-specific construction logic as the clients diverge from other vendors. The direct and Bedrock subclasses differ only in AbstractClientProvider.newClient(); both get the shared OkHttp connection-pool tuning here.
Since:
0.1 (2026-06-21)
Author:
Andrey Santrosyan
  • Constructor Details

    • AnthropicProvider

      public AnthropicProvider()
  • Method Details

    • createClient

      public E createClient(ModelSpec spec)
      Description copied from interface: ClientProvider
      Builds the client for the given spec. The returned client is bare (no per-job observability wrap) and intended to be shared across jobs for the same spec.
      Specified by:
      createClient in interface ClientProvider<E extends AnthropicSDKClient>
      Overrides:
      createClient in class AbstractClientProvider<E extends AnthropicSDKClient>
    • specTypes

      public Map<String, Class<? extends AbstractModelSpec>> specTypes()
      Every Anthropic-served entry, direct or Bedrock-hosted, is an AnthropicModelSpec.
    • channel

      protected abstract String channel()
      The channel suffix of this provider's catalog ids: direct, bedrock, mantle.
    • identityOf

      public String identityOf(String wireModelId)
      Claude ids the Anthropic way; anything else the account lists on this surface (Bedrock lists every vendor) the generic way.
    • claims

      public boolean claims(String wireModelId)
      Claude is the family the Anthropic SDK is written for, on every channel it reaches.
    • catalogIdOf

      public String catalogIdOf(String identity, String wireModelId)
      Description copied from interface: ClientProvider
      The catalog id a new entry on this provider gets for an identity the discovery adds: the identity itself by default, endpoint-suffixed where the provider's entries are (claude-opus-5-bedrock).