copilot: Remove PromptTokensDetails from Usage struct (cherry-pick #33029) (#33108)
gcp-cherry-pick-bot[bot]
and
Umesh Yadav
created
Cherry-picked copilot: Remove PromptTokensDetails from Usage struct
(#33029)
Closes #33024
Release Notes:
- Removed `PromptTokensDetails` from `Usage` as Gemini no longer
supplies cached token data for copilot.
Co-authored-by: Umesh Yadav <23421535+imumesh18@users.noreply.github.com>
Change summary
crates/copilot/src/copilot_chat.rs | 6 ------
1 file changed, 6 deletions(-)
Detailed changes
@@ -318,15 +318,9 @@ pub struct ResponseEvent {
pub struct Usage {
pub completion_tokens: u64,
pub prompt_tokens: u64,
- pub prompt_tokens_details: PromptTokensDetails,
pub total_tokens: u64,
}
-#[derive(Deserialize, Debug)]
-pub struct PromptTokensDetails {
- pub cached_tokens: u64,
-}
-
#[derive(Debug, Deserialize)]
pub struct ResponseChoice {
pub index: usize,