Interface NaruModelProtocolType


public interface NaruModelProtocolType
Factory that builds a NaruModelProtocol for a given wire-protocol type (currently openapi and anthropic).

This is the extension hook for config-driven providers (custom.* endpoints): registering a new NaruModelProtocolType makes it usable via custom.endpoints.<name>.type=<type> with zero new Java provider classes.

  • Method Details

    • name

      String name()
      Protocol type id, e.g. openapi or anthropic.
    • create

      NaruModelProtocol create(NaruModelProvider provider, NaruModelConfig model, String configPrefix, String chatPath, NaruModelCapabilities capabilities, String defaultBaseUrl)
      Parameters:
      provider - the provider owning the protocol
      model - the wire model config (real model name)
      configPrefix - env prefix used to read settings (e.g. custom.endpoints.foo)
      chatPath - relative chat endpoint path (e.g. v1/chat/completions)
      capabilities - resolved capabilities
      defaultBaseUrl - fallback base url when <configPrefix>.url is not set