feat: expose the telemetry schema SQL to downstreams

This commit is contained in:
2026-08-19 12:31:19 -04:00
parent e17e1067a1
commit 7b49e580c0
2 changed files with 14 additions and 0 deletions
+2
View File
@@ -23,6 +23,7 @@ from polygateway.errors import (
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.types import (
EmbeddingResponse,
LLMResponse,
@@ -64,4 +65,5 @@ __all__ = [
"__version__",
"gather_bounded",
"register_provider",
"telemetry_schema_sql",
]
+12
View File
@@ -25,3 +25,15 @@ def test_ocr_public_surface_exported():
):
assert hasattr(polygateway, name), name
assert name in polygateway.__all__, name
def test_telemetry_schema_sql_exported():
"""issue #13: manual 档下游需要主动索取"库要求的最小 schema"的顶层入口。
同时钉住公共面**只增这一个名字**: `missing_columns_warning` 是 recorder 内部
共用的文案构造函数,导出它等于多一份永久承诺(库承诺公共面只增不删)。
"""
assert "telemetry_schema_sql" in polygateway.__all__
assert callable(polygateway.telemetry_schema_sql)
assert "missing_columns_warning" not in polygateway.__all__
assert not hasattr(polygateway, "missing_columns_warning")