Class LlmConnection

java.lang.Object
dev.dokimos.server.entity.LlmConnection

@Entity public class LlmConnection extends Object
A named, reusable pointer to an OpenAI-compatible endpoint used by the server-side judge. The protocol selects whether that endpoint speaks the Responses API or Chat Completions. Exactly one credential source is set: credentialRef names an environment variable (or external path) that holds the key, or encryptedApiKey carries an inline key encrypted at rest. The entity never exposes raw key material; decryption is the responsibility of the credential service. The name is unique per tenant rather than globally, so two tenants can each own a connection of the same name; the matching DB constraint plus a partial unique on the shared (null-tenant) rows lives in migration V14.
  • Constructor Details

  • Method Details

    • getId

      public UUID getId()
    • getName

      public String getName()
    • setName

      public void setName(String name)
    • getBaseUrl

      public String getBaseUrl()
    • setBaseUrl

      public void setBaseUrl(String baseUrl)
    • getModel

      public String getModel()
    • setModel

      public void setModel(String model)
    • getProtocol

      public LlmConnectionProtocol getProtocol()
    • setProtocol

      public void setProtocol(LlmConnectionProtocol protocol)
    • touchUpdatedAt

      public void touchUpdatedAt()
      Stamps the connection as just modified.
    • getCredentialRef

      public String getCredentialRef()
    • setCredentialRef

      public void setCredentialRef(String credentialRef)
    • getEncryptedApiKey

      public String getEncryptedApiKey()
    • setEncryptedApiKey

      public void setEncryptedApiKey(String encryptedApiKey)
    • getTenantId

      public String getTenantId()
    • setTenantId

      public void setTenantId(String tenantId)
    • hasInlineKey

      public boolean hasInlineKey()
      Returns true when an inline encrypted key is stored rather than an external credential reference.
    • getCreatedAt

      public Instant getCreatedAt()
    • getUpdatedAt

      public Instant getUpdatedAt()