Theia API Documentation v1.73.0
    Preparing search index...

    The UserRequest extends the "pure" LanguageModelRequest for cancelling support as well as logging metadata. The additional metadata might also be used for other use cases, for example to query default request settings based on the agent id, merging with the request settings handed over.

    interface UserRequest {
        agentId?: string;
        cancellationToken?: CancellationToken;
        clientSettings?: { keepThinking: boolean; keepToolCalls: boolean };
        deferredToolIds?: string[];
        isPromptVariantCustomized?: boolean;
        messages: LanguageModelMessage[];
        promptVariantId?: string;
        reasoning?: ReasoningSettings;
        requestId: string;
        response_format?:
            | { type: "text" }
            | { type: "json_object" }
            | ResponseFormatJsonSchema;
        serverTools?: string[];
        sessionId: string;
        settings?: { [key: string]: unknown };
        subRequestId?: string;
        tools?: ToolRequest<ToolInvocationContext>[];
    }

    Hierarchy (View Summary)

    Index

    Properties

    agentId?: string

    Optional agent identifier in case the request was sent by an agent

    cancellationToken?: CancellationToken

    Cancellation support

    clientSettings?: { keepThinking: boolean; keepToolCalls: boolean }
    deferredToolIds?: string[]

    Ids of tools whose definitions should be deferred and discovered on-demand via the provider's built-in tool search mechanism. Providers that do not support deferred loading should ignore this field.

    isPromptVariantCustomized?: boolean

    Indicates whether the prompt variant was customized

    promptVariantId?: string

    Optional prompt variant ID used for this request

    reasoning?: ReasoningSettings

    Provider-agnostic reasoning configuration; providers translate it to their native API.

    requestId: string

    Identifier of the request or overall exchange. Corresponds to request id in Chat sessions

    response_format?:
        | { type: "text" }
        | { type: "json_object" }
        | ResponseFormatJsonSchema
    serverTools?: string[]

    Ids of the provider's server tools (see ServerToolDescriptor) that are enabled for this request. Each provider translates the enabled ids into its native server tool configuration.

    sessionId: string

    Identifier of the Ai/ChatSession

    settings?: { [key: string]: unknown }
    subRequestId?: string

    Id of a request in case a single exchange consists of multiple requests. In this case the requestId corresponds to the overall exchange.