mirror of
https://wget.la/https://github.com/leookun/cursor-byok
synced 2026-10-06 13:44:21 +08:00
feat(api): enhance statistics storage management with scope options
- Introduced a new type `StatisticsStorageScope` to specify the scope for clearing statistics. - Updated the `clearStatisticsStorage` API method to accept a scope parameter, allowing for selective clearing of detailed records or all statistics. - Modified the demo API to handle the new scope parameter appropriately. - Updated the SettingsPage component to include a selection for clearing scope, enhancing user control over statistics management. - Added new translations for the updated messages related to statistics clearing in both English and Chinese.
This commit is contained in:
@@ -672,7 +672,17 @@ async fn anthropic_raw_stream_uses_explicit_and_default_token_limits() {
|
||||
server.abort();
|
||||
|
||||
assert_eq!(body["max_tokens"], 1234);
|
||||
assert!(body.get("cache_control").is_none());
|
||||
assert_eq!(
|
||||
body["messages"][0]["content"][0]["cache_control"]["type"],
|
||||
"ephemeral"
|
||||
);
|
||||
assert_eq!(default_body["max_tokens"], 65_000);
|
||||
assert!(default_body.get("cache_control").is_none());
|
||||
assert_eq!(
|
||||
default_body["messages"][0]["content"][0]["cache_control"]["type"],
|
||||
"ephemeral"
|
||||
);
|
||||
assert!(body.get("service_tier").is_none());
|
||||
assert_eq!(body["messages"][0]["content"][1]["type"], "image");
|
||||
assert_eq!(
|
||||
|
||||
Reference in New Issue
Block a user