Interface: ClientConfig
@kortexya/reasoninglayer / ClientConfig
Interface: ClientConfig
Section titled “Interface: ClientConfig”Defined in: src/config.ts:58
Configuration for the Reasoning Layer client.
Remarks
Section titled “Remarks”Required fields: baseUrl, tenantId, and auth. All other fields have
sensible defaults. No environment variable auto-detection — configuration
is always explicit.
Examples
Section titled “Examples”Bearer token (server-side)
const config: ClientConfig = { baseUrl: 'http://localhost:8085', tenantId: '550e8400-e29b-41d4-a716-446655440000', auth: { mode: 'bearer', token: process.env.RL_API_TOKEN! },};Session cookie (browser)
const config: ClientConfig = { baseUrl: 'https://platform.ovh.reasoninglayer.ai', tenantId: '550e8400-e29b-41d4-a716-446655440000', auth: { mode: 'cookie' },};Properties
Section titled “Properties”auth:
AuthConfig
Defined in: src/config.ts:67
Authentication mode. Required — pick one of AuthConfig. There is no unauthenticated mode.
authenticatedUser?
Section titled “authenticatedUser?”
optionalauthenticatedUser?:string
Defined in: src/config.ts:73
Authenticated user identifier for X-Authenticated-User header.
baseUrl
Section titled “baseUrl”baseUrl:
string
Defined in: src/config.ts:60
Base URL of the Reasoning Layer API (e.g., "http://localhost:8085").
fetch?
Section titled “fetch?”
optionalfetch?: {(input,init?):Promise<Response>; (input,init?):Promise<Response>; }
Defined in: src/config.ts:87
Custom fetch implementation for dependency injection.
Useful for testing (inject a mock) or custom environments.
Default: globalThis.fetch.
Call Signature
Section titled “Call Signature”(
input,init?):Promise<Response>
Parameters
Section titled “Parameters”URL | RequestInfo
RequestInit
Returns
Section titled “Returns”Promise<Response>
Call Signature
Section titled “Call Signature”(
input,init?):Promise<Response>
Parameters
Section titled “Parameters”string | Request | URL
RequestInit
Returns
Section titled “Returns”Promise<Response>
interceptors?
Section titled “interceptors?”
optionalinterceptors?:Interceptor[]
Defined in: src/config.ts:81
User-provided interceptors inserted into the request pipeline.
maxRetries?
Section titled “maxRetries?”
optionalmaxRetries?:number
Defined in: src/config.ts:77
Maximum number of retry attempts. Overridable per-call via RequestOptions.retries. Default: 3.
namespaceId?
Section titled “namespaceId?”
optionalnamespaceId?:string
Defined in: src/config.ts:71
Default namespace UUID for X-Namespace-Id header. Overridable per-call via RequestOptions.
retryOn503?
Section titled “retryOn503?”
optionalretryOn503?:boolean
Defined in: src/config.ts:79
Whether to retry on 503 (Service Unavailable). Default: false.
tenantId
Section titled “tenantId”tenantId:
string
Defined in: src/config.ts:62
Tenant UUID. Set once, NOT overridable per-call.
timeoutMs?
Section titled “timeoutMs?”
optionaltimeoutMs?:number
Defined in: src/config.ts:75
Default request timeout in milliseconds. Overridable per-call via RequestOptions.timeoutMs. Default: 30000.
userId?
Section titled “userId?”
optionaluserId?:string
Defined in: src/config.ts:69
Default user UUID for X-User-Id header. Overridable per-call via RequestOptions.