struct-sdk 0.2.24__tar.gz → 0.2.25__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -27,6 +27,9 @@ coverage_html/
27
27
  .coverage
28
28
  .build/
29
29
 
30
+ # Local dev stack logs (start-local.sh)
31
+ .dev-logs/
32
+
30
33
  # Environment files
31
34
  .env
32
35
  .env.local
@@ -75,6 +78,13 @@ logs/*
75
78
  # Azure Functions
76
79
  apps/edgedive-functions/local.settings.json
77
80
 
81
+ # OTel collector local file_storage queue (native/no-Docker dev run)
82
+ .collector-queue/
83
+ apps/struct-collector/.collector-queue/
84
+
85
+ # dev-stack generated secrets sidecar (stable crypto keys for local .env)
86
+ .dev-stack-secrets.json
87
+
78
88
  # Act
79
89
  .act-workspace/
80
90
 
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.4
1
+ Metadata-Version: 2.5
2
2
  Name: struct-sdk
3
- Version: 0.2.24
3
+ Version: 0.2.25
4
4
  Summary: Struct agent observability SDK — auto-instruments AI agent frameworks with OpenTelemetry
5
5
  Project-URL: Homepage, https://struct.ai
6
6
  Project-URL: Documentation, https://struct.ai/docs
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "struct-sdk"
7
- version = "0.2.24"
7
+ version = "0.2.25"
8
8
  description = "Struct agent observability SDK — auto-instruments AI agent frameworks with OpenTelemetry"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -106,8 +106,27 @@ def _is_azure_host(host: str) -> bool:
106
106
  ))
107
107
 
108
108
 
109
+ # OpenAI-compatible vendor endpoints served through the openai client. Values
110
+ # are the CURRENT OTel gen_ai.provider.name well-known enum (semconv-genai
111
+ # registry): note ``x_ai`` (underscored — the deprecated gen_ai.system enum
112
+ # used ``xai``) and ``mistral_ai`` (not ``mistral``). Fixed API hosts, so
113
+ # exact-match — a lookalike like ``api.x.ai.evil.com`` must not match.
114
+ _OPENAI_COMPATIBLE_HOSTS: dict[str, str] = {
115
+ "api.x.ai": "x_ai",
116
+ "api.groq.com": "groq",
117
+ "api.deepseek.com": "deepseek",
118
+ "api.mistral.ai": "mistral_ai",
119
+ }
120
+
121
+
109
122
  _HOST_RULES: tuple[tuple[Callable[[str], bool], str], ...] = (
110
123
  (_is_azure_host, "azure.ai.openai"),
124
+ # One (predicate, provider) entry per fixed vendor host —
125
+ # detect_provider_from_resource returns the first matching rule's value.
126
+ *(
127
+ ((lambda h, _host=vendor_host: h == _host), provider)
128
+ for vendor_host, provider in _OPENAI_COMPATIBLE_HOSTS.items()
129
+ ),
111
130
  )
112
131
 
113
132
 
File without changes
File without changes