Class JevWireCodec

java.lang.Object
xyz.tcheeric.jev.JevWireCodec

public final class JevWireCodec extends Object
The single seam between this library's records and the evaluator's HTTP surface: paths, JSON field names and the headers that carry meaning.

The format follows the published reference at https://docs.typesafe.ai/api and is documented, with what was verified live and what is still inferred, in WIRE.md. Nothing else in the library names a JSON field (ADR 0003).

  • Constructor Details

    • JevWireCodec

      public JevWireCodec()
  • Method Details

    • path

      public String path()
      The path appended to the configured base URI for an evaluation.
    • modelsPath

      public String modelsPath()
    • encodeRequest

      public String encodeRequest(String model, String state, List<Question> questions)
    • decodeResponse

      public Evaluation decodeResponse(String body)
    • decodeModels

      public List<ModelCard> decodeModels(String body)
    • decodeError

      public JevApiException decodeError(int status, String body, HttpHeaders headers)
      Pulls the API's own words out of an error response.

      The reference does not document the error body. The shape decoded first, {"detail":{"error_type":..., "message":...}}, is what the live API returned for a missing and for an invalid key on 25 September 2026. A detail that is a list or a string is also accepted, because the detail envelope is the convention of the framework the API appears to be served by, which uses those shapes for validation failures. Anything else, including an HTML page from a gateway, is still reported with its status and raw body rather than lost.