Skip to content

Port upstream 0.55.0: z.ai CN account balance - #372

Merged
Finesssee merged 2 commits into
mainfrom
port/055-zai-cn-balance
Aug 24, 2026
Merged

Port upstream 0.55.0: z.ai CN account balance#372
Finesssee merged 2 commits into
mainfrom
port/055-zai-cn-balance

Conversation

@Finesssee

Copy link
Copy Markdown
Collaborator

Summary

  • port upstream CodexBar v0.55.0 BigModel CN account-balance support from Add BigModel CN account balance to z.ai provider steipete/CodexBar#3109
  • perform the CN-only balance lookup against www.bigmodel.cn with a 5-second request bound
  • surface the remaining balance as a provider detail row without turning prepaid balance into spend
  • keep the lookup best-effort so quota display still succeeds if the balance endpoint fails

Upstream evidence

Validation

  • C:/Users/mac/.cargo/bin/cargo.exe test -p codexbar zai -> 38 passed
  • focused rustfmt on rust/src/providers/zai/mod.rs
  • git diff --check -> pass

Scope

Isolated BigModel CN provider-detail port. Global z.ai behavior and spend accounting are unchanged.

@Finesssee

Finesssee commented Aug 24, 2026

Copy link
Copy Markdown
Collaborator Author

Thermo-nuclear re-review

Previous finding is closed: CN balance request/parsing moved into balance.rs; zai/mod.rs is back below the thermo threshold at 983 lines. 38/38 focused tests and strict Clippy pass.

Verdict: APPROVED.

@Finesssee
Finesssee force-pushed the port/055-zai-cn-balance branch from cfa24b6 to 1f0761f Compare August 24, 2026 20:59
@Finesssee
Finesssee force-pushed the port/055-zai-cn-balance branch from 1f0761f to fc49f24 Compare August 24, 2026 21:09
@Finesssee
Finesssee merged commit 9540c9a into main Aug 24, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant