kodit 0.5.3__tar.gz → 0.5.4__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.
Potentially problematic release.
This version of kodit might be problematic. Click here for more details.
- {kodit-0.5.3 → kodit-0.5.4}/Makefile +1 -1
- {kodit-0.5.3 → kodit-0.5.4}/PKG-INFO +1 -1
- {kodit-0.5.3 → kodit-0.5.4}/docs/reference/api/index.md +1 -1
- {kodit-0.5.3 → kodit-0.5.4}/docs/reference/api/openapi.json +1 -1
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/_version.py +2 -2
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/infrastructure/providers/litellm_provider.py +23 -1
- kodit-0.5.4/tests/kodit/infrastructure/providers/__init__.py +1 -0
- kodit-0.5.4/tests/kodit/infrastructure/providers/litellm_provider_test.py +273 -0
- {kodit-0.5.3 → kodit-0.5.4}/.claude/commands/debug.md +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/.claude/commands/new-requirement.md +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/.claude/commands/refactor.md +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/.claude/commands/update-docs.md +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/.claude/settings.json +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/.cursor/rules/kodit.mdc +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/.cursor/rules/style.mdc +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/.dockerignore +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/.github/CODE_OF_CONDUCT.md +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/.github/CONTRIBUTING.md +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/.github/dependabot.yml +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/.github/workflows/docker.yaml +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/.github/workflows/docs.yaml +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/.github/workflows/pull_request.yaml +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/.github/workflows/pypi-test.yaml +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/.github/workflows/pypi.yaml +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/.github/workflows/test.yaml +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/.gitignore +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/.python-version +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/.vscode/launch.json +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/.vscode/settings.json +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/CLAUDE.md +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/Dockerfile +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/LICENSE +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/README.md +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/alembic.ini +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/docs/_index.md +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/docs/demos/_index.md +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/docs/demos/go-simple-microservice/index.md +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/docs/demos/knock-knock-auth/index.md +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/docs/developer/index.md +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/docs/getting-started/_index.md +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/docs/getting-started/installation/index.md +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/docs/getting-started/integration/index.md +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/docs/getting-started/quick-start/index.md +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/docs/reference/_index.md +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/docs/reference/api/templates/_content.md.j2 +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/docs/reference/api/templates/_example.md.j2 +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/docs/reference/api/templates/_object_schema.md.j2 +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/docs/reference/api/templates/_security_scheme.md.j2 +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/docs/reference/api/templates/api_doc_template.md.j2 +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/docs/reference/configuration/index.md +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/docs/reference/configuration/templates/template.j2 +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/docs/reference/deployment/docker-compose.yaml +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/docs/reference/deployment/index.md +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/docs/reference/deployment/kubernetes.yaml +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/docs/reference/hosted-kodit/index.md +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/docs/reference/indexing/index.md +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/docs/reference/mcp/index.md +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/docs/reference/sync/index.md +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/docs/reference/telemetry/index.md +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/docs/reference/troubleshooting/index.md +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/pyproject.toml +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/.gitignore +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/__init__.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/app.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/application/__init__.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/application/factories/__init__.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/application/factories/reporting_factory.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/application/factories/server_factory.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/application/services/__init__.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/application/services/code_search_application_service.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/application/services/commit_indexing_application_service.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/application/services/enrichment_query_service.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/application/services/indexing_worker_service.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/application/services/queue_service.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/application/services/reporting.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/application/services/sync_scheduler.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/cli.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/cli_utils.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/config.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/database.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/domain/__init__.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/domain/enrichments/__init__.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/domain/enrichments/architecture/__init__.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/domain/enrichments/architecture/architecture.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/domain/enrichments/architecture/physical/__init__.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/domain/enrichments/architecture/physical/discovery_notes.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/domain/enrichments/architecture/physical/formatter.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/domain/enrichments/architecture/physical/physical.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/domain/enrichments/development/__init__.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/domain/enrichments/development/development.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/domain/enrichments/development/snippet/__init__.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/domain/enrichments/development/snippet/snippet.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/domain/enrichments/enricher.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/domain/enrichments/enrichment.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/domain/enrichments/request.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/domain/enrichments/response.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/domain/enrichments/usage/__init__.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/domain/enrichments/usage/api_docs.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/domain/enrichments/usage/usage.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/domain/entities/__init__.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/domain/entities/git.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/domain/errors.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/domain/factories/__init__.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/domain/factories/git_repo_factory.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/domain/protocols.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/domain/services/__init__.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/domain/services/bm25_service.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/domain/services/embedding_service.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/domain/services/git_repository_service.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/domain/services/git_service.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/domain/services/physical_architecture_service.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/domain/services/task_status_query_service.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/domain/tracking/__init__.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/domain/tracking/resolution_service.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/domain/tracking/trackable.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/domain/value_objects.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/infrastructure/__init__.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/infrastructure/api/__init__.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/infrastructure/api/client/__init__.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/infrastructure/api/client/base.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/infrastructure/api/client/exceptions.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/infrastructure/api/client/generated_endpoints.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/infrastructure/api/client/search_client.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/infrastructure/api/middleware/__init__.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/infrastructure/api/middleware/auth.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/infrastructure/api/v1/__init__.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/infrastructure/api/v1/dependencies.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/infrastructure/api/v1/routers/__init__.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/infrastructure/api/v1/routers/commits.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/infrastructure/api/v1/routers/queue.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/infrastructure/api/v1/routers/repositories.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/infrastructure/api/v1/routers/search.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/infrastructure/api/v1/schemas/__init__.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/infrastructure/api/v1/schemas/commit.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/infrastructure/api/v1/schemas/context.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/infrastructure/api/v1/schemas/enrichment.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/infrastructure/api/v1/schemas/queue.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/infrastructure/api/v1/schemas/repository.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/infrastructure/api/v1/schemas/search.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/infrastructure/api/v1/schemas/snippet.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/infrastructure/api/v1/schemas/tag.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/infrastructure/api/v1/schemas/task_status.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/infrastructure/bm25/__init__.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/infrastructure/bm25/local_bm25_repository.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/infrastructure/bm25/vectorchord_bm25_repository.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/infrastructure/cloning/git/__init__.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/infrastructure/cloning/git/git_python_adaptor.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/infrastructure/cloning/git/working_copy.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/infrastructure/embedding/__init__.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/infrastructure/embedding/embedding_factory.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/infrastructure/embedding/embedding_providers/__init__.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/infrastructure/embedding/embedding_providers/batching.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/infrastructure/embedding/embedding_providers/hash_embedding_provider.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/infrastructure/embedding/embedding_providers/litellm_embedding_provider.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/infrastructure/embedding/embedding_providers/local_embedding_provider.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/infrastructure/embedding/local_vector_search_repository.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/infrastructure/embedding/vectorchord_vector_search_repository.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/infrastructure/enricher/__init__.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/infrastructure/enricher/enricher_factory.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/infrastructure/enricher/litellm_enricher.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/infrastructure/enricher/local_enricher.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/infrastructure/enricher/null_enricher.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/infrastructure/enricher/utils.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/infrastructure/git/__init__.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/infrastructure/git/git_utils.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/infrastructure/ignore/__init__.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/infrastructure/ignore/ignore_pattern_provider.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/infrastructure/indexing/__init__.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/infrastructure/indexing/fusion_service.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/infrastructure/mappers/__init__.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/infrastructure/mappers/enrichment_mapper.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/infrastructure/mappers/git_mapper.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/infrastructure/mappers/snippet_mapper.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/infrastructure/mappers/task_mapper.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/infrastructure/mappers/task_status_mapper.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/infrastructure/physical_architecture/__init__.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/infrastructure/physical_architecture/detectors/__init__.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/infrastructure/physical_architecture/detectors/docker_compose_detector.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/infrastructure/physical_architecture/formatters/__init__.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/infrastructure/physical_architecture/formatters/narrative_formatter.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/infrastructure/providers/__init__.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/infrastructure/providers/async_batch_processor.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/infrastructure/reporting/__init__.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/infrastructure/reporting/db_progress.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/infrastructure/reporting/log_progress.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/infrastructure/reporting/telemetry_progress.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/infrastructure/slicing/__init__.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/infrastructure/slicing/api_doc_extractor.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/infrastructure/slicing/ast_analyzer.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/infrastructure/slicing/slicer.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/infrastructure/sqlalchemy/__init__.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/infrastructure/sqlalchemy/embedding_repository.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/infrastructure/sqlalchemy/enrichment_v2_repository.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/infrastructure/sqlalchemy/entities.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/infrastructure/sqlalchemy/git_branch_repository.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/infrastructure/sqlalchemy/git_commit_repository.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/infrastructure/sqlalchemy/git_repository.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/infrastructure/sqlalchemy/git_tag_repository.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/infrastructure/sqlalchemy/snippet_v2_repository.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/infrastructure/sqlalchemy/task_repository.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/infrastructure/sqlalchemy/task_status_repository.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/infrastructure/sqlalchemy/unit_of_work.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/log.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/mcp.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/middleware.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/migrations/README +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/migrations/__init__.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/migrations/env.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/migrations/script.py.mako +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/migrations/versions/04b80f802e0c_foreign_key_review.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/migrations/versions/19f8c7faf8b9_add_generic_enrichment_type.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/migrations/versions/4073b33f9436_add_file_processing_flag.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/migrations/versions/4552eb3f23ce_add_summary.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/migrations/versions/7c3bbc2ab32b_add_embeddings_table.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/migrations/versions/7f15f878c3a1_add_new_git_entities.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/migrations/versions/85155663351e_initial.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/migrations/versions/9cf0e87de578_add_queue.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/migrations/versions/9e53ea8bb3b0_add_authors.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/migrations/versions/__init__.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/migrations/versions/b9cd1c3fd762_add_task_status.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/migrations/versions/c3f5137d30f5_index_all_the_things.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/migrations/versions/f9e5ef5e688f_add_git_commits_number.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/py.typed +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/utils/__init__.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/utils/dump_config.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/utils/dump_openapi.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/utils/generate_api_paths.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/src/kodit/utils/path_utils.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/__init__.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/conftest.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/docker-smoke.sh +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/__init__.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/application/__init__.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/application/services/__init__.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/application/services/commit_indexing_application_service_test.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/application/services/queue_service_get_task_test.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/application/services/queue_service_test.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/application/services/reporting_test.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/cli_test.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/domain/__init__.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/domain/bm25_service_test.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/domain/embedding_service_test.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/domain/entities_test.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/domain/language_detection_service_test.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/domain/services/__init__.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/domain/services/git_repository_service_test.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/e2e.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/infrastructure/__init__.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/infrastructure/bm25/__init__.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/infrastructure/bm25/local_bm25_repository_test.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/infrastructure/cloning/__init__.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/infrastructure/cloning/git/__init__.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/infrastructure/cloning/git/git_python_adaptor_test.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/infrastructure/cloning/git_cloning/__init__.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/infrastructure/cloning/git_cloning/working_copy_test.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/infrastructure/embedding/__init__.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/infrastructure/embedding/batching_test.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/infrastructure/embedding/embedding_factory_test.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/infrastructure/embedding/embedding_provider/__init__.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/infrastructure/embedding/embedding_provider/hash_embedding_provider_test.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/infrastructure/embedding/embedding_provider/litellm_embedding_provider_test.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/infrastructure/embedding/embedding_provider/local_embedding_provider_test.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/infrastructure/embedding/test_litellm_socket_providers.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/infrastructure/enricher/__init__.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/infrastructure/enricher/null_enricher_test.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/infrastructure/mappers/__init__.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/infrastructure/mappers/git_mapper_test.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/infrastructure/physical_architecture/__init__.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/infrastructure/physical_architecture/detectors/__init__.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/infrastructure/physical_architecture/detectors/docker_compose_detector_test.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/infrastructure/physical_architecture/end_to_end_test.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/infrastructure/physical_architecture/fixtures/simple_web_app/docker-compose.yml +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/infrastructure/physical_architecture/formatters/__init__.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/infrastructure/physical_architecture/formatters/narrative_formatter_test.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/infrastructure/slicing/__init__.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/infrastructure/slicing/api_doc_extractor_test.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/infrastructure/slicing/ast_analyzer_test.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/infrastructure/slicing/data/__init__.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/infrastructure/slicing/data/c/main.c +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/infrastructure/slicing/data/c/models.c +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/infrastructure/slicing/data/c/models.h +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/infrastructure/slicing/data/c/utils.c +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/infrastructure/slicing/data/c/utils.h +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/infrastructure/slicing/data/cpp/main.cpp +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/infrastructure/slicing/data/cpp/models.cpp +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/infrastructure/slicing/data/cpp/models.hpp +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/infrastructure/slicing/data/cpp/utils.cpp +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/infrastructure/slicing/data/cpp/utils.hpp +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/infrastructure/slicing/data/csharp/Main.cs +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/infrastructure/slicing/data/csharp/Models.cs +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/infrastructure/slicing/data/csharp/Utils.cs +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/infrastructure/slicing/data/css/components.css +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/infrastructure/slicing/data/css/main.css +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/infrastructure/slicing/data/css/utilities.css +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/infrastructure/slicing/data/go/api/pkg/controller/filestore.go +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/infrastructure/slicing/data/go/api/pkg/controller/filestore_test.go +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/infrastructure/slicing/data/go/main.go +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/infrastructure/slicing/data/go/models.go +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/infrastructure/slicing/data/go/utils.go +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/infrastructure/slicing/data/html/components.html +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/infrastructure/slicing/data/html/forms.html +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/infrastructure/slicing/data/html/main.html +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/infrastructure/slicing/data/java/Main.java +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/infrastructure/slicing/data/java/Models.java +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/infrastructure/slicing/data/java/Utils.java +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/infrastructure/slicing/data/javascript/main.js +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/infrastructure/slicing/data/javascript/models.js +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/infrastructure/slicing/data/javascript/utils.js +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/infrastructure/slicing/data/python/__init__.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/infrastructure/slicing/data/python/main.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/infrastructure/slicing/data/python/models.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/infrastructure/slicing/data/python/submodule/__init__.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/infrastructure/slicing/data/python/submodule/main.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/infrastructure/slicing/data/python/utils.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/infrastructure/slicing/data/rust/main.rs +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/infrastructure/slicing/data/rust/models.rs +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/infrastructure/slicing/data/rust/utils.rs +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/infrastructure/slicing/slicer_test.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/infrastructure/snippets/__init__.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/infrastructure/snippets/csharp.cs +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/infrastructure/snippets/golang.go +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/infrastructure/snippets/javascript.js +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/infrastructure/snippets/knock_knock_server.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/infrastructure/snippets/python.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/infrastructure/snippets/typescript.tsx +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/infrastructure/sqlalchemy/__init__.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/infrastructure/sqlalchemy/embedding_repository_test.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/infrastructure/sqlalchemy/enrichment_v2_repository_test.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/infrastructure/sqlalchemy/git_branch_repository_test.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/infrastructure/sqlalchemy/git_commit_repository_test.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/infrastructure/sqlalchemy/git_repository_test.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/infrastructure/sqlalchemy/git_tag_repository_test.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/infrastructure/sqlalchemy/snippet_v2_repository_test.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/log_test.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/kodit/mcp_test.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/smoke.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/utils/__init__.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/utils/path_utils_test.py +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/tests/vectorchord-smoke.sh +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/understanding_architecture.md +0 -0
- {kodit-0.5.3 → kodit-0.5.4}/uv.lock +0 -0
|
@@ -12,7 +12,7 @@ look at the [hosted version](https://kodit.helix.ml/docs).
|
|
|
12
12
|
This is the REST API for the Kodit server. Please refer to the
|
|
13
13
|
[Kodit documentation](https://docs.helix.ml/kodit/) for more information.
|
|
14
14
|
|
|
15
|
-
Current version: 0.5.
|
|
15
|
+
Current version: 0.5.3
|
|
16
16
|
|
|
17
17
|
## Authentication
|
|
18
18
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"info": {
|
|
4
4
|
"title": "kodit API",
|
|
5
5
|
"description": "\nThis is the REST API for the Kodit server. Please refer to the\n[Kodit documentation](https://docs.helix.ml/kodit/) for more information.\n ",
|
|
6
|
-
"version": "0.5.
|
|
6
|
+
"version": "0.5.3"
|
|
7
7
|
},
|
|
8
8
|
"paths": {
|
|
9
9
|
"/healthz": {
|
|
@@ -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.
|
|
32
|
-
__version_tuple__ = version_tuple = (0, 5,
|
|
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
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Tests for infrastructure providers."""
|
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
"""Tests for the LiteLLM provider."""
|
|
2
|
+
|
|
3
|
+
from unittest.mock import AsyncMock, MagicMock, patch
|
|
4
|
+
|
|
5
|
+
import httpx
|
|
6
|
+
import litellm
|
|
7
|
+
import pytest
|
|
8
|
+
|
|
9
|
+
from kodit.config import Endpoint
|
|
10
|
+
from kodit.infrastructure.providers.litellm_provider import LiteLLMProvider
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class TestLiteLLMProvider:
|
|
14
|
+
"""Test the LiteLLM provider."""
|
|
15
|
+
|
|
16
|
+
def test_init_without_socket_path(self) -> None:
|
|
17
|
+
"""Test initialization without Unix socket path."""
|
|
18
|
+
endpoint = Endpoint(model="gpt-4o-mini", api_key="test-key")
|
|
19
|
+
provider = LiteLLMProvider(endpoint)
|
|
20
|
+
|
|
21
|
+
assert provider.endpoint.model == "gpt-4o-mini"
|
|
22
|
+
assert provider.endpoint.api_key == "test-key"
|
|
23
|
+
assert provider.endpoint.socket_path is None
|
|
24
|
+
|
|
25
|
+
@patch("kodit.infrastructure.providers.litellm_provider.httpx.AsyncClient")
|
|
26
|
+
@patch("kodit.infrastructure.providers.litellm_provider.httpx.AsyncHTTPTransport")
|
|
27
|
+
def test_init_with_socket_path(
|
|
28
|
+
self, mock_transport: MagicMock, mock_client: MagicMock
|
|
29
|
+
) -> None:
|
|
30
|
+
"""Test initialization with Unix socket path configures httpx client."""
|
|
31
|
+
endpoint = Endpoint(
|
|
32
|
+
model="gpt-4o-mini",
|
|
33
|
+
socket_path="/var/run/llm.sock",
|
|
34
|
+
timeout=60.0,
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
# Create mock instances
|
|
38
|
+
mock_transport_instance = MagicMock()
|
|
39
|
+
mock_transport.return_value = mock_transport_instance
|
|
40
|
+
mock_client_instance = MagicMock()
|
|
41
|
+
mock_client.return_value = mock_client_instance
|
|
42
|
+
|
|
43
|
+
LiteLLMProvider(endpoint)
|
|
44
|
+
|
|
45
|
+
# Verify transport was created with Unix socket
|
|
46
|
+
mock_transport.assert_called_once_with(uds="/var/run/llm.sock")
|
|
47
|
+
|
|
48
|
+
# Verify httpx client was created with correct parameters
|
|
49
|
+
mock_client.assert_called_once_with(
|
|
50
|
+
transport=mock_transport_instance,
|
|
51
|
+
base_url="http://localhost",
|
|
52
|
+
timeout=60.0,
|
|
53
|
+
)
|
|
54
|
+
|
|
55
|
+
# Verify litellm's aclient_session was set
|
|
56
|
+
assert litellm.aclient_session == mock_client_instance
|
|
57
|
+
|
|
58
|
+
def test_socket_path_not_set_when_none(self) -> None:
|
|
59
|
+
"""Test that socket setup is skipped when socket_path is None."""
|
|
60
|
+
endpoint = Endpoint(model="gpt-4o-mini")
|
|
61
|
+
|
|
62
|
+
# Store original session
|
|
63
|
+
original_session = getattr(litellm, "aclient_session", None)
|
|
64
|
+
|
|
65
|
+
try:
|
|
66
|
+
# Set to None to ensure clean state
|
|
67
|
+
litellm.aclient_session = None
|
|
68
|
+
|
|
69
|
+
provider = LiteLLMProvider(endpoint)
|
|
70
|
+
|
|
71
|
+
# Verify socket_path is None
|
|
72
|
+
assert provider.endpoint.socket_path is None
|
|
73
|
+
|
|
74
|
+
# Verify litellm.aclient_session was not set (still None)
|
|
75
|
+
assert litellm.aclient_session is None
|
|
76
|
+
finally:
|
|
77
|
+
# Restore original session
|
|
78
|
+
litellm.aclient_session = original_session
|
|
79
|
+
|
|
80
|
+
def test_populate_base_kwargs_with_all_params(self) -> None:
|
|
81
|
+
"""Test _populate_base_kwargs includes all endpoint parameters."""
|
|
82
|
+
endpoint = Endpoint(
|
|
83
|
+
model="gpt-4o-mini",
|
|
84
|
+
api_key="test-key",
|
|
85
|
+
base_url="https://custom.openai.com",
|
|
86
|
+
timeout=120.0,
|
|
87
|
+
extra_params={"temperature": 0.7, "max_tokens": 1000},
|
|
88
|
+
)
|
|
89
|
+
provider = LiteLLMProvider(endpoint)
|
|
90
|
+
|
|
91
|
+
kwargs = provider._populate_base_kwargs() # noqa: SLF001
|
|
92
|
+
|
|
93
|
+
assert kwargs["model"] == "gpt-4o-mini"
|
|
94
|
+
assert kwargs["timeout"] == 120.0
|
|
95
|
+
assert kwargs["api_key"] == "test-key"
|
|
96
|
+
assert kwargs["api_base"] == "https://custom.openai.com"
|
|
97
|
+
assert kwargs["temperature"] == 0.7
|
|
98
|
+
assert kwargs["max_tokens"] == 1000
|
|
99
|
+
|
|
100
|
+
def test_populate_base_kwargs_minimal(self) -> None:
|
|
101
|
+
"""Test _populate_base_kwargs with minimal configuration."""
|
|
102
|
+
endpoint = Endpoint(model="gpt-4o-mini")
|
|
103
|
+
provider = LiteLLMProvider(endpoint)
|
|
104
|
+
|
|
105
|
+
kwargs = provider._populate_base_kwargs() # noqa: SLF001
|
|
106
|
+
|
|
107
|
+
assert kwargs["model"] == "gpt-4o-mini"
|
|
108
|
+
assert kwargs["timeout"] == 60
|
|
109
|
+
assert "api_key" not in kwargs
|
|
110
|
+
assert "api_base" not in kwargs
|
|
111
|
+
|
|
112
|
+
@pytest.mark.asyncio
|
|
113
|
+
async def test_chat_completion_calls_acompletion(self) -> None:
|
|
114
|
+
"""Test chat_completion calls litellm's acompletion with correct params."""
|
|
115
|
+
endpoint = Endpoint(model="gpt-4o-mini", api_key="test-key")
|
|
116
|
+
provider = LiteLLMProvider(endpoint)
|
|
117
|
+
|
|
118
|
+
messages = [
|
|
119
|
+
{"role": "system", "content": "You are a helpful assistant."},
|
|
120
|
+
{"role": "user", "content": "Hello!"},
|
|
121
|
+
]
|
|
122
|
+
|
|
123
|
+
# Mock the acompletion function
|
|
124
|
+
mock_response = MagicMock()
|
|
125
|
+
mock_response.model_dump.return_value = {
|
|
126
|
+
"choices": [{"message": {"content": "Hi there!"}}]
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
with patch(
|
|
130
|
+
"kodit.infrastructure.providers.litellm_provider.acompletion",
|
|
131
|
+
new_callable=AsyncMock,
|
|
132
|
+
return_value=mock_response,
|
|
133
|
+
) as mock_acompletion:
|
|
134
|
+
result = await provider.chat_completion(messages)
|
|
135
|
+
|
|
136
|
+
# Verify acompletion was called with correct parameters
|
|
137
|
+
mock_acompletion.assert_called_once()
|
|
138
|
+
call_kwargs = mock_acompletion.call_args[1]
|
|
139
|
+
assert call_kwargs["model"] == "gpt-4o-mini"
|
|
140
|
+
assert call_kwargs["messages"] == messages
|
|
141
|
+
assert call_kwargs["api_key"] == "test-key"
|
|
142
|
+
assert call_kwargs["max_retries"] == 0
|
|
143
|
+
|
|
144
|
+
# Verify result
|
|
145
|
+
assert result == {"choices": [{"message": {"content": "Hi there!"}}]}
|
|
146
|
+
|
|
147
|
+
@pytest.mark.asyncio
|
|
148
|
+
async def test_embedding_calls_aembedding(self) -> None:
|
|
149
|
+
"""Test embedding calls litellm's aembedding with correct params."""
|
|
150
|
+
endpoint = Endpoint(model="text-embedding-3-small", api_key="test-key")
|
|
151
|
+
provider = LiteLLMProvider(endpoint)
|
|
152
|
+
|
|
153
|
+
texts = ["Hello world", "Test text"]
|
|
154
|
+
|
|
155
|
+
# Mock the aembedding function
|
|
156
|
+
mock_response = MagicMock()
|
|
157
|
+
mock_response.model_dump.return_value = {
|
|
158
|
+
"data": [
|
|
159
|
+
{"embedding": [0.1, 0.2, 0.3]},
|
|
160
|
+
{"embedding": [0.4, 0.5, 0.6]},
|
|
161
|
+
]
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
with patch(
|
|
165
|
+
"kodit.infrastructure.providers.litellm_provider.aembedding",
|
|
166
|
+
new_callable=AsyncMock,
|
|
167
|
+
return_value=mock_response,
|
|
168
|
+
) as mock_aembedding:
|
|
169
|
+
result = await provider.embedding(texts)
|
|
170
|
+
|
|
171
|
+
# Verify aembedding was called with correct parameters
|
|
172
|
+
mock_aembedding.assert_called_once()
|
|
173
|
+
call_kwargs = mock_aembedding.call_args[1]
|
|
174
|
+
assert call_kwargs["model"] == "text-embedding-3-small"
|
|
175
|
+
assert call_kwargs["input"] == texts
|
|
176
|
+
assert call_kwargs["api_key"] == "test-key"
|
|
177
|
+
assert call_kwargs["max_retries"] == 0
|
|
178
|
+
|
|
179
|
+
# Verify result
|
|
180
|
+
assert result == {
|
|
181
|
+
"data": [
|
|
182
|
+
{"embedding": [0.1, 0.2, 0.3]},
|
|
183
|
+
{"embedding": [0.4, 0.5, 0.6]},
|
|
184
|
+
]
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
@pytest.mark.asyncio
|
|
188
|
+
async def test_close_without_socket_path(self) -> None:
|
|
189
|
+
"""Test close method when not using Unix sockets."""
|
|
190
|
+
endpoint = Endpoint(model="gpt-4o-mini")
|
|
191
|
+
provider = LiteLLMProvider(endpoint)
|
|
192
|
+
|
|
193
|
+
# Should complete without error
|
|
194
|
+
await provider.close()
|
|
195
|
+
|
|
196
|
+
@pytest.mark.asyncio
|
|
197
|
+
async def test_close_with_socket_path(self) -> None:
|
|
198
|
+
"""Test close method cleans up httpx client when using Unix sockets."""
|
|
199
|
+
endpoint = Endpoint(
|
|
200
|
+
model="gpt-4o-mini",
|
|
201
|
+
socket_path="/var/run/llm.sock",
|
|
202
|
+
)
|
|
203
|
+
|
|
204
|
+
# Mock httpx client
|
|
205
|
+
mock_client = AsyncMock(spec=httpx.AsyncClient)
|
|
206
|
+
mock_client.aclose = AsyncMock()
|
|
207
|
+
|
|
208
|
+
with patch(
|
|
209
|
+
"kodit.infrastructure.providers.litellm_provider.httpx.AsyncClient",
|
|
210
|
+
return_value=mock_client,
|
|
211
|
+
), patch(
|
|
212
|
+
"kodit.infrastructure.providers.litellm_provider.httpx.AsyncHTTPTransport"
|
|
213
|
+
):
|
|
214
|
+
provider = LiteLLMProvider(endpoint)
|
|
215
|
+
|
|
216
|
+
# Verify client was set
|
|
217
|
+
assert litellm.aclient_session == mock_client
|
|
218
|
+
|
|
219
|
+
# Close the provider
|
|
220
|
+
await provider.close()
|
|
221
|
+
|
|
222
|
+
# Verify client was closed
|
|
223
|
+
mock_client.aclose.assert_called_once()
|
|
224
|
+
|
|
225
|
+
# Verify litellm.aclient_session was set to None
|
|
226
|
+
assert litellm.aclient_session is None
|
|
227
|
+
|
|
228
|
+
@pytest.mark.asyncio
|
|
229
|
+
@patch("kodit.infrastructure.providers.litellm_provider.httpx.AsyncClient")
|
|
230
|
+
@patch("kodit.infrastructure.providers.litellm_provider.httpx.AsyncHTTPTransport")
|
|
231
|
+
async def test_socket_path_end_to_end(
|
|
232
|
+
self, mock_transport: MagicMock, mock_client_class: MagicMock
|
|
233
|
+
) -> None:
|
|
234
|
+
"""Test Unix socket setup and cleanup end-to-end."""
|
|
235
|
+
# Create mock client instance
|
|
236
|
+
mock_client = AsyncMock()
|
|
237
|
+
mock_client.aclose = AsyncMock()
|
|
238
|
+
mock_client_class.return_value = mock_client
|
|
239
|
+
|
|
240
|
+
# Create mock transport
|
|
241
|
+
mock_transport_instance = MagicMock()
|
|
242
|
+
mock_transport.return_value = mock_transport_instance
|
|
243
|
+
|
|
244
|
+
endpoint = Endpoint(
|
|
245
|
+
model="gpt-4o-mini",
|
|
246
|
+
socket_path="/tmp/test.sock",
|
|
247
|
+
timeout=30.0,
|
|
248
|
+
)
|
|
249
|
+
|
|
250
|
+
# Initialize provider (should setup socket)
|
|
251
|
+
provider = LiteLLMProvider(endpoint)
|
|
252
|
+
|
|
253
|
+
# Verify transport was created
|
|
254
|
+
mock_transport.assert_called_once_with(uds="/tmp/test.sock")
|
|
255
|
+
|
|
256
|
+
# Verify client was created
|
|
257
|
+
mock_client_class.assert_called_once_with(
|
|
258
|
+
transport=mock_transport_instance,
|
|
259
|
+
base_url="http://localhost",
|
|
260
|
+
timeout=30.0,
|
|
261
|
+
)
|
|
262
|
+
|
|
263
|
+
# Verify litellm session was set
|
|
264
|
+
assert litellm.aclient_session == mock_client
|
|
265
|
+
|
|
266
|
+
# Close provider (should cleanup socket)
|
|
267
|
+
await provider.close()
|
|
268
|
+
|
|
269
|
+
# Verify client was closed
|
|
270
|
+
mock_client.aclose.assert_called_once()
|
|
271
|
+
|
|
272
|
+
# Verify session was cleared
|
|
273
|
+
assert litellm.aclient_session is None
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{kodit-0.5.3 → kodit-0.5.4}/src/kodit/application/services/code_search_application_service.py
RENAMED
|
File without changes
|
{kodit-0.5.3 → kodit-0.5.4}/src/kodit/application/services/commit_indexing_application_service.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{kodit-0.5.3 → kodit-0.5.4}/src/kodit/domain/enrichments/architecture/physical/discovery_notes.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|