pygeai 0.2.7b44__py3-none-any.whl → 0.2.7b46__py3-none-any.whl

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.
@@ -191,6 +191,21 @@ A human-readable name assigned to this instance of \fBgeai-proxy\fR. This name i
191
191
  \fBproxy description\fR
192
192
  An optional description to help identify this proxy instance, especially when multiple proxies are used under different aliases.
193
193
 
194
+ .SS Environment Variables
195
+ The above configuration parameters can also be set using environment variables:
196
+
197
+ .TP
198
+ \fBGEAI_API_KEY\fR
199
+ .TP
200
+ \fBGEAI_API_BASE_URL\fR
201
+ .TP
202
+ \fBPROXY_ID\fR
203
+ .TP
204
+ \fBPROXY_NAME\fR
205
+ .TP
206
+ \fBPROXY_DESCRIPTION\fR
207
+
208
+ These environment variables override or represent the configuration of the \fBdefault alias\fR. Therefore, they are only taken into account if the proxy is invoked with \fB\-\-alias default\fR. When using a different alias, these variables are ignored.
194
209
 
195
210
  .SH USAGE
196
211
  To start the proxy server with a specific configuration and alias:
pygeai/proxy/servers.py CHANGED
@@ -199,7 +199,7 @@ class MCPServer(ToolServer):
199
199
  async def initialize(self) -> None:
200
200
  self.public_prefix = self.config.get("public_prefix")
201
201
  transport = self.config.get("transport") or (
202
- "sse" if "uri" in self.config else "stdio"
202
+ "sse" if ("uri" in self.config or "url" in self.config) else "stdio"
203
203
  )
204
204
  try:
205
205
  if transport == "stdio":
@@ -226,17 +226,19 @@ class MCPServer(ToolServer):
226
226
  )
227
227
  read, write = stdio_transport
228
228
  elif transport == "sse":
229
- uri = self.config.get("uri")
229
+ uri = self.config.get("uri", self.config["url"])
230
230
  if not uri:
231
231
  raise ValueError("Missing 'uri' for sse transport")
232
-
233
- sse_transport = await self.exit_stack.enter_async_context(
234
- sse_client(
235
- url=self.config["uri"],
236
- headers=self.config.get("headers")
232
+ try:
233
+ sse_transport = await self.exit_stack.enter_async_context(
234
+ sse_client(
235
+ url=uri,
236
+ headers=self.config.get("headers")
237
+ )
237
238
  )
238
- )
239
- read, write = sse_transport
239
+ read, write = sse_transport
240
+ except httpx.HTTPStatusError as e:
241
+ Console.write_exception(f"HTTP error initializing MCP server {self.name}:", e)
240
242
  else:
241
243
  raise ValueError(f"Unsupported transport: {transport}")
242
244
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pygeai
3
- Version: 0.2.7b44
3
+ Version: 0.2.7b46
4
4
  Summary: Software Development Kit to interact with Globant Enterprise AI.
5
5
  Author-email: Globant <geai-sdk@globant.com>
6
6
  License-Expression: MIT
@@ -167,7 +167,7 @@ pygeai/lab/tools/endpoints.py,sha256=VPd2jBSDW4rpCa4h3kBPWJ9JA2G2ecBYQop-lffTSbI
167
167
  pygeai/lab/tools/mappers.py,sha256=6xcR7lIOYrvUG8SERQIx_bsK-_To316BUql8UPLHWco,4978
168
168
  pygeai/man/__init__.py,sha256=gqGI92vUPt6RPweoWX3mTUYPWNDlm6aGUjQOnYXqthk,53
169
169
  pygeai/man/man1/__init__.py,sha256=CFvES6cP_sbhgpm-I-QSbPC1f7Bw7cFsMW2-sxm4FtM,54
170
- pygeai/man/man1/geai-proxy.1,sha256=Q9li_XOxdCIHa2EWb_UuebJU3QKeyDju1lO4NVlpLnU,6255
170
+ pygeai/man/man1/geai-proxy.1,sha256=N5jtjzS5dB3JjAkG0Rw8EBzhC6Jgoy6zbS7XDgcE4EA,6735
171
171
  pygeai/man/man1/geai.1,sha256=dRJjqXLu4PRr5tELX-TveOrvp-J085rTV0NbqL5I30Q,51162
172
172
  pygeai/migration/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
173
173
  pygeai/migration/strategies.py,sha256=fedXqdtnAY57eeMI3RP5KhkjzVtYD654G51pMJb41fw,10041
@@ -187,7 +187,7 @@ pygeai/proxy/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
187
187
  pygeai/proxy/clients.py,sha256=YPRUS3JAbEXgIGZ_dg8VwEXLxvG_hl51o70uudqjYB0,7857
188
188
  pygeai/proxy/config.py,sha256=41fACnnhB21OhnohVPW4sbM8aZbAAEgGo7-dUaM_fpM,5057
189
189
  pygeai/proxy/managers.py,sha256=hXxVeWvkwfb7QrwOGcKyL9qW_wdNTxcpW84ppqwQ0SU,11132
190
- pygeai/proxy/servers.py,sha256=ZJEnfT5gogTrr9LYir0kRkUDzW6RJjNFWceqN1sIeKM,11231
190
+ pygeai/proxy/servers.py,sha256=iQb6dpvcCsd5behZdxibl6ylqQOvyWvpYfMVKNRfL_U,11461
191
191
  pygeai/proxy/tool.py,sha256=vG1THJNHCPNr5Y_3J7NlTu20hlATzsejOe07soPMDAE,2238
192
192
  pygeai/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
193
193
  pygeai/tests/admin/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -475,9 +475,9 @@ pygeai/vendor/a2a/utils/helpers.py,sha256=6Tbd8SVfXvdNEk6WYmLOjrAxkzFf1aIg8dkFfB
475
475
  pygeai/vendor/a2a/utils/message.py,sha256=gc_EKO69CJ4HkR76IFgsy-kENJz1dn7CfSgWJWvt-gs,2197
476
476
  pygeai/vendor/a2a/utils/task.py,sha256=BYRA_L1HpoUGJAVlyHML0lCM9Awhf2Ovjj7oPFXKbh0,1647
477
477
  pygeai/vendor/a2a/utils/telemetry.py,sha256=VvSp1Ztqaobkmq9-3sNhhPEilJS32-JTSfKzegkj6FU,10861
478
- pygeai-0.2.7b44.dist-info/licenses/LICENSE,sha256=eHfqo7-AWS8cMq0cg03lq7owsLeCmZA-xS5L0kuHnl8,1474
479
- pygeai-0.2.7b44.dist-info/METADATA,sha256=-QLWqQQle1VAvTtG5__3JD4sxj-xo-Oa4jBg-MgW9AM,6883
480
- pygeai-0.2.7b44.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
481
- pygeai-0.2.7b44.dist-info/entry_points.txt,sha256=OAmwuXVCQBTCE3HeVegVd37hbhCcp9TPahvdrCuMYWw,178
482
- pygeai-0.2.7b44.dist-info/top_level.txt,sha256=bJFwp2tURmCfB94yXDF7ylvdSJXFDDJsyUOb-7PJgwc,7
483
- pygeai-0.2.7b44.dist-info/RECORD,,
478
+ pygeai-0.2.7b46.dist-info/licenses/LICENSE,sha256=eHfqo7-AWS8cMq0cg03lq7owsLeCmZA-xS5L0kuHnl8,1474
479
+ pygeai-0.2.7b46.dist-info/METADATA,sha256=laJ_y-4UmPVh0shlWgMyU2JUZu_ert5cRq6QUK4a4bo,6883
480
+ pygeai-0.2.7b46.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
481
+ pygeai-0.2.7b46.dist-info/entry_points.txt,sha256=OAmwuXVCQBTCE3HeVegVd37hbhCcp9TPahvdrCuMYWw,178
482
+ pygeai-0.2.7b46.dist-info/top_level.txt,sha256=bJFwp2tURmCfB94yXDF7ylvdSJXFDDJsyUOb-7PJgwc,7
483
+ pygeai-0.2.7b46.dist-info/RECORD,,