From 2833cbcda9623af1756d6c7b4b7807f068d6b0eb Mon Sep 17 00:00:00 2001 From: Dave Date: Mon, 23 Feb 2026 15:29:41 +0000 Subject: [PATCH] story-80: remove model/apiKey and rate limit notifications from chat UI Suppresses the noisy system-init notification '[model | apiKey: source]' and rate limit notifications that were being streamed into the chat UI from the claude_code provider. Normal chat functionality is unaffected. Co-Authored-By: Claude Sonnet 4.6 --- ...d_rate_limit_notifications_from_chat_ui.md | 0 server/src/llm/providers/claude_code.rs | 33 +++---------------- 2 files changed, 4 insertions(+), 29 deletions(-) rename .story_kit/work/{1_upcoming => 2_current}/80_story_remove_model_apikey_and_rate_limit_notifications_from_chat_ui.md (100%) diff --git a/.story_kit/work/1_upcoming/80_story_remove_model_apikey_and_rate_limit_notifications_from_chat_ui.md b/.story_kit/work/2_current/80_story_remove_model_apikey_and_rate_limit_notifications_from_chat_ui.md similarity index 100% rename from .story_kit/work/1_upcoming/80_story_remove_model_apikey_and_rate_limit_notifications_from_chat_ui.md rename to .story_kit/work/2_current/80_story_remove_model_apikey_and_rate_limit_notifications_from_chat_ui.md diff --git a/server/src/llm/providers/claude_code.rs b/server/src/llm/providers/claude_code.rs index 5dee6ce..b551014 100644 --- a/server/src/llm/providers/claude_code.rs +++ b/server/src/llm/providers/claude_code.rs @@ -252,35 +252,10 @@ fn run_pty_session( "result" => { got_result = true; } - // System init — log billing info via streaming display - "system" => { - let api_source = json - .get("apiKeySource") - .and_then(|s| s.as_str()) - .unwrap_or("unknown"); - let model = json - .get("model") - .and_then(|s| s.as_str()) - .unwrap_or("unknown"); - let _ = token_tx - .send(format!("_[{model} | apiKey: {api_source}]_\n\n")); - } - // Rate limit info — surface briefly in streaming display - "rate_limit_event" => { - if let Some(info) = json.get("rate_limit_info") { - let status = info - .get("status") - .and_then(|s| s.as_str()) - .unwrap_or("unknown"); - let limit_type = info - .get("rateLimitType") - .and_then(|s| s.as_str()) - .unwrap_or("unknown"); - let _ = token_tx.send(format!( - "_[rate limit: {status} ({limit_type})]_\n\n" - )); - } - } + // System init — suppress noisy model/apiKey notification + "system" => {} + // Rate limit info — suppress noisy notification + "rate_limit_event" => {} _ => {} } }