yumoqing e3f61f446d feat(balance): extend atomic balance reserve to async+sync+product paths
- balance.py: module-level redis.asyncio singleton (works in all
  processes without env.redis injection), centralized tpac/self-org
  skip policy, userid param, extend_reserve, invalidate_balance_cache,
  finalize updates max_cost on cold start (no reserve)
- llmclient.py: unified reserve injection in _inference_generator
  (covers all 22 dspy entries); fix luid mismatch (reserve key ==
  llmusage id == finalize key); stream exception refund
- syncinference.py / asyncinference.py: luid reuse + failure refunds
  (submit failure, outer exception, query_task_status FAILED)
- product_interface.py: reserve + refund on product stream/non-stream
- accounting.py: finalize after llm_accounting (was missing for
  direct llmage accounting path -> reserve leaked until TTL)
- init.py: lambda signatures synced
- v1/chat/completions/index.dspy: pass userid to reserve
2026-08-04 18:35:53 +08:00
..
2026-05-19 16:21:23 +08:00
2026-07-21 11:11:48 +08:00
2026-05-16 15:14:31 +08:00
2026-05-08 10:54:33 +08:00
2026-04-27 10:41:15 +08:00
2026-04-05 16:02:45 +08:00
2026-04-10 16:48:33 +08:00
2026-03-30 12:04:24 +08:00
2026-03-30 16:07:52 +08:00
2026-03-27 13:20:16 +08:00
2026-04-08 17:28:32 +08:00
2026-03-29 17:28:39 +08:00