- tools/scripts/llm-key-hunter: GitHub leak hunting pipeline (hunt_*, pivot miner, two-layer verify/content caches, per-provider verification) - usable_keys: verified key vault across 12 providers (deepseek, minimax, volcanoark, longcat, codingplan, zhipu free-tier, mimo, siliconflow, etc.) - .grok/skills/llm-key-hunter: operator skill for the hunt/verify/vault flow - NewAPI channel import scripts and CDP capture helpers - Result verdict buckets (excluding multi-GB blob caches and dedup dumps)
27 lines
1.3 KiB
Python
27 lines
1.3 KiB
Python
#!/usr/bin/env python3
|
|
"""Fix NewAPI channel types and remove expired channels."""
|
|
|
|
from newapi_client import update_channel, delete_channel, test_channel
|
|
from channels_config import FIX_TABLE
|
|
|
|
|
|
# ─── Fix channel types to OpenAI (type 1) ────────────────────────
|
|
print("=== Fixing channel types to OpenAI (type 1) ===\n")
|
|
for cid, name, new_type, base_url in FIX_TABLE:
|
|
success, msg = update_channel(cid, type=new_type, base_url=base_url)
|
|
print(f" ID={cid:2d} {name:30s} -> type={new_type} base_url={base_url} "
|
|
f"{'✅' if success else '❌'} {msg}")
|
|
|
|
# ─── Delete expired Baidu Qianfan ────────────────────────────────
|
|
print("\n=== Deleting expired Baidu Qianfan ===")
|
|
success, msg = delete_channel(13)
|
|
print(f" ID=13 BaiduQianfan-Coding {'✅' if success else '❌'} {msg}")
|
|
|
|
# ─── Re-test all fixed channels ──────────────────────────────────
|
|
print("\n=== Testing fixed channels ===\n")
|
|
test_ids = [6, 7, 8, 9, 10, 11, 12] # 11=VolcanoArk-CodingPlan (already working)
|
|
for cid in test_ids:
|
|
print(f" ID={cid:2d}...", end=" ", flush=True)
|
|
success, msg, _ = test_channel(cid)
|
|
print(f"{'✅' if success else '❌'} {msg[:80]}")
|