@sakk-dev/sakk 0.0.0 → 0.4.0
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.
- package/.claude-plugin/marketplace.json +19 -0
- package/.claude-plugin/plugin.json +27 -0
- package/CHANGELOG.md +1421 -0
- package/LICENSE +202 -0
- package/NOTICE +82 -0
- package/README.md +617 -10
- package/README.zh-CN.md +555 -0
- package/bin/sakk.mjs +1460 -0
- package/integrations/litellm/LICENSE +202 -0
- package/integrations/litellm/NOTICE +82 -0
- package/integrations/litellm/README.md +366 -0
- package/integrations/litellm/config.example.yaml +52 -0
- package/integrations/litellm/sakk_gateway.py +823 -0
- package/package.json +79 -5
- package/policies/guard-default.json +161 -0
- package/policies/permissive-dev.json +22 -0
- package/prices/snapshot.json +1404 -0
- package/src/append.mjs +81 -0
- package/src/archive.mjs +489 -0
- package/src/classify.mjs +914 -0
- package/src/console-login.mjs +374 -0
- package/src/console.mjs +1628 -0
- package/src/gateway-status.mjs +203 -0
- package/src/guard-install.mjs +387 -0
- package/src/hook.mjs +730 -0
- package/src/ledger.mjs +1229 -0
- package/src/match.mjs +52 -0
- package/src/mcp.mjs +299 -0
- package/src/policy.mjs +423 -0
- package/src/prices.mjs +152 -0
- package/src/secret-rules.generated.mjs +225 -0
- package/src/secret-scan.mjs +489 -0
- package/src/spend.mjs +443 -0
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# LiteLLM proxy config with the Sakk spend gate. Copy to config.yaml next to
|
|
2
|
+
# sakk_gateway.py and point SAKK_GATEWAY_CONFIG at the copy.
|
|
3
|
+
#
|
|
4
|
+
# Prices are USD per token, written as decimals. PyYAML reads 1e-06 (no
|
|
5
|
+
# decimal point) as a string, so a price written that way counts as missing
|
|
6
|
+
# and every call to that model is refused with SAKK_NO_PRICE.
|
|
7
|
+
#
|
|
8
|
+
# A model with no price, or a wildcard model, is refused rather than let
|
|
9
|
+
# through. Retries are off everywhere so one reservation covers one provider
|
|
10
|
+
# request.
|
|
11
|
+
|
|
12
|
+
model_list:
|
|
13
|
+
- model_name: deepseek-chat
|
|
14
|
+
litellm_params:
|
|
15
|
+
model: deepseek/deepseek-chat
|
|
16
|
+
api_key: os.environ/DEEPSEEK_API_KEY
|
|
17
|
+
input_cost_per_token: 0.00000028
|
|
18
|
+
output_cost_per_token: 0.00000042
|
|
19
|
+
timeout: 60
|
|
20
|
+
max_retries: 0
|
|
21
|
+
|
|
22
|
+
- model_name: MiniMax-M3.1-Flash
|
|
23
|
+
litellm_params:
|
|
24
|
+
model: openai/MiniMax-M3.1-Flash
|
|
25
|
+
api_base: https://api.minimax.io/v1
|
|
26
|
+
api_key: os.environ/MINIMAX_API_KEY
|
|
27
|
+
input_cost_per_token: 0.00000015
|
|
28
|
+
output_cost_per_token: 0.0000006
|
|
29
|
+
timeout: 120
|
|
30
|
+
max_retries: 0
|
|
31
|
+
|
|
32
|
+
- model_name: MiniMax-M3
|
|
33
|
+
litellm_params:
|
|
34
|
+
model: openai/MiniMax-M3
|
|
35
|
+
api_base: https://api.minimax.io/v1
|
|
36
|
+
api_key: os.environ/MINIMAX_API_KEY
|
|
37
|
+
input_cost_per_token: 0.0000006
|
|
38
|
+
output_cost_per_token: 0.0000024
|
|
39
|
+
timeout: 120
|
|
40
|
+
max_retries: 0
|
|
41
|
+
|
|
42
|
+
litellm_settings:
|
|
43
|
+
callbacks: sakk_gateway.handler
|
|
44
|
+
num_retries: 0
|
|
45
|
+
|
|
46
|
+
router_settings:
|
|
47
|
+
num_retries: 0
|
|
48
|
+
|
|
49
|
+
general_settings:
|
|
50
|
+
# Clients send this key instead of a provider key. The provider keys stay
|
|
51
|
+
# in the gateway's environment.
|
|
52
|
+
master_key: os.environ/LITELLM_MASTER_KEY
|