Package dev.dokimos.server.entity
Class LlmConnection
java.lang.Object
dev.dokimos.server.entity.LlmConnection
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetId()getModel()getName()booleanReturns true when an inline encrypted key is stored rather than an external credential reference.voidsetBaseUrl(String baseUrl) voidsetCredentialRef(String credentialRef) voidsetEncryptedApiKey(String encryptedApiKey) voidvoidvoidsetProtocol(LlmConnectionProtocol protocol) voidsetTenantId(String tenantId) voidStamps the connection as just modified.
-
Constructor Details
-
LlmConnection
-
-
Method Details
-
getId
-
getName
-
setName
-
getBaseUrl
-
setBaseUrl
-
getModel
-
setModel
-
getProtocol
-
setProtocol
-
touchUpdatedAt
public void touchUpdatedAt()Stamps the connection as just modified. -
getCredentialRef
-
setCredentialRef
-
getEncryptedApiKey
-
setEncryptedApiKey
-
getTenantId
-
setTenantId
-
hasInlineKey
public boolean hasInlineKey()Returns true when an inline encrypted key is stored rather than an external credential reference. -
getCreatedAt
-
getUpdatedAt
-