User's Vault has openrouter_api_key but no direct sk-ant-* Anthropic key. OpenRouter passes through Claude Sonnet 4.6 (~3% markup over Anthropic list pricing) and matches the existing gpt_mini_endpoint pattern used by recruiter-responder. - Replace anthropic.AsyncAnthropic with openai.AsyncOpenAI + base_url - Convert Anthropic tool-use API to OpenAI function-calling - System prompt unchanged (analyst instructions are model-agnostic) - Drop cache_control (not in OpenAI API); revisit later if cost matters - Model slug: anthropic/claude-sonnet-4.5 (OpenRouter's current Claude tier) - Pricing: $3.10/M input, $15.50/M output (OpenRouter pass-through) - Config field anthropic_api_key -> openrouter_api_key - pyproject extras: anthropic>=0.40 -> openai>=1.50 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
45 lines
1.4 KiB
TOML
45 lines
1.4 KiB
TOML
[project]
|
|
name = "trading-bot"
|
|
version = "0.1.0"
|
|
requires-python = ">=3.12"
|
|
dependencies = [
|
|
"sqlalchemy[asyncio]>=2.0",
|
|
"asyncpg>=0.29",
|
|
"redis>=5.0",
|
|
"pydantic>=2.0",
|
|
"pydantic-settings>=2.0",
|
|
"opentelemetry-sdk>=1.20",
|
|
"opentelemetry-exporter-prometheus>=0.45b",
|
|
"opentelemetry-api>=1.20",
|
|
"alembic>=1.13",
|
|
]
|
|
|
|
[project.optional-dependencies]
|
|
api = ["fastapi>=0.110", "uvicorn[standard]>=0.27", "websockets>=12.0", "webauthn>=2.0", "pyjwt[crypto]>=2.8", "alpaca-py>=0.21"]
|
|
news = ["feedparser>=6.0", "praw>=7.7", "asyncpraw>=7.7", "httpx>=0.27"]
|
|
sentiment = ["transformers>=4.38", "torch>=2.2", "ollama>=0.1"]
|
|
trading = ["alpaca-py>=0.21", "pytz>=2024.1", "yfinance>=0.2", "httpx>=0.27"]
|
|
backtester = ["numpy>=1.26", "pandas>=2.2"]
|
|
meet_kevin = ["yt-dlp>=2025.12", "feedparser>=6.0", "openai>=1.50", "httpx>=0.27"]
|
|
dev = ["pytest>=8.0", "pytest-asyncio>=0.23", "pytest-cov>=4.1", "ruff>=0.3", "mypy>=1.8", "httpx>=0.27"]
|
|
|
|
[build-system]
|
|
requires = ["setuptools>=70.0"]
|
|
build-backend = "setuptools.build_meta"
|
|
|
|
[tool.setuptools.packages.find]
|
|
include = ["shared*", "services*", "backtester*", "scripts*", "tests*"]
|
|
|
|
[tool.pytest.ini_options]
|
|
asyncio_mode = "auto"
|
|
testpaths = ["tests"]
|
|
markers = ["integration: marks tests requiring docker services (redis, postgres)"]
|
|
|
|
[tool.ruff]
|
|
line-length = 120
|
|
target-version = "py312"
|
|
|
|
[tool.mypy]
|
|
python_version = "3.12"
|
|
warn_return_any = true
|
|
warn_unused_configs = true
|