[build-system]
requires = ["maturin>=1.8"]
build-backend = "maturin"

[project]
name = "llmhosts"
version = "0.5.1"
description = "Your Personal AI Cloud -- intelligent proxy, router, and cache for LLMs"
readme = "README.md"
license = {text = "FSL-1.1-Apache-2.0"}
license-files = ["LICENSE"]
requires-python = ">=3.10"
authors = [
    { name = "LLMHosts Team" },
]
keywords = ["llm", "ai", "proxy", "router", "cache", "ollama", "openai", "anthropic"]
classifiers = [
    "Development Status :: 3 - Alpha",
    "Environment :: Console",
    "Framework :: FastAPI",
    "Intended Audience :: Developers",
    "Intended Audience :: System Administrators",
    "License :: Other/Proprietary 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 :: Internet :: Proxy Servers",
    "Topic :: Scientific/Engineering :: Artificial Intelligence",
    "Typing :: Typed",
]
dependencies = [
    "fastapi>=0.115.0",
    "uvicorn[standard]>=0.32.0",
    "httpx>=0.28.0",
    "litellm>=1.55.0",
    "click>=8.1.0",
    "rich>=13.9.0",
    "textual>=1.0.0",
    "pydantic>=2.10.0",
    "cryptography>=44.0.0",
    "toml>=0.10.2",
    "aiosqlite>=0.20.0",
    "websockets>=14.0",
    "alembic>=1.14.0",
]

[project.optional-dependencies]
smart = [
    "onnxruntime>=1.20.0",
    "numpy>=1.26.0,<3.0",
    "faiss-cpu>=1.9.0",
    "tokenizers>=0.21.0",
]
full = [
    "torch>=2.5.0",
    "sentence-transformers>=3.3.0",
    "faiss-cpu>=1.9.0",
    "transformers>=4.47.0",
]
dev = [
    "ruff>=0.8.0",
    "mypy>=1.13.0",
    "pytest>=8.3.0",
    "pytest-cov>=6.0.0",
    "pytest-asyncio>=0.24.0",
    "httpx>=0.28.0",
    "respx>=0.22.0",
    "pre-commit>=4.0.0",
    "bandit>=1.8.0",
    "prometheus-client>=0.21.0",
    "asyncssh>=2.17.0",
]
lan = [
    "zeroconf>=0.131.0",
]
monitoring = [
    "sentry-sdk[fastapi]>=2.0.0",
]
observability = [
    "opentelemetry-api>=1.20.0",
    "opentelemetry-sdk>=1.20.0",
    "opentelemetry-exporter-otlp>=1.20.0",
]

[project.scripts]
llmhosts = "llmhosts.cli:main"

[project.urls]
Homepage = "https://llmhosts.com"
Documentation = "https://llmhosts.com/docs"
Repository = "https://github.com/LookNoHandsMom/LLMHosts.com"
Issues = "https://github.com/LookNoHandsMom/LLMHosts.com/issues"
Changelog = "https://github.com/LookNoHandsMom/LLMHosts.com/blob/main/CHANGELOG.md"

[tool.maturin]
features = ["pyo3/extension-module"]
module-name = "_llmhosts"
python-packages = ["llmhosts", "hive"]
manifest-path = "Cargo.toml"

[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
markers = [
    "unit: Unit tests (fast, no external deps)",
    "integration: Integration tests (Docker required)",
    "e2e: End-to-end tests (full stack required)",
    "spec: Specification validation tests",
    "contract: API contract tests",
    "performance: Performance benchmarks",
    "security: Security tests",
    "slow: Tests that take >10s",
]
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "function"
filterwarnings = [
    "ignore:unclosed event loop:ResourceWarning",
]

[tool.ruff]
target-version = "py310"
line-length = 120

[tool.ruff.lint]
select = ["E", "F", "W", "I", "N", "UP", "B", "A", "SIM", "TCH", "RUF"]
ignore = ["E501"]

[tool.ruff.lint.isort]
known-first-party = ["llmhosts", "hive"]

[tool.mypy]
python_version = "3.10"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true
check_untyped_defs = true
ignore_missing_imports = true

[[tool.mypy.overrides]]
module = "toml"
ignore_missing_imports = true

[tool.coverage.run]
source = ["llmhosts", "hive"]
omit = ["*/tests/*", "*/__pycache__/*"]

[tool.coverage.report]
precision = 2
show_missing = true
skip_covered = false
