flexgate 0.11.2__tar.gz → 0.11.3__tar.gz

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.
Files changed (41) hide show
  1. {flexgate-0.11.2 → flexgate-0.11.3}/PKG-INFO +1 -1
  2. {flexgate-0.11.2 → flexgate-0.11.3}/docs/cli.md +2 -0
  3. {flexgate-0.11.2 → flexgate-0.11.3}/docs/usage.md +8 -0
  4. {flexgate-0.11.2 → flexgate-0.11.3}/flexgate/__init__.py +1 -1
  5. {flexgate-0.11.2 → flexgate-0.11.3}/flexgate/cli.py +9 -1
  6. {flexgate-0.11.2 → flexgate-0.11.3}/.github/workflows/docs.yml +0 -0
  7. {flexgate-0.11.2 → flexgate-0.11.3}/.github/workflows/release.yml +0 -0
  8. {flexgate-0.11.2 → flexgate-0.11.3}/.gitignore +0 -0
  9. {flexgate-0.11.2 → flexgate-0.11.3}/CLAUDE.md +0 -0
  10. {flexgate-0.11.2 → flexgate-0.11.3}/README.md +0 -0
  11. {flexgate-0.11.2 → flexgate-0.11.3}/config.yaml.template +0 -0
  12. {flexgate-0.11.2 → flexgate-0.11.3}/docs/Makefile +0 -0
  13. {flexgate-0.11.2 → flexgate-0.11.3}/docs/_static/.gitkeep +0 -0
  14. {flexgate-0.11.2 → flexgate-0.11.3}/docs/api.md +0 -0
  15. {flexgate-0.11.2 → flexgate-0.11.3}/docs/conf.py +0 -0
  16. {flexgate-0.11.2 → flexgate-0.11.3}/docs/configuration.md +0 -0
  17. {flexgate-0.11.2 → flexgate-0.11.3}/docs/development.md +0 -0
  18. {flexgate-0.11.2 → flexgate-0.11.3}/docs/index.md +0 -0
  19. {flexgate-0.11.2 → flexgate-0.11.3}/docs/quickstart.md +0 -0
  20. {flexgate-0.11.2 → flexgate-0.11.3}/docs/requirements.txt +0 -0
  21. {flexgate-0.11.2 → flexgate-0.11.3}/flexgate/__main__.py +0 -0
  22. {flexgate-0.11.2 → flexgate-0.11.3}/flexgate/config.py +0 -0
  23. {flexgate-0.11.2 → flexgate-0.11.3}/flexgate/doctor.py +0 -0
  24. {flexgate-0.11.2 → flexgate-0.11.3}/flexgate/fallback.py +0 -0
  25. {flexgate-0.11.2 → flexgate-0.11.3}/flexgate/healthcheck.py +0 -0
  26. {flexgate-0.11.2 → flexgate-0.11.3}/flexgate/images.py +0 -0
  27. {flexgate-0.11.2 → flexgate-0.11.3}/flexgate/main.py +0 -0
  28. {flexgate-0.11.2 → flexgate-0.11.3}/flexgate/migrate.py +0 -0
  29. {flexgate-0.11.2 → flexgate-0.11.3}/flexgate/proxy.py +0 -0
  30. {flexgate-0.11.2 → flexgate-0.11.3}/flexgate/router.py +0 -0
  31. {flexgate-0.11.2 → flexgate-0.11.3}/flexgate/server.py +0 -0
  32. {flexgate-0.11.2 → flexgate-0.11.3}/flexgate/service.py +0 -0
  33. {flexgate-0.11.2 → flexgate-0.11.3}/flexgate/settings.py +0 -0
  34. {flexgate-0.11.2 → flexgate-0.11.3}/flexgate/sync.py +0 -0
  35. {flexgate-0.11.2 → flexgate-0.11.3}/flexgate/ui.py +0 -0
  36. {flexgate-0.11.2 → flexgate-0.11.3}/flexgate/update.py +0 -0
  37. {flexgate-0.11.2 → flexgate-0.11.3}/flexgate/usage.py +0 -0
  38. {flexgate-0.11.2 → flexgate-0.11.3}/pyproject.toml +0 -0
  39. {flexgate-0.11.2 → flexgate-0.11.3}/test.png +0 -0
  40. {flexgate-0.11.2 → flexgate-0.11.3}/test_multimodal.py +0 -0
  41. {flexgate-0.11.2 → flexgate-0.11.3}/test_multimodal_gateway.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: flexgate
3
- Version: 0.11.2
3
+ Version: 0.11.3
4
4
  Summary: Flexible local API gateway for Claude Code — route models to different providers
