replace production panics with graceful error handling in common crate (#844)

This commit is contained in:
Adil Hafeez 2026-03-31 14:28:11 -07:00 committed by GitHub
parent 36fa42b364
commit d8f4fd76e3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 9 additions and 4 deletions

View file

@ -2,7 +2,6 @@ use crate::{
configuration::LlmProvider,
consts::{ARCH_FC_MODEL_NAME, ASSISTANT_ROLE},
};
use core::{panic, str};
use serde::{ser::SerializeMap, Deserialize, Serialize};
use std::{
collections::{HashMap, VecDeque},
@ -193,7 +192,7 @@ impl Display for ContentType {
// skip image URLs or their data in text representation
None
} else {
panic!("Unsupported content type: {:?}", part.content_type);
None
}
})
.collect();