Skip to content

Interface: ClientConfig

@kortexya/reasoninglayer


@kortexya/reasoninglayer / ClientConfig

Interface: ClientConfig

Defined in: src/config.ts:59

Configuration for the Reasoning Layer client.

Remarks

Required fields: baseUrl, tenantId, and auth. All other fields have sensible defaults. No environment variable auto-detection — configuration is always explicit.

Examples

const config: ClientConfig = {
baseUrl: 'http://localhost:8083',
tenantId: '550e8400-e29b-41d4-a716-446655440000',
auth: { mode: 'bearer', token: process.env.RL_API_TOKEN! },
};
const config: ClientConfig = {
baseUrl: 'https://platform.ovh.reasoninglayer.ai',
tenantId: '550e8400-e29b-41d4-a716-446655440000',
auth: { mode: 'cookie' },
};

Properties

auth

auth: AuthConfig

Defined in: src/config.ts:68

Authentication mode. Required — pick one of AuthConfig. There is no unauthenticated mode.


authenticatedUser?

optional authenticatedUser: string

Defined in: src/config.ts:74

Authenticated user identifier for X-Authenticated-User header.


baseUrl

baseUrl: string

Defined in: src/config.ts:61

Base URL of the Reasoning Layer API (e.g., "http://localhost:8083").


fetch()?

optional fetch: (input, init?) => Promise<Response>

Defined in: src/config.ts:88

Custom fetch implementation for dependency injection. Useful for testing (inject a mock) or custom environments. Default: globalThis.fetch.

MDN Reference

Parameters

input

URL | RequestInfo

init?

RequestInit

Returns

Promise<Response>


interceptors?

optional interceptors: Interceptor[]

Defined in: src/config.ts:82

User-provided interceptors inserted into the request pipeline.


maxRetries?

optional maxRetries: number

Defined in: src/config.ts:78

Maximum number of retry attempts. Default: 3.


namespaceId?

optional namespaceId: string

Defined in: src/config.ts:72

Default namespace UUID for X-Namespace-Id header. Overridable per-call via RequestOptions.


retryOn503?

optional retryOn503: boolean

Defined in: src/config.ts:80

Whether to retry on 503 (Service Unavailable). Default: false.


tenantId

tenantId: string

Defined in: src/config.ts:63

Tenant UUID. Set once, NOT overridable per-call.


timeoutMs?

optional timeoutMs: number

Defined in: src/config.ts:76

Default request timeout in milliseconds. Overridable per-call. Default: 30000.


userId?

optional userId: string

Defined in: src/config.ts:70

Default user UUID for X-User-Id header. Overridable per-call via RequestOptions.