Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
a5edb93
Delete unused zai MCP details module
Finesssee Oct 10, 2026
59411b0
Delete unused Kiro CLI version API
Finesssee Oct 10, 2026
331eaea
Rename Kiro version module to cli_path
Finesssee Oct 10, 2026
eb98b74
Delete unused Kiro config path helper
Finesssee Oct 10, 2026
735fe26
Share one Kiro CLI spawn helper and resolve the binary once
Finesssee Oct 10, 2026
694341e
Merge Kiro JSON string readers behind a trim flag
Finesssee Oct 10, 2026
be6749f
Delete unused zai model-usage and dashboard URLs
Finesssee Oct 10, 2026
b745993
Delete unused zai MissingToken error
Finesssee Oct 10, 2026
2b2e948
Share one zai endpoint override parser
Finesssee Oct 10, 2026
10fd524
Table zai limit units and drop one-caller wrappers
Finesssee Oct 10, 2026
6e055d3
Route zai quota tests through the parse_data helper
Finesssee Oct 10, 2026
b513134
Share zai settings test token and relay helpers
Finesssee Oct 10, 2026
a66b1ab
Table zai region alias test
Finesssee Oct 10, 2026
44c76b2
Delete unused Cursor browser-cookie fetch path
Finesssee Oct 10, 2026
d9eef13
Drop the Cursor date fallback that can never parse
Finesssee Oct 10, 2026
a782f72
Make Cursor usage result building infallible
Finesssee Oct 10, 2026
9425c7c
Share Cursor on-demand cents and cost fallbacks
Finesssee Oct 10, 2026
5a9b446
Alias the Cursor fetch tuple and inline its one-caller helper
Finesssee Oct 10, 2026
b9482eb
Share one Cursor WAL sidecar path helper
Finesssee Oct 10, 2026
5b48d6a
Build Cursor test usage events through one event() helper
Finesssee Oct 10, 2026
c907c8b
Walk Alibaba JSON through one deep_find helper
Finesssee Oct 10, 2026
810ca11
Share one Alibaba console POST helper
Finesssee Oct 10, 2026
8a01baf
Share one Alibaba console payload decoder
Finesssee Oct 10, 2026
afb85ea
Inline the Alibaba optional personal POST wrapper
Finesssee Oct 10, 2026
0d07412
Route Alibaba sources through one fetch_via helper
Finesssee Oct 10, 2026
a961697
Table Alibaba region, CLI and personal envelope tests
Finesssee Oct 10, 2026
fec27f4
Walk QwenCloud JSON through one deep_find helper
Finesssee Oct 10, 2026
efc1c27
Post QwenCloud console calls through one closure
Finesssee Oct 10, 2026
2b86d14
Share one CodeBuddy env path reader
Finesssee Oct 10, 2026
33cb632
Build CodeBuddy test mocks through one mock_usage helper
Finesssee Oct 10, 2026
2623b7d
Call the shared resolve_api_key from Doubao
Finesssee Oct 10, 2026
2f360e3
Drop the Doubao product scan that discards its message
Finesssee Oct 10, 2026
cbb14d5
Build Doubao probe header tests through one probe_with helper
Finesssee Oct 10, 2026
254e69e
Share one sub2api rate-limit window builder
Finesssee Oct 10, 2026
5b4898f
Merge the sub2api unknown-kind totals arms
Finesssee Oct 10, 2026
d6ae676
Drop sub2api serde renames that repeat the field name
Finesssee Oct 10, 2026
04a7f48
Borrow the ZoomMate request context instead of cloning its fields
Finesssee Oct 10, 2026
5cf77c8
Invalidate the ZoomMate bearer cache without re-matching every error
Finesssee Oct 10, 2026
82e7a21
Promote the ZoomMate preferred host by moving it to the front
Finesssee Oct 10, 2026
f1e7178
Decide ZoomMate host failover through the tested should_failover
Finesssee Oct 10, 2026
8785d5e
Share one Factory GET-and-decode helper
Finesssee Oct 10, 2026
e238b79
Fetch Factory web and API usage through one auth-and-usage helper
Finesssee Oct 10, 2026
dae1097
Drop the Factory sources test that repeats the no-CLI sources test
Finesssee Oct 10, 2026
fa536c0
Pin Bedrock SigV4 Authorization golden values
Finesssee Oct 10, 2026
7eb7249
Sign and send Bedrock AWS calls through one signed_post helper
Finesssee Oct 10, 2026
b215f0c
Build the Bedrock canonical headers from one template
Finesssee Oct 10, 2026
3a76743
Read Bedrock JSON credential fields through one json_str helper
Finesssee Oct 10, 2026
8625e73
Share one missing-credentials error in Bedrock env lookup
Finesssee Oct 10, 2026
858d5fa
Make the Bedrock AWS CLI path lookup infallible
Finesssee Oct 10, 2026
d8a25e3
Pin Gemini quota bucket selection with characterization tests
Finesssee Oct 10, 2026
1ff3000
Pick the Gemini fnm root per platform in one function
Finesssee Oct 10, 2026
7884b8f
Pick the Gemini primary and Flash windows through shared closures
Finesssee Oct 10, 2026
22f8717
Parse Gemini reset times with RFC 3339 only
Finesssee Oct 10, 2026
96cf52c
Return a Gemini UsageSnapshot instead of a four-field tuple
Finesssee Oct 10, 2026
f818933
Move the uncompiled Infini integration tests into the module
Finesssee Oct 10, 2026
03189d9
Move the QwenCloud tests into their own file
Finesssee Oct 10, 2026
e5999ba
Move the CodeBuddy tests into their own file
Finesssee Oct 10, 2026
cd179a7
Move the Doubao tests into their own file
Finesssee Oct 10, 2026
c5fa198
Move the Alibaba Token Plan tests into their own file
Finesssee Oct 10, 2026
7c25439
Move the sub2api tests into their own file
Finesssee Oct 10, 2026
bbfee67
Move the ZoomMate tests into their own file
Finesssee Oct 10, 2026
0a07b77
Move the Factory tests into their own file
Finesssee Oct 10, 2026
b505bc9
Move the Bedrock tests into their own file
Finesssee Oct 10, 2026
3532121
Move the Gemini API tests into their own file
Finesssee Oct 10, 2026
5150fcf
Move the Cursor API tests into their own file
Finesssee Oct 10, 2026
d16b601
Move the QwenCloud JSON field lookups into a fields module
Finesssee Oct 10, 2026
c509cb6
Drop the leading blank line rustfmt left in the split test files
Finesssee Oct 10, 2026
601c027
Move the Alibaba Token Plan JSON field lookups into a fields module
Finesssee Oct 10, 2026
e74e18d
Move the Doubao arkcli usage fallback into its own module
Finesssee Oct 10, 2026
7325791
Keep the Qwen Cloud and Alibaba field helpers private to their modules
Finesssee Oct 10, 2026
8e391e2
Pin the Qwen Cloud and Alibaba console params payloads
Finesssee Oct 10, 2026
76aa36f
Build the Qwen Cloud and Alibaba cornerstone params with json!
Finesssee Oct 10, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 24 additions & 57 deletions rust/src/providers/alibabatokenplan/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,66 +192,33 @@ mod tests {

#[test]
fn regional_cli_arguments_match_bailian_contract() {
assert_eq!(
cli_arguments(AlibabaTokenPlanRegion::Cn),
vec![
"usage",
"token-plan",
"--console-region",
"cn-beijing",
"--console-site",
"domestic",
"--output",
"json"
]
);
assert_eq!(
cli_arguments(AlibabaTokenPlanRegion::CnPersonal),
vec![
"console",
"call",
"--api",
"zeldaHttp.apikeyMgr./tokenplan/personal/api/v2/usage",
"--data",
"{}",
"--console-region",
"cn-beijing",
"--console-site",
"domestic",
"--output",
"json"
]
);
assert_eq!(
cli_arguments(AlibabaTokenPlanRegion::IntlPersonal),
vec![
"console",
"call",
"--api",
"zeldaHttp.apikeyMgr./tokenplan/personal/api/v2/usage",
"--data",
"{}",
"--console-region",
"ap-southeast-1",
"--console-site",
"international",
"--output",
"json"
]
);
assert_eq!(
cli_arguments(AlibabaTokenPlanRegion::Intl),
vec![
"usage",
"token-plan",
use AlibabaTokenPlanRegion::*;
const TEAM: &[&str] = &["usage", "token-plan"];
const PERSONAL: &[&str] = &[
"console",
"call",
"--api",
"zeldaHttp.apikeyMgr./tokenplan/personal/api/v2/usage",
"--data",
"{}",
];
for (region, head, console_region, console_site) in [
(Cn, TEAM, "cn-beijing", "domestic"),
(CnPersonal, PERSONAL, "cn-beijing", "domestic"),
(IntlPersonal, PERSONAL, "ap-southeast-1", "international"),
(Intl, TEAM, "ap-southeast-1", "international"),
] {
let mut expected = head.to_vec();
expected.extend([
"--console-region",
"ap-southeast-1",
console_region,
"--console-site",
"international",
console_site,
"--output",
"json"
]
);
"json",
]);
assert_eq!(cli_arguments(region), expected, "{region:?}");
}
}

#[test]
Expand Down
Loading