kodit 0.3.13__py3-none-any.whl → 0.3.15__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
@@ -17,5 +17,5 @@ __version__: str
17
17
  __version_tuple__: VERSION_TUPLE
18
18
  version_tuple: VERSION_TUPLE
19
19
 
20
- __version__ = version = '0.3.13'
21
- __version_tuple__ = version_tuple = (0, 3, 13)
20
+ __version__ = version = '0.3.15'
21
+ __version_tuple__ = version_tuple = (0, 3, 15)
kodit/app.py CHANGED
@@ -13,7 +13,6 @@ from kodit.application.services.sync_scheduler import SyncSchedulerService
13
13
  from kodit.config import AppContext
14
14
  from kodit.infrastructure.api.v1.routers import indexes_router, search_router
15
15
  from kodit.infrastructure.api.v1.schemas.context import AppLifespanState
16
- from kodit.log import configure_logging, configure_telemetry
17
16
  from kodit.mcp import mcp
18
17
  from kodit.middleware import ASGICancelledErrorMiddleware, logging_middleware
19
18
 
@@ -27,10 +26,8 @@ async def app_lifespan(_: FastAPI) -> AsyncIterator[AppLifespanState]:
27
26
  """Manage application lifespan for auto-indexing and sync."""
28
27
  global _auto_indexing_service, _sync_scheduler_service # noqa: PLW0603
29
28
 
30
- # Setup app_context and implement logging and telemetry
29
+ # App context has already been configured by the CLI.
31
30
  app_context = AppContext()
32
- configure_logging(app_context)
33
- configure_telemetry(app_context)
34
31
 
35
32
  # Start auto-indexing service
36
33
  db = await app_context.get_db()
@@ -52,7 +52,17 @@ class OpenAIEmbeddingProvider(EmbeddingProvider):
52
52
  def _get_encoding(self) -> "Encoding":
53
53
  """Return (and cache) the tiktoken encoding for the chosen model."""
54
54
  if self._encoding is None:
55
- self._encoding = tiktoken.encoding_for_model(self.model_name)
55
+ try:
56
+ self._encoding = tiktoken.encoding_for_model(self.model_name)
57
+ except KeyError:
58
+ # If the model is not supported by tiktoken, use a default encoding
59
+ self.log.info(
60
+ "Model not supported by tiktoken, using default encoding",
61
+ model_name=self.model_name,
62
+ default_encoding="o200k_base",
63
+ )
64
+ self._encoding = tiktoken.get_encoding("o200k_base")
65
+
56
66
  return self._encoding
57
67
 
58
68
  def _split_sub_batches(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: kodit
3
- Version: 0.3.13
3
+ Version: 0.3.15
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,7 +1,7 @@
1
1
  kodit/.gitignore,sha256=ztkjgRwL9Uud1OEi36hGQeDGk3OLK1NfDEO8YqGYy8o,11
2
2
  kodit/__init__.py,sha256=aEKHYninUq1yh6jaNfvJBYg-6fenpN132nJt1UU6Jxs,59
3
- kodit/_version.py,sha256=EwvT0-VckFIV9s9wWIrrcCCLDLz10Bn0_zRsokqxmZs,513
4
- kodit/app.py,sha256=PZcmPNNqyBUUqXfV_pM7HpICrwZ_BjD3rBVdef9YjUs,4052
3
+ kodit/_version.py,sha256=HSn5cGZLA_vnXREa9sRtSYCA5Ii9CJlQbi1YMzsfUGM,513
4
+ kodit/app.py,sha256=aK6TP-7L3aHCiatNm_SYSw0zU4G3EuOcvdBZ3xPHO_U,3917
5
5
  kodit/cli.py,sha256=ZOS_VzCHGjJRZzZpaVR00QXSPIwRXPYu-pTrbEtlyR0,19328
6
6
  kodit/config.py,sha256=kuGdl-q5r9b7spt89-1mfVNuoQLqkXQ9-nuJFfRflUU,8940
7
7
  kodit/database.py,sha256=kI9yBm4uunsgV4-QeVoCBL0wLzU4kYmYv5qZilGnbPE,1740
@@ -57,7 +57,7 @@ kodit/infrastructure/embedding/embedding_providers/__init__.py,sha256=qeZ-oAIAxM
57
57
  kodit/infrastructure/embedding/embedding_providers/batching.py,sha256=a8CL9PX2VLmbeg616fc_lQzfC4BWTVn32m4SEhXpHxc,3279
58
58
  kodit/infrastructure/embedding/embedding_providers/hash_embedding_provider.py,sha256=V6OdCuWyQQOvo3OJGRi-gBKDApIcrELydFg7T696P5s,2257
59
59
  kodit/infrastructure/embedding/embedding_providers/local_embedding_provider.py,sha256=9aLV1Zg4KMhYWlGRwgAUtswW4aIabNqbsipWhAn64RI,4133
60
- kodit/infrastructure/embedding/embedding_providers/openai_embedding_provider.py,sha256=QfvdXXbWa-1DQriCzV-TmFm3XGqnVP_7PSQ6u6fKnuw,3973
60
+ kodit/infrastructure/embedding/embedding_providers/openai_embedding_provider.py,sha256=EBNBwme-n9WROSmjgjLYWwGbFc7AvTg6-IZ4fci2XVQ,4404
61
61
  kodit/infrastructure/enrichment/__init__.py,sha256=8acZKNzql8Fs0lceFu9U3KoUrOptRBtVIxr_Iw6lz3Y,40
62
62
  kodit/infrastructure/enrichment/enrichment_factory.py,sha256=_JWkna3g8q8hzaPq1NRfZU9Y_sv99xcloM4BCJAWmHw,2039
63
63
  kodit/infrastructure/enrichment/local_enrichment_provider.py,sha256=7Vlwu1jPJ5KNUn1a51M1P-laUd5YVFJA8EeH6KO-95k,3960
@@ -95,8 +95,8 @@ kodit/migrations/versions/c3f5137d30f5_index_all_the_things.py,sha256=r7ukmJ_axX
95
95
  kodit/utils/__init__.py,sha256=DPEB1i8evnLF4Ns3huuAYg-0pKBFKUFuiDzOKG9r-sw,33
96
96
  kodit/utils/dump_openapi.py,sha256=29VdjHpNSaGAg7RjQw0meq1OLhljCx1ElgBlTC8xoF4,1247
97
97
  kodit/utils/path_utils.py,sha256=thK6YGGNvQThdBaCYCCeCvS1L8x-lwl3AoGht2jnjGw,1645
98
- kodit-0.3.13.dist-info/METADATA,sha256=L8ME2qCp94fPYIbnQ7c4yaPyfEm2J-bOVNKfg6bknGw,7672
99
- kodit-0.3.13.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
100
- kodit-0.3.13.dist-info/entry_points.txt,sha256=hoTn-1aKyTItjnY91fnO-rV5uaWQLQ-Vi7V5et2IbHY,40
101
- kodit-0.3.13.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
102
- kodit-0.3.13.dist-info/RECORD,,
98
+ kodit-0.3.15.dist-info/METADATA,sha256=Ao9egwccbR6lQS0KqkSeS8gym88pE6SzTFVEOhYQnRE,7672
99
+ kodit-0.3.15.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
100
+ kodit-0.3.15.dist-info/entry_points.txt,sha256=hoTn-1aKyTItjnY91fnO-rV5uaWQLQ-Vi7V5et2IbHY,40
101
+ kodit-0.3.15.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
102
+ kodit-0.3.15.dist-info/RECORD,,
File without changes