Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
collab: Set cached token values when initially creating lifetime usage records (#18865)
Marshall Bowers3f2de172aeb3
diff --git a/crates/collab/src/llm/db/queries/usages.rs b/crates/collab/src/llm/db/queries/usages.rsindex 128a42bc587..d703066913f 100644--- a/crates/collab/src/llm/db/queries/usages.rs+++ b/crates/collab/src/llm/db/queries/usages.rs@@ -382,6 +382,10 @@ impl LlmDatabase {user_id: ActiveValue::set(user_id),model_id: ActiveValue::set(model.id),input_tokens: ActiveValue::set(input_token_count as i64),+ cache_creation_input_tokens: ActiveValue::set(+ cache_creation_input_tokens as i64,+ ),+ cache_read_input_tokens: ActiveValue::set(cache_read_input_tokens as i64),output_tokens: ActiveValue::set(output_token_count as i64),..Default::default()}