From 374c51d588e9dcf7f17cf2c19afd492332099aac Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Sat, 21 Feb 2026 05:58:59 +0000 Subject: [PATCH 1/2] add provider info to meta.extra in streaming responses Co-Authored-By: yujonglee --- crates/owhisper-interface/src/stream.rs | 10 ++++++++++ .../transcribe-proxy/src/routes/streaming/hyprnote.rs | 7 ++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/crates/owhisper-interface/src/stream.rs b/crates/owhisper-interface/src/stream.rs index eaddd44b99..8f662c0469 100644 --- a/crates/owhisper-interface/src/stream.rs +++ b/crates/owhisper-interface/src/stream.rs @@ -191,6 +191,16 @@ impl StreamResponse { } } + pub fn set_provider(&mut self, provider: &str) { + if let StreamResponse::TranscriptResponse { metadata, .. } = self { + let entry = metadata.extra.get_or_insert_with(std::collections::HashMap::new); + entry.insert( + "provider".to_string(), + serde_json::Value::String(provider.to_string()), + ); + } + } + pub fn remap_channel_index(&mut self, from: i32, to: i32) { if let StreamResponse::TranscriptResponse { channel_index, .. } = self && !channel_index.is_empty() diff --git a/crates/transcribe-proxy/src/routes/streaming/hyprnote.rs b/crates/transcribe-proxy/src/routes/streaming/hyprnote.rs index 9969c474d8..78bd9eb6af 100644 --- a/crates/transcribe-proxy/src/routes/streaming/hyprnote.rs +++ b/crates/transcribe-proxy/src/routes/streaming/hyprnote.rs @@ -78,8 +78,9 @@ fn build_response_transformer( provider: Provider, ) -> impl Fn(&str) -> Option + Send + Sync + 'static { let mistral_adapter = MistralAdapter::default(); + let provider_name = format!("{:?}", provider).to_lowercase(); move |raw: &str| { - let responses: Vec = match provider { + let mut responses: Vec = match provider { Provider::Deepgram => DeepgramAdapter.parse_response(raw), Provider::AssemblyAI => AssemblyAIAdapter.parse_response(raw), Provider::Soniox => SonioxAdapter.parse_response(raw), @@ -95,6 +96,10 @@ fn build_response_transformer( return None; } + for response in &mut responses { + response.set_provider(&provider_name); + } + if responses.len() == 1 { return serde_json::to_string(&responses[0]).ok(); } From ce9efbcc911e0b76d3a091bc55eb1ab39d38fab6 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Sat, 21 Feb 2026 06:06:29 +0000 Subject: [PATCH 2/2] fix rustfmt formatting Co-Authored-By: yujonglee --- crates/owhisper-interface/src/stream.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/owhisper-interface/src/stream.rs b/crates/owhisper-interface/src/stream.rs index 8f662c0469..a35f7defdd 100644 --- a/crates/owhisper-interface/src/stream.rs +++ b/crates/owhisper-interface/src/stream.rs @@ -193,7 +193,9 @@ impl StreamResponse { pub fn set_provider(&mut self, provider: &str) { if let StreamResponse::TranscriptResponse { metadata, .. } = self { - let entry = metadata.extra.get_or_insert_with(std::collections::HashMap::new); + let entry = metadata + .extra + .get_or_insert_with(std::collections::HashMap::new); entry.insert( "provider".to_string(), serde_json::Value::String(provider.to_string()),