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”causal?
Section titled “causal?”
optionalcausal?:AuditCausalHeaders
Defined in: src/types/common.ts:97
Causal assertions for the audit ledger, sent as the x-osfkb-* request
headers. See AuditCausalHeaders.
namespaceId?
Section titled “namespaceId?”
optionalnamespaceId?:string
Defined in: src/types/common.ts:84
Override the namespace for this request (X-Namespace-Id header).
retries?
Section titled “retries?”
optionalretries?:number
Defined in: src/types/common.ts:92
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:88
AbortSignal for request cancellation.
timeoutMs?
Section titled “timeoutMs?”
optionaltimeoutMs?:number
Defined in: src/types/common.ts:90
Per-call timeout in milliseconds. Overrides the client-level timeoutMs default.
userId?
Section titled “userId?”
optionaluserId?:string
Defined in: src/types/common.ts:86
Override the user ID for this request (X-User-Id header). Used for admin impersonation.