MCPcopy Create free account
hub / github.com/ChrisFeldmeier/OpenCodeRust / AnthropicUsage

Class AnthropicUsage

crates/opencode-provider/src/stream.rs:265–268  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

263
264#[derive(Debug, Clone, Serialize, Deserialize)]
265pub struct AnthropicUsage {
266 pub input_tokens: u64,
267 pub output_tokens: u64,
268}
269
270pub fn parse_anthropic_sse(data: &str) -> Option<StreamEvent> {
271 let event: AnthropicEvent = serde_json::from_str(data).ok()?;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected