Generated reference · Contracts

llm contracts

@oshun/contracts/llm - Canonical LLM Gateway Contract

8modules125symbols

On this page

The contract surface of @oshun/contracts/llm, enumerated from its exports — every module linked to source.

client (5)#

source

IsisLLMClientLLMModelDescriptorLLMModelDescriptorSchemaLLMProviderStatusLLMProviderStatusSchema

errors (23)#

source

LLMAuthenticationErrorLLMCancelledErrorLLMCircuitBreakerOpenErrorLLMContextLengthExceededErrorLLMErrorLLMErrorCodeLLMErrorCodeSchemaLLMErrorOptionsLLMErrorRecordLLMErrorRecordSchemaLLMInvalidRequestErrorLLMNetworkErrorLLMProviderErrorLLMProviderUnavailableErrorLLMQuotaErrorLLMQuotaExceededErrorLLMRateLimitErrorLLMSafetyBlockErrorLLMSafetyFilterErrorLLMStructuredOutputValidationErrorLLMTimeoutErrorLLMToolValidationErrorLLMValidationError

messages (18)#

source

LLMAudioPartLLMAudioPartSchemaLLMContentPartLLMContentPartSchemaLLMFilePartLLMFilePartSchemaLLMImagePartLLMImagePartSchemaLLMMessageLLMMessageRoleLLMMessageRoleSchemaLLMMessageSchemaLLMTextPartLLMTextPartSchemaLLMToolResultPartLLMToolResultPartSchemaLLMToolUsePartLLMToolUsePartSchema

primitives (38)#

source

LLMCapabilityLLMCapabilitySchemaLLMConversationIdLLMConversationIdSchemaLLMCostLLMCostSchemaLLMCurrencyLLMCurrencySchemaLLMFinishReasonLLMFinishReasonSchemaLLMIdempotencyKeyLLMIdempotencyKeySchemaLLMModelPricingLLMModelPricingSchemaLLMPriceMicrocentsPer1kTokensLLMPriceMicrocentsPer1kTokensSchemaLLMProviderLLMProviderSchemaLLMQuotaSnapshotLLMQuotaSnapshotSchemaLLMQuotaSpecLLMQuotaSpecSchemaLLMRequestIdLLMRequestIdSchemaLLMSpanIdLLMSpanIdSchemaLLMTenantIdLLMTenantIdSchemaLLMTokenUsageLLMTokenUsageSchemaLLMTraceIdLLMTraceIdSchemaLLMUserIdLLMUserIdSchemacentsPer1kToMicrocentscomputeRequestMicrocentsmicrocentsToUsdPer1kusdPer1kToMicrocents

request (10)#

source

LLMCachePolicyLLMCachePolicySchemaLLMFailoverPolicyLLMFailoverPolicySchemaLLMRequestLLMRequestSchemaLLMRetryPolicyLLMRetryPolicySchemaLLMSamplingParamsLLMSamplingParamsSchema

response (6)#

source

LLMAttemptTraceLLMAttemptTraceSchemaLLMResponseLLMResponseChoiceLLMResponseChoiceSchemaLLMResponseSchema

stream (17)#

source

LLMStreamDoneEventLLMStreamDoneEventSchemaLLMStreamErrorEventLLMStreamErrorEventSchemaLLMStreamEventLLMStreamEventSchemaLLMStreamStartEventLLMStreamStartEventSchemaLLMStreamTextDeltaEventLLMStreamTextDeltaEventSchemaLLMStreamToolInputDeltaEventLLMStreamToolInputDeltaEventSchemaLLMStreamToolUseStartEventLLMStreamToolUseStartEventSchemaLLMStreamUsageEventLLMStreamUsageEventSchemaserialiseLLMStreamEvent

tools (8)#

source

LLMJsonSchemaLLMJsonSchemaSchemaLLMStructuredOutputSpecLLMStructuredOutputSpecSchemaLLMToolChoiceLLMToolChoiceSchemaLLMToolDefinitionLLMToolDefinitionSchema