enterprise_ai.llm.reasoning
Source: sdks/python/src/enterprise_ai/llm/reasoning/__init__.py. Back to the Python SDK reference index.
This page is generated by tools/docs/gen_sdk_reference.py from the SDK sources and the OpenAPI text folders. Do not edit it by hand: change the source and regenerate.
Enumeration Effort
Normalized internal reasoning effort, ordered from none to max.
str, Enum
Values:
| Member | Value | Description |
|---|---|---|
NONE | 'none' | No reasoning (none). |
LOW | 'low' | Low reasoning effort (low). |
MEDIUM | 'medium' | Medium reasoning effort (medium). |
HIGH | 'high' | High reasoning effort (high). |
MAX | 'max' | Highest reasoning effort (max). |
Attributes:
| Name | Type | Required | Description |
|---|---|---|---|
rank | int | yes | Position of the effort in the order none (0) to max (4). |
Effort.parse
parse(value: str | Effort | None) -> Effort
Parse a string (case insensitive). None means none.
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
value | str | Effort | None | yes | Effort as a string, an Effort (returned as is) or None; an unknown value raises EffortNotSupported. |
Returns: Effort. A Effort: Normalized internal reasoning effort, ordered from none to max.
Raises: EffortNotSupported.
Model EffortResolution
Result of :func:resolve_effort.
Fields:
| Name | Type | Required | Description |
|---|---|---|---|
requested | Effort | yes | Normalized internal reasoning effort, ordered from none to max. |
effective | Effort | yes | Normalized internal reasoning effort, ordered from none to max. |
native_parameter | str | no | Name of the provider reasoning parameter from spec.reasoning.native_parameter (default none). |
native | dict[str, Any] | no | Provider parameters for the effective effort, such as {"reasoning_effort": "high"} or a thinking budget. |
adjusted | bool | no | True when the requested effort was mapped to another level by the model policy. |
reason | str | None | no | Why the action is taken. Written to the audit trail with the actor and the time. |
reasoning_tokens | int | no | Explicit reasoning tokens, at least 0; overrides the reserve of reasoning_effort. |
Functions
supported_efforts
supported_efforts(model: dict[str, Any]) -> list[Effort]
Efforts listed in reasoning_modes (none only when absent).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
model | dict[str, Any] | yes | Model Manifest or registry entry. |
Returns: list[Effort]. A Effort: Normalized internal reasoning effort, ordered from none to max.
resolve_effort
resolve_effort(model: dict[str, Any], effort: str | Effort | None) -> EffortResolution
Check effort against a model manifest (or registry entry) and translate it.
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
model | dict[str, Any] | yes | Model Manifest or registry entry whose reasoning_modes and reasoning policy apply. | |
effort | str | Effort | None | yes | Requested reasoning effort; None takes spec.reasoning.default_effort. |
Returns: EffortResolution. A EffortResolution: Result of :func:resolve_effort.
Raises: EffortNotSupported.
reasoning_reserve
reasoning_reserve(model: dict[str, Any], effort: str | Effort | None) -> int
Tokens to reserve for reasoning when planning a context (0 for none).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
model | dict[str, Any] | yes | Model Manifest or registry entry. | |
effort | str | Effort | None | yes | Requested reasoning effort; None takes the model default effort. |
Returns: int. The model budget_tokens for the effective effort, otherwise 1024 (low), 4096 (medium), 16384 (high) or 32768 (max).