Interface: RequestOptions
@kortexya/reasoninglayer / RequestOptions
Interface: RequestOptions
Section titled “Interface: 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.
Remarks
Section titled “Remarks”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.
Example
Section titled “Example”// 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 });Extended by
Section titled “Extended by”Properties
Section titled “Properties”authenticatedUser?
Section titled “authenticatedUser?”
optionalauthenticatedUser?:string
Defined in: src/types/common.ts:102
Override the attested user for this request (X-Authenticated-User
header), as user:<uuid>. Defaults to ClientConfig.authenticatedUser.
Remarks
Section titled “Remarks”The engine reads this header as the gateway-authenticated principal.
An OSFQL AWAIT needs it (reasoninglayer#1256): the demon is
registered as this user and fires with that user’s grants; a request
without one is refused with refusal.code
program_registrant_not_actor. Set it only where the deployment’s
gateway does not set it for you, for example a trusted server that acts
for several users.
cacheControl?
Section titled “cacheControl?”
optionalcacheControl?:"no-cache"|"no-store"
Defined in: src/types/common.ts:84
Forward Cache-Control to ReasoningLayer. Both values bypass conversation answer-cache lookup and population.
causal?
Section titled “causal?”
optionalcausal?:AuditCausalHeaders
Defined in: src/types/common.ts:116
Causal assertions for the audit ledger, sent as the x-reasoninglayer-* request
headers. See AuditCausalHeaders.
namespaceId?
Section titled “namespaceId?”
optionalnamespaceId?:string
Defined in: src/types/common.ts:86
Override the namespace for this request (X-Namespace-Id header).
retries?
Section titled “retries?”
optionalretries?:number
Defined in: src/types/common.ts:111
Number of retry attempts for this request. Set to 0 to disable retries.
signal?
Section titled “signal?”
optionalsignal?:AbortSignal
Defined in: src/types/common.ts:104
AbortSignal for request cancellation.
timeoutMs?
Section titled “timeoutMs?”
optionaltimeoutMs?:number
Defined in: src/types/common.ts:109
Per-call timeout in milliseconds. Overrides the client-level timeoutMs default.
0 disables the client deadline for this call; a negative or non-finite value is refused.
userId?
Section titled “userId?”
optionaluserId?:string
Defined in: src/types/common.ts:88
Override the user ID for this request (X-User-Id header). Used for admin impersonation.