github-agent 0.2.6__tar.gz → 0.2.7__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: github-agent
3
- Version: 0.2.6
3
+ Version: 0.2.7
4
4
  Summary: GitHub Agent for MCP
5
5
  Author-email: Audel Rouhi <knucklessg1@gmail.com>
6
6
  License: MIT
@@ -43,7 +43,7 @@ Dynamic: license-file
43
43
  ![PyPI - Wheel](https://img.shields.io/pypi/wheel/github-agent)
44
44
  ![PyPI - Implementation](https://img.shields.io/pypi/implementation/github-agent)
45
45
 
46
- *Version: 0.2.6*
46
+ *Version: 0.2.7*
47
47
 
48
48
  ## Overview
49
49
 
@@ -21,7 +21,7 @@
21
21
  ![PyPI - Wheel](https://img.shields.io/pypi/wheel/github-agent)
22
22
  ![PyPI - Implementation](https://img.shields.io/pypi/implementation/github-agent)
23
23
 
24
- *Version: 0.2.6*
24
+ *Version: 0.2.7*
25
25
 
26
26
  ## Overview
27
27
 
@@ -39,7 +39,7 @@ from pydantic import ValidationError
39
39
  from pydantic_ai.ui import SSE_CONTENT_TYPE
40
40
  from pydantic_ai.ui.ag_ui import AGUIAdapter
41
41
 
42
- __version__ = "0.2.6"
42
+ __version__ = "0.2.7"
43
43
 
44
44
  logging.basicConfig(
45
45
  level=logging.INFO,
@@ -283,6 +283,7 @@ def create_agent(
283
283
  base_url=base_url,
284
284
  api_key=api_key,
285
285
  ssl_verify=ssl_verify,
286
+ timeout=DEFAULT_TIMEOUT,
286
287
  )
287
288
  settings = ModelSettings(
288
289
  max_tokens=DEFAULT_MAX_TOKENS,
@@ -303,11 +304,17 @@ def create_agent(
303
304
  if mcp_url:
304
305
  if "sse" in mcp_url.lower():
305
306
  server = MCPServerSSE(
306
- mcp_url, http_client=httpx.AsyncClient(verify=ssl_verify)
307
+ mcp_url,
308
+ http_client=httpx.AsyncClient(
309
+ verify=ssl_verify, timeout=DEFAULT_TIMEOUT
310
+ ),
307
311
  )
308
312
  else:
309
313
  server = MCPServerStreamableHTTP(
310
- mcp_url, http_client=httpx.AsyncClient(verify=ssl_verify)
314
+ mcp_url,
315
+ http_client=httpx.AsyncClient(
316
+ verify=ssl_verify, timeout=DEFAULT_TIMEOUT
317
+ ),
311
318
  )
312
319
  agent_toolsets.append(server)
313
320
  logger.info(f"Connected to MCP Server: {mcp_url}")
@@ -315,7 +322,9 @@ def create_agent(
315
322
  mcp_toolset = load_mcp_servers(mcp_config)
316
323
  for server in mcp_toolset:
317
324
  if hasattr(server, "http_client"):
318
- server.http_client = httpx.AsyncClient(verify=ssl_verify)
325
+ server.http_client = httpx.AsyncClient(
326
+ verify=ssl_verify, timeout=DEFAULT_TIMEOUT
327
+ )
319
328
  agent_toolsets.extend(mcp_toolset)
320
329
  logger.info(f"Connected to MCP Config JSON: {mcp_toolset}")
321
330
 
@@ -591,6 +600,7 @@ def create_agent_server(
591
600
  mcp_config=mcp_config,
592
601
  skills_directory=skills_directory,
593
602
  ssl_verify=ssl_verify,
603
+ timeout=DEFAULT_TIMEOUT,
594
604
  )
595
605
 
596
606
  if skills_directory and os.path.exists(skills_directory):
@@ -238,9 +238,11 @@ def load_skills_from_directory(directory: str) -> List[Skill]:
238
238
  return skills
239
239
 
240
240
 
241
- def get_http_client(ssl_verify: bool = True) -> httpx.AsyncClient | None:
241
+ def get_http_client(
242
+ ssl_verify: bool = True, timeout: float = 300.0
243
+ ) -> httpx.AsyncClient | None:
242
244
  if not ssl_verify:
243
- return httpx.AsyncClient(verify=False)
245
+ return httpx.AsyncClient(verify=False, timeout=timeout)
244
246
  return None
245
247
 
246
248
 
@@ -250,6 +252,7 @@ def create_model(
250
252
  base_url: Optional[str],
251
253
  api_key: Optional[str],
252
254
  ssl_verify: bool = True,
255
+ timeout: float = 300.0,
253
256
  ):
254
257
  """
255
258
  Create a Pydantic AI model with the specified provider and configuration.
@@ -266,7 +269,7 @@ def create_model(
266
269
  """
267
270
  http_client = None
268
271
  if not ssl_verify:
269
- http_client = httpx.AsyncClient(verify=False)
272
+ http_client = httpx.AsyncClient(verify=False, timeout=timeout)
270
273
 
271
274
  if provider == "openai":
272
275
  target_base_url = base_url
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: github-agent
3
- Version: 0.2.6
3
+ Version: 0.2.7
4
4
  Summary: GitHub Agent for MCP
5
5
  Author-email: Audel Rouhi <knucklessg1@gmail.com>
6
6
  License: MIT
@@ -43,7 +43,7 @@ Dynamic: license-file
43
43
  ![PyPI - Wheel](https://img.shields.io/pypi/wheel/github-agent)
44
44
  ![PyPI - Implementation](https://img.shields.io/pypi/implementation/github-agent)
45
45
 
46
- *Version: 0.2.6*
46
+ *Version: 0.2.7*
47
47
 
48
48
  ## Overview
49
49
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "github-agent"
7
- version = "0.2.6"
7
+ version = "0.2.7"
8
8
  readme = "README.md"
9
9
  description = "GitHub Agent for MCP"
10
10
  requires-python = ">=3.10"
File without changes
File without changes