Skip to content

Interface: RequestOptions

@kortexya/reasoninglayer


@kortexya/reasoninglayer / RequestOptions

Defined in: src/types/common.ts:82

Per-call options that override client-level defaults.

Every resource method takes one as its last parameter, named requestOptions — options was taken, on nineteen methods that already had a domain options bag. The three overloaded ingestion methods are the exception: their per-call options ride in the sync bag they already take, because a third parameter appended to a signature overloaded on the second makes the one-argument overload incompatible with its implementation.

X-Tenant-Id is NOT overridable per-call. Changing tenants requires a separate client instance — a per-call tenant override is how data ends up in the wrong tenant.

timeoutMs and retries reach the transport through an SDK-internal sentinel header that the bridge strips (src/request-params.ts): the generated route classes take a RequestParams, which is Omit<RequestInit, …> and has no field for either.

// A forward chain over a large tenant, with a budget of its own.
await client.inference.forwardChain(request, { timeoutMs: 600_000, retries: 0 });
// One call as another user, without a second client.
await client.terms.listTerms(undefined, { userId: adminId });

optional causal?: AuditCausalHeaders

Defined in: src/types/common.ts:97

Causal assertions for the audit ledger, sent as the x-osfkb-* request headers. See AuditCausalHeaders.


optional namespaceId?: string

Defined in: src/types/common.ts:84

Override the namespace for this request (X-Namespace-Id header).


optional retries?: number

Defined in: src/types/common.ts:92

Number of retry attempts for this request. Set to 0 to disable retries.


optional signal?: AbortSignal

Defined in: src/types/common.ts:88

AbortSignal for request cancellation.


optional timeoutMs?: number

Defined in: src/types/common.ts:90

Per-call timeout in milliseconds. Overrides the client-level timeoutMs default.


optional userId?: string

Defined in: src/types/common.ts:86

Override the user ID for this request (X-User-Id header). Used for admin impersonation.