refactor: give reasoning decisions their own module
providers.py had been holding two jobs: the registry of what each provider looks like, and the decisions made from those declarations. Adding response-side judgement would have made it the module for everything about reasoning, so the decisions move to thinking.py and the registry keeps only profiles and their lookup. Moving a module breaks any deep-path import of what moved, so the six public symbols are promoted to the package root at the same time. The top level is this library's stated API surface; giving downstream a stable name to import is what makes the next reorganisation harmless. observe_thinking stays unexported — downstream reads the verdict off LLMResponse, and exporting it would be a permanent promise for nothing.
This commit is contained in:
@@ -24,6 +24,13 @@ from polygateway.ocr import OcrClient
|
||||
from polygateway.pricing import ModelPrice, PricingTable
|
||||
from polygateway.providers import DEFAULT_PROFILES, ProviderProfile, register_provider
|
||||
from polygateway.telemetry.schema import telemetry_schema_sql
|
||||
from polygateway.thinking import (
|
||||
ThinkingCapability,
|
||||
ThinkingUnsupportedError,
|
||||
get_capability,
|
||||
register_capability,
|
||||
resolve_thinking,
|
||||
)
|
||||
from polygateway.types import (
|
||||
EmbeddingResponse,
|
||||
LLMResponse,
|
||||
@@ -32,6 +39,7 @@ from polygateway.types import (
|
||||
OcrTextResult,
|
||||
SourceConfig,
|
||||
TelemetryStatus,
|
||||
ThinkingObservation,
|
||||
)
|
||||
|
||||
__version__ = "1.3.0"
|
||||
@@ -63,9 +71,15 @@ __all__ = [
|
||||
"SourceDeadError",
|
||||
"SourceNotConfiguredError",
|
||||
"TelemetryStatus",
|
||||
"ThinkingCapability",
|
||||
"ThinkingObservation",
|
||||
"ThinkingUnsupportedError",
|
||||
"TransientError",
|
||||
"__version__",
|
||||
"gather_bounded",
|
||||
"get_capability",
|
||||
"register_capability",
|
||||
"register_provider",
|
||||
"resolve_thinking",
|
||||
"telemetry_schema_sql",
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user