puli-plg 0.1.30__py3-none-any.whl → 0.1.32__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.
@@ -67,12 +67,12 @@ def risk_meter(rate: int, total: int = 100, bar_length: int = 20, color: str = "
67
67
 
68
68
 
69
69
  def print_logo():
70
- return r"██████╗ ██╗ ██╗ ██╗ ██╗" + "\n" + \
71
- r"██╔══██╗ ██║ ██║ ██║ ██║" + "\n" + \
72
- r"██████╔╝ ██║ ██║ ██║ ██║" + "\n" + \
73
- r"██╔═══╝ ██║ ██║ ██║ ██║" + "\n" + \
74
- r"██║ ╚██████╔╝ ███████╗ ██║" + "\n" + \
75
- r"╚═╝ ╚═════╝ ╚══════╝ ╚═╝"
70
+ return r"···██████╗··██╗···██╗·██╗······██╗···" + "\n" + \
71
+ r"···██╔══██╗·██║···██║·██║······██║···" + "\n" + \
72
+ r"···██████╔╝·██║···██║·██║······██║···" + "\n" + \
73
+ r"···██╔═══╝··██║···██║·██║······██║···" + "\n" + \
74
+ r"···██║······╚██████╔╝·███████╗·██║···" + "\n" + \
75
+ r"···╚═╝·······╚═════╝··╚══════╝·╚═╝···"
76
76
 
77
77
 
78
78
  class LLMQueryRequest(BaseModel):
@@ -2,6 +2,7 @@ import argparse
2
2
  import asyncio
3
3
  import json
4
4
  import logging
5
+ import os
5
6
  from typing import List
6
7
  from mcp.server.fastmcp import FastMCP, Context
7
8
 
@@ -20,6 +21,14 @@ mcp = FastMCP("code-reviewer")
20
21
  # Initialize clients with remote configuration
21
22
  proxy_client = ProxyClient()
22
23
 
24
+ # Resolve OpenAI API key: BYO env var takes priority over remote config
25
+ _byo_key = os.environ.get("BYO_OPENAI_API_KEY")
26
+ _remote_key = proxy_client.mcp_config.get("config", {}).get("OPENAI_API_KEY")
27
+ if _byo_key:
28
+ os.environ["OPENAI_API_KEY"] = _byo_key
29
+ elif _remote_key:
30
+ os.environ["OPENAI_API_KEY"] = _remote_key
31
+
23
32
  # Initialize embedding client with remote config
24
33
  embedding_config = EmbeddingConfig.from_remote(proxy_client.mcp_config["config"])
25
34
  embedding_client = EmbeddingClient(config=embedding_config)
@@ -43,6 +52,12 @@ def log_configuration():
43
52
  logger.info("LLM Config - Provider: %s, Model: %s, Temperature: %s",
44
53
  llm_config.provider, llm_config.model, llm_config.temperature)
45
54
  logger.info("System prompt length: %d characters", len(llm_config.system_prompt))
55
+ if _byo_key:
56
+ logger.info("OpenAI API key source: BYO_OPENAI_API_KEY env var")
57
+ elif _remote_key:
58
+ logger.info("OpenAI API key source: Remote config (proxy /config/mcp)")
59
+ else:
60
+ logger.warning("OpenAI API key: NOT SET - LLM and embedding calls will fail")
46
61
  logger.info("=" * 60)
47
62
 
48
63
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: puli-plg
3
- Version: 0.1.30
3
+ Version: 0.1.32
4
4
  Summary: Zilliz vector database client for incident management
5
5
  License-File: LICENSE
6
6
  Requires-Python: <3.15,>=3.10
@@ -6,10 +6,10 @@ puli_mcp_server/embedding_client/config.py,sha256=LDrUpRQO-OYhYhiecL5LNyQ_Xh0uFR
6
6
  puli_mcp_server/llm_agent/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
7
  puli_mcp_server/llm_agent/config.py,sha256=UCl1UQrVaQfnc26fmV0wSYthWE3CwZ3dY2DA5OWSMNE,2985
8
8
  puli_mcp_server/llm_agent/llm_agent.py,sha256=EC4K3uMHrYnEX3hxEmCIqyBK6j5Ga9VZleja8-dJEvQ,1449
9
- puli_mcp_server/llm_agent/models.py,sha256=ofSh_cRwoOWCoEEEX9Y-g4k-x2UpIzJdFKBhS4f0wuk,11546
9
+ puli_mcp_server/llm_agent/models.py,sha256=Fw7KPijUNiZ3CjgHMTWDOr0IgRcDDB0iX6jxnqUkGbg,11682
10
10
  puli_mcp_server/mcp_server/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
11
  puli_mcp_server/mcp_server/models.py,sha256=TI7Qnhfb1Tt6F_5Mg_vgd6mIKLhfGYXWm9oRCiLO7-k,2302
12
- puli_mcp_server/mcp_server/server.py,sha256=pnT3zq11jdxjqeKv0JDwZPB6NA7Yg8CCUkwSIq6b-14,4307
12
+ puli_mcp_server/mcp_server/server.py,sha256=FWeneFG-1948na1--Q9eZt8y8HEWKckeBqxgNwp0fhI,4926
13
13
  puli_mcp_server/proxy_client/__init__.py,sha256=-D9PvJPzK0AZrQWevsGe1BCQVcmcQk7P_81cpNARJf8,59
14
14
  puli_mcp_server/proxy_client/client.py,sha256=QO1hSHqxRTEvFupRYtgvIr9abTQD7XObs9uI63o9M2M,8901
15
15
  puli_mcp_server/proxy_client/config.py,sha256=knYEjiR4DshJNdWN1PHk7bCghbYnc3n2TTVjHFs6WwA,2880
@@ -17,8 +17,8 @@ puli_mcp_server/proxy_client/token_manager.py,sha256=li2sxk-EwHHgCM7WEnpW1pWfvNW
17
17
  puli_models/__init__.py,sha256=8qgpZupjCu4nmGZJhTcnF-DnAdfloe9CtHUZwh7T-pQ,228
18
18
  puli_models/chaos_patterns.py,sha256=cwUKAFz6_G4fJn8eLO_rXe0WERErvAfwPOBLHupfLfU,2701
19
19
  puli_models/incidents.py,sha256=ysQBbG7yyLe2w6e1WhNahuohlCGp1EUzVw0LZOPXO80,2524
20
- puli_plg-0.1.30.dist-info/METADATA,sha256=sNkO4AmdygzT-rUiuEgu_tlWDI6S863Ewi5OZUIJ2ns,470
21
- puli_plg-0.1.30.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
22
- puli_plg-0.1.30.dist-info/entry_points.txt,sha256=FE5DJ7iMEWzWmTCGVJ8IMdr_xUIcHi-Nq99TkqOpRyo,73
23
- puli_plg-0.1.30.dist-info/licenses/LICENSE,sha256=cfujx4Uo5ylvFxncn43J7M6DDvwnw0cu9DBec84FcqU,5521
24
- puli_plg-0.1.30.dist-info/RECORD,,
20
+ puli_plg-0.1.32.dist-info/METADATA,sha256=MZ3bl-1bjo8BKbBz3Zh02O58DtwqBK7mDeHWludHAXk,470
21
+ puli_plg-0.1.32.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
22
+ puli_plg-0.1.32.dist-info/entry_points.txt,sha256=FE5DJ7iMEWzWmTCGVJ8IMdr_xUIcHi-Nq99TkqOpRyo,73
23
+ puli_plg-0.1.32.dist-info/licenses/LICENSE,sha256=cfujx4Uo5ylvFxncn43J7M6DDvwnw0cu9DBec84FcqU,5521
24
+ puli_plg-0.1.32.dist-info/RECORD,,