Skip to content

Config

Configuration schemas for gllm-inference.

AutoUploadConfig

Bases: BaseModel

Configuration for automatic file upload behavior.

Attributes:

Name Type Description
enabled bool

Whether automatic uploads are enabled. Defaults to True.

max_concurrency int

Maximum number of simultaneous upload tasks. Must be at least 1. Defaults to 8.

ClientConfig

Bases: BaseModel

Configuration for the underlying HTTP client used by an LM/EM invoker.

Attributes:

Name Type Description
lifecycle ClientLifecycle

The client ownership lifecycle. ClientLifecycle.EPHEMERAL creates and closes a client per operation. ClientLifecycle.PERSISTENT reuses one client across operations; the caller must call await release_resources() before shutdown. Support varies by invoker. Defaults to ClientLifecycle.EPHEMERAL.

http_client Any | None

An externally built async HTTP client (e.g. httpx.AsyncClient), owned by the caller (or by manager, if also set). Requires lifecycle=ClientLifecycle.PERSISTENT. Defaults to None, in which case the invoker manages its own transport internally.

manager ClientManager | None

An explicit, caller-owned manager this config's client should be tracked by. Requires lifecycle=ClientLifecycle.PERSISTENT, for the same reason as http_client. Defaults to None.

__eq__(other)

Compares this config to another object by identity, not field values.

Parameters:

Name Type Description Default
other object

The object to compare against.

required

Returns:

Name Type Description
bool bool

True if other is this exact instance, False otherwise.

__hash__()

Hashes this config by identity, not field values.

Returns:

Name Type Description
int int

This instance's identity hash.

ThinkingConfig

Bases: BaseModel

Configuration for thinking behavior.

Attributes:

Name Type Description
enabled bool

Whether thinking is enabled. Defaults to False.

kwargs dict[str, Any]

Additional thinking-related keyword arguments. Defaults to an empty dictionary.

TruncationConfig

Bases: BaseModel

Configuration for text truncation behavior.

Attributes:

Name Type Description
max_length int

Maximum length of text content. Required.

truncate_side TruncateSide | None

Side to truncate from when max_length is exceeded. 1. TruncateSide.RIGHT: Keep the beginning of the text, truncate from the end (default) 2. TruncateSide.LEFT: Keep the end of the text, truncate from the beginning If None, defaults to TruncateSide.RIGHT