-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
97 lines (89 loc) · 4.05 KB
/
Copy pathpyproject.toml
File metadata and controls
97 lines (89 loc) · 4.05 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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "blockrun-litellm"
version = "0.9.0"
description = "LiteLLM adapter for BlockRun — call x402-paid AI models via LiteLLM (custom provider or local OpenAI-compatible proxy)"
readme = "README.md"
license = "MIT"
requires-python = ">=3.9"
authors = [
{ name = "BlockRun", email = "hello@blockrun.ai" }
]
keywords = ["litellm", "blockrun", "x402", "openai", "llm-proxy", "openrouter", "ai-gateway"]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Software Development :: Libraries :: Python Modules",
]
dependencies = [
# >=1.4.6: ChatResponse.cost_usd / settlement (#11, #12) — lets the provider
# report the REAL x402 wallet charge (race-free), not a token×list-price
# estimate (see 0.4.3). >=1.4.7 also attaches the real charge to streamed
# chunks (ChatCompletionChunk.cost_usd) so streaming reports real cost too.
# Also carries the earlier >=1.4.1 streamed-tool-call parse fix and the
# Solana ~/.blockrun/.solana-session auto-load.
# NB: proactive Seedance settlement re-signing (>=1.5.1) is a SolanaLLMClient
# concern, so it is enforced by the [solana] floor below rather than here —
# base-chain users don't need it, and [solana] already pulls a newer core.
# >=1.7.0: `input_type` on VideoClient.generate (BlockRunAI/blockrun-llm#24).
# Unlike the re-signing note above this IS a base-chain concern — the Base
# gateway accepts input_type and VIDEO_PARAM_KEYS forwards it on both chains,
# and VideoClient.generate has a closed signature, so an older core raises
# TypeError the first time a caller sends it.
"blockrun-llm>=1.7.0",
"litellm>=1.40.0",
]
[project.optional-dependencies]
# Re-exported here so `pip install 'blockrun-litellm[solana]'` pulls the
# x402 SVM toolchain that SolanaLLMClient needs (x402 SDK + solders).
# NB: Solana *media* (SolanaLLMClient.video/music/speech/sound_effect) needs the
# blockrun-llm release carrying BlockRunAI/blockrun-llm#16, shipped in 1.5.0
# (also carries #17 rpc_batch cache fix, #18 solana<0.40 pin, #19 media
# hardening). Older SDKs degrade Solana media to a clear 501, not a 500.
# >=1.5.1 adds proactive video settlement re-signing (#22); 1.5.0 can exhaust
# its two reactive retries on Seedance 2.0/2.0-fast and surface a payment_error.
# >=1.6.1: fails fast when the payer has no USDC token account
# (BlockRunAI/blockrun-llm#23). Below this floor a wallet that can never pay
# burns all 5 payment retries, each costing the gateway 4 verify retries — 20
# facilitator calls per doomed request. A floor, not just a preference: the
# amplification is what turned one unfunded wallet into a ~260-call storm, and
# a pinned older SDK reintroduces it in full. Base-chain users are unaffected,
# so the base floor deliberately stays where it is.
# >=1.7.0: `quality` on SolanaLLMClient.image/image_edit (#24). Solana-only —
# the Base gateway has no quality field, so the adapter 400s rather than let it
# be silently dropped. Tracks the base floor here only because both landed in
# the same release.
solana = ["blockrun-llm[solana]>=1.7.0"]
proxy = [
"fastapi>=0.110.0",
"python-multipart>=0.0.9",
"uvicorn[standard]>=0.27.0",
]
dev = [
"pytest>=8.0",
"pytest-asyncio>=0.23",
"httpx>=0.27",
"ruff>=0.4",
]
[project.scripts]
blockrun-litellm-proxy = "blockrun_litellm.proxy:main"
[project.urls]
Homepage = "https://blockrun.ai"
Repository = "https://github.com/BlockRunAI/blockrun-litellm"
Documentation = "https://github.com/BlockRunAI/blockrun-litellm#readme"
[tool.hatch.build.targets.wheel]
packages = ["blockrun_litellm"]
[tool.ruff]
line-length = 100
target-version = "py39"
[tool.pytest.ini_options]
asyncio_mode = "auto"
testpaths = ["tests"]