Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
116 lines (106 loc) · 3.13 KB
/
Copy pathpyproject.toml
File metadata and controls
116 lines (106 loc) · 3.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
[build-system]
requires = ["setuptools>=64", "wheel"]
build-backend = "setuptools.build_meta"
[project]
# TODO: verify availability on PyPI before first publish. If "codecontext" is
# taken, candidates: "codecontext-gateway", "codecontext-ai", "ccontext".
name = "promptrouter"
version = "0.3.1"
description = "LLM cost optimization gateway — route prompts locally, compact context for the rest, track real savings."
readme = "README.md"
license = { file = "LICENSE" }
requires-python = ">=3.10"
authors = [
{ name = "Naman" },
]
keywords = [
"llm",
"openai",
"anthropic",
"cost-optimization",
"rag",
"code-search",
"gateway",
"context",
"routing",
]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Software Development",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
]
dependencies = [
# Only one hard runtime dependency. Everything else (OpenAI/Anthropic APIs,
# embeddings, precise token counts) is optional and lazy-loaded.
"pathspec>=0.11",
]
[project.optional-dependencies]
# Semantic retrieval (sentence-transformers). Without this, CodeContext falls
# back to BM25-only retrieval, which is still usable.
embeddings = [
"sentence-transformers>=2.2",
]
# Precise tokenization via tiktoken. Without this, CodeContext approximates
# token counts; cost figures are close but not exact.
tokens = [
"tiktoken>=0.5",
]
# The gateway speaks HTTP to OpenAI directly via urllib, so the `openai` SDK
# is NOT required. These extras install the SDKs only if users want to use
# them in their own code alongside CodeContext.
openai = [
"openai>=1.0",
]
anthropic = [
"anthropic>=0.18",
]
# Everything non-dev a serious user is likely to want.
all = [
"sentence-transformers>=2.2",
"tiktoken>=0.5",
]
# Dev / test tooling.
dev = [
"pytest>=7.0",
"pytest-cov>=4.0",
"ruff>=0.1",
"build>=1.0",
"twine>=4.0",
]
[project.urls]
Homepage = "https://github.com/batish52/codecontext"
Repository = "https://github.com/batish52/codecontext"
Issues = "https://github.com/batish52/codecontext/issues"
Changelog = "https://github.com/batish52/codecontext/blob/main/CHANGELOG.md"
[project.scripts]
codecontext = "codecontext.cli:main"
[tool.setuptools]
# Explicit, deterministic packaging — no auto-discovery surprises.
packages = ["codecontext"]
include-package-data = true
[tool.setuptools.package-data]
codecontext = ["*.md"]
[tool.setuptools.exclude-package-data]
codecontext = [
"*_test.py",
"benchmarks/*",
"benchmarks/**/*",
]
[tool.pytest.ini_options]
testpaths = ["codecontext"]
python_files = ["*_test.py"]
[tool.ruff]
line-length = 120
target-version = "py310"
[tool.ruff.lint]
select = ["E", "F", "W", "I"]
ignore = ["E501"]