5
5
  Project-URL: Homepage, https://github.com/Agony5757/flexible-gateway
6
6
  Project-URL: Repository, https://github.com/Agony5757/flexible-gateway
@@ -92,6 +92,8 @@ flexgate usage --time-format hours # 倒计时以小时计(dhm / hours / minu
92
92
 
93
93
  `usage`(及 `status` 的用量段)默认输出**统一摘要**:每个 key 一行的
94
94
  套餐名、5h 余额百分比、周余额百分比、5h 剩余时间、周用量剩余时间。
95
+ 两者的第一行都会显示本地系统时间(`usage` 单独一行;`status` 附在首行
96
+ 版本号旁)。
95
97
  平台未返回的 `?` 值按固定语义处理(余额 `?` → `0%`,重置时间 `?` →
96
98
  `—` 无倒计时)。字段、JSON 结构与 `?` 语义详见[用量查询](usage.md)。
97
99
 
@@ -1,6 +1,8 @@
1
1
  # 用量查询
2
2
 
3
3
  `flexgate status` 和 `flexgate usage` 会逐一查询**每个 key** 的用量/额度。
4
+ 两者的第一行都会显示本地系统时间(`usage` 单独一行;`status` 附在首行
5
+ 版本号旁),标注本次快照的生成时刻。
4
6
  默认输出**统一摘要**:每个 key 一行,包含套餐名、5 小时窗口余额百分比、
5
7
  周窗口余额百分比、5 小时窗口剩余时间(距重置的倒计时)和周用量剩余时间;
6
8
  `--verbose` 才显示各适配器的原始明细。
@@ -30,6 +32,8 @@
30
32
  ## 统一摘要(默认输出)
31
33
 
32
34
  ```text
35
+ 2026-10-07 19:59:42
36
+
33
37
  Usage (timeout 15s per key)
34
38
  zhipu
35
39
  ✓ #1 cbc4***sL7n [main] plan pro 5h 88% · 4h 36m weekly 81% · 6d 16h 15m
@@ -66,6 +70,8 @@ Usage (timeout 15s per key)
66
70
  的原始逐行信息,与旧版输出一致:
67
71
 
68
72
  ```text
73
+ 2026-10-07 20:01:15
74
+
69
75
  Usage (timeout 15s per key)
70
76
  kimi:
71
77
  ✓ key #1 (sk-k***66N6) [ywj] Kimi Code usages API (unofficial)
@@ -139,6 +145,8 @@ provider 下时缓存互不影响),此后 `flexgate status` / `flexgate usag
139
145
  提示:
140
146
 
141
147
  ```text
148
+ 2026-10-07 20:02:33
149
+
142
150
  Usage (timeout 15s per key)
143
151
  2 key(s) skipped — last check failed (recheck with: flexgate usage --force)
144
152
  zai
@@ -1,3 +1,3 @@
1
1
  """Flexgate — Flexible API Gateway for Claude Code."""
2
2
 
3
- __version__ = "0.11.2"
3
+ __version__ = "0.11.3"
@@ -76,6 +76,13 @@ def _format_duration(seconds: float, style: str) -> str:
76
76
  return f"{hours}h {minutes}m"
77
77
  return f"{minutes}m"
78
78
 
79
+
80
+ def _now_str() -> str:
81
+ """Local system time stamped on the first output line of usage/status."""
82
+ from datetime import datetime
83
+
84
+ return datetime.now().strftime("%Y-%m-%d %H:%M:%S")
85
+
79
86
  # ── run (foreground debugging) ─────────────────────────────────────
80
87
 
81
88
  def _service_config_arg(args: argparse.Namespace) -> str | None:
@@ -174,7 +181,7 @@ def cmd_status(args: argparse.Namespace) -> None:
174
181
  _emit_json(_status_json_payload(config, config_path, args))
175
182
  return
176
183
 
177
- print(_bold(f"flexgate {__version__}"))
184
+ print(_bold(f"flexgate {__version__}") + _dim(f" · {_now_str()}"))
178
185
  print(f" {_dim('config:')} {os.path.abspath(config_path)}")
179
186
  print(f" {_dim('server:')} {_cyan(f'{config.server.host}:{config.server.port}')}")
180
187
 
@@ -255,6 +262,7 @@ def cmd_usage(args: argparse.Namespace) -> None:
255
262
  _emit_json(payload)
256
263
  return
257
264
 
265
+ print(_dim(_now_str()))
258
266
  _print_usage(config, timeout, force=force, verbose=verbose,
259
267
  time_format=getattr(args, "time_format", "dhm"))
260
268
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes