kodit 0.5.3__py3-none-any.whl → 0.5.4__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.

Potentially problematic release.


This version of kodit might be problematic. Click here for more details.

kodit/_version.py CHANGED
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
28
28
  commit_id: COMMIT_ID
29
29
  __commit_id__: COMMIT_ID
30
30
 
31
- __version__ = version = '0.5.3'
32
- __version_tuple__ = version_tuple = (0, 5, 3)
31
+ __version__ = version = '0.5.4'
32
+ __version_tuple__ = version_tuple = (0, 5, 4)
33
33
 
34
34
  __commit_id__ = commit_id = None
@@ -5,6 +5,7 @@ import functools
5
5
  from collections.abc import Callable, Coroutine
6
6
  from typing import Any
7
7
 
8
+ import httpx
8
9
  import litellm
9
10
  import structlog
10
11
  from litellm import acompletion, aembedding
@@ -94,6 +95,20 @@ class LiteLLMProvider:
94
95
  def __init__(self, endpoint: Endpoint) -> None:
95
96
  """Initialize the LiteLLM provider."""
96
97
  self.endpoint = endpoint
98
+ self._setup_litellm_client()
99
+
100
+ def _setup_litellm_client(self) -> None:
101
+ """Set up LiteLLM with custom HTTPX client for Unix socket support."""
102
+ if self.endpoint.socket_path:
103
+ # Create HTTPX client with Unix socket transport
104
+ transport = httpx.AsyncHTTPTransport(uds=self.endpoint.socket_path)
105
+ unix_client = httpx.AsyncClient(
106
+ transport=transport,
107
+ base_url="http://localhost", # Base URL for Unix socket
108
+ timeout=self.endpoint.timeout,
109
+ )
110
+ # Set as LiteLLM's async client session
111
+ litellm.aclient_session = unix_client
97
112
 
98
113
  def _populate_base_kwargs(self) -> dict[str, Any]:
99
114
  """Populate base kwargs common to all API calls."""
@@ -129,4 +144,11 @@ class LiteLLMProvider:
129
144
  return response.model_dump()
130
145
 
131
146
  async def close(self) -> None:
132
- """Close the provider - litellm handles its own connection cleanup."""
147
+ """Close the provider and cleanup HTTPX client if using Unix sockets."""
148
+ if (
149
+ self.endpoint.socket_path
150
+ and hasattr(litellm, "aclient_session")
151
+ and litellm.aclient_session
152
+ ):
153
+ await litellm.aclient_session.aclose()
154
+ litellm.aclient_session = None
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: kodit
3
- Version: 0.5.3
3
+ Version: 0.5.4
4
4
  Summary: Code indexing for better AI code generation
5
5
  Project-URL: Homepage, https://docs.helixml.tech/kodit/
6
6
  Project-URL: Documentation, https://docs.helixml.tech/kodit/
@@ -1,6 +1,6 @@
1
1
  kodit/.gitignore,sha256=ztkjgRwL9Uud1OEi36hGQeDGk3OLK1NfDEO8YqGYy8o,11
2
2
  kodit/__init__.py,sha256=aEKHYninUq1yh6jaNfvJBYg-6fenpN132nJt1UU6Jxs,59
3
- kodit/_version.py,sha256=EWl7XaGZUG57Di8WiRltpKAkwy1CShJuJ-i6_rAPr-w,704
3
+ kodit/_version.py,sha256=OrfVZdCDQ-QC6dUnxdROooJjwvLfeDMedTBstpAdSBU,704
4
4
  kodit/app.py,sha256=niIfZiuuDp7mLzrBwQhx_FU7RvKfUALNV5y0o43miss,5802
5
5
  kodit/cli.py,sha256=QSTXIUDxZo3anIONY-grZi9_VSehWoS8QoVJZyOmWPQ,3086
6
6
  kodit/cli_utils.py,sha256=umkvt4kWNapk6db6RGz6bmn7oxgDpsW2Vo09MZ37OGg,2430
@@ -124,7 +124,7 @@ kodit/infrastructure/physical_architecture/formatters/__init__.py,sha256=2OCvhVK
124
124
  kodit/infrastructure/physical_architecture/formatters/narrative_formatter.py,sha256=43bERS_iGhL94pkUV2Bn5vjeaHPxjHatuDh7dHreh_M,5713
125
125
  kodit/infrastructure/providers/__init__.py,sha256=XjB6DIQIXRrwRhSY32EF3QhZGTWNWsBZA5pwUc--ZZc,65
126
126
  kodit/infrastructure/providers/async_batch_processor.py,sha256=0GkfBfOdQWoZ9JL-_ZCqtlpL2R19nUUn-fhK9y0O0s0,1466
127
- kodit/infrastructure/providers/litellm_provider.py,sha256=Ybxws56fUKhN-Cku43vdmhlIINmwM7v9LckWnfowjCc,4504
127
+ kodit/infrastructure/providers/litellm_provider.py,sha256=DWGlvuhAOLZplo9cTm5plF0wvEQUklAc1TsVrtLsNe0,5426
128
128
  kodit/infrastructure/reporting/__init__.py,sha256=4Qu38YbDOaeDqLdT_CbK8tOZHTKGrHRXncVKlGRzOeQ,32
129
129
  kodit/infrastructure/reporting/db_progress.py,sha256=VVaCKjC_UFwdRptXbBroG9qhXCxI4bZmElf1PMsBzWA,819
130
130
  kodit/infrastructure/reporting/log_progress.py,sha256=yhzkjYulEn_sfpKwHKi--HdQHLb4h4uEolhFYqvdHS8,1261
@@ -167,8 +167,8 @@ kodit/utils/dump_config.py,sha256=dd5uPgqh6ATk02Zt59t2JFKR9X17YWjHudV0nE8VktE,11
167
167
  kodit/utils/dump_openapi.py,sha256=EasYOnnpeabwb_sTKQUBrrOLHjPcOFQ7Zx0YKpx9fmM,1239
168
168
  kodit/utils/generate_api_paths.py,sha256=TMtx9v55podDfUmiWaHgJHLtEWLV2sLL-5ejGFMPzAo,3569
169
169
  kodit/utils/path_utils.py,sha256=UB_81rx7Y1G1jalVv2PX8miwaprBbcqEdtoQ3hPT3kU,2451
170
- kodit-0.5.3.dist-info/METADATA,sha256=340z0xqhe7h6HOYh85xfIIryGRIBuNLzHI50L2-EdFI,7703
171
- kodit-0.5.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
172
- kodit-0.5.3.dist-info/entry_points.txt,sha256=hoTn-1aKyTItjnY91fnO-rV5uaWQLQ-Vi7V5et2IbHY,40
173
- kodit-0.5.3.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
174
- kodit-0.5.3.dist-info/RECORD,,
170
+ kodit-0.5.4.dist-info/METADATA,sha256=HFZGtx56F6ntNJf0_hcj5SK_fNyCKrSd4KIYnsvIoEY,7703
171
+ kodit-0.5.4.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
172
+ kodit-0.5.4.dist-info/entry_points.txt,sha256=hoTn-1aKyTItjnY91fnO-rV5uaWQLQ-Vi7V5et2IbHY,40
173
+ kodit-0.5.4.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
174
+ kodit-0.5.4.dist-info/RECORD,,
File without changes