refactor: comprehensive audit — fix bugs, harden security, deduplicate providers, add CI/Docker
Phase 1: Fix compilation (config_path Option<PathBuf>, streaming test, stale test cleanup) Phase 2: Fix critical bugs (remove block_on deadlocks in 4 providers, fix broken SQL query builder) Phase 3: Security hardening (session manager, real auth, token masking, Gemini key to header, password policy) Phase 4: Implement stubs (real provider test, /proc health metrics, client/provider/backup endpoints, has_images) Phase 5: Code quality (shared provider helpers, explicit re-exports, all Clippy warnings fixed, unwrap removal, 6 unused deps removed, dashboard split into 7 sub-modules) Phase 6: Infrastructure (GitHub Actions CI, multi-stage Dockerfile, rustfmt.toml, clippy.toml, script fixes)
This commit is contained in:
@@ -198,9 +198,7 @@ impl TryFrom<ChatCompletionRequest> for UnifiedRequest {
|
||||
.into_iter()
|
||||
.map(|msg| {
|
||||
let (content, _images_in_message) = match msg.content {
|
||||
MessageContent::Text { content } => {
|
||||
(vec![ContentPart::Text { text: content }], false)
|
||||
}
|
||||
MessageContent::Text { content } => (vec![ContentPart::Text { text: content }], false),
|
||||
MessageContent::Parts { content } => {
|
||||
let mut unified_content = Vec::new();
|
||||
let mut has_images_in_msg = false;
|
||||
@@ -213,18 +211,16 @@ impl TryFrom<ChatCompletionRequest> for UnifiedRequest {
|
||||
ContentPartValue::ImageUrl { image_url } => {
|
||||
has_images_in_msg = true;
|
||||
has_images = true;
|
||||
unified_content.push(ContentPart::Image(
|
||||
crate::multimodal::ImageInput::from_url(image_url.url)
|
||||
));
|
||||
unified_content.push(ContentPart::Image(crate::multimodal::ImageInput::from_url(
|
||||
image_url.url,
|
||||
)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
(unified_content, has_images_in_msg)
|
||||
}
|
||||
MessageContent::None => {
|
||||
(vec![], false)
|
||||
}
|
||||
MessageContent::None => (vec![], false),
|
||||
};
|
||||
|
||||
UnifiedMessage {
|
||||
|
||||
Reference in New Issue
Block a user