feat(gateway): route OpenAI image streams through chat bridge

This commit is contained in:
ZheFox
2026-05-17 23:09:50 +08:00
parent d6c8c14de7
commit 680b617b00
12 changed files with 1699 additions and 105 deletions
+5
View File
@@ -170,6 +170,7 @@ fn build_dimensions(input: &BillingUsageInput) -> BTreeMap<String, Value> {
"request_count".to_string(),
json!(input.request_count.max(0)),
),
("image_count".to_string(), json!(input.image_count.max(0))),
(
"total_input_context".to_string(),
json!(total_input_context),
@@ -256,6 +257,7 @@ mod tests {
cache_creation_ephemeral_5m_tokens: 0,
cache_creation_ephemeral_1h_tokens: 0,
cache_read_tokens: 100,
image_count: 0,
cache_ttl_minutes: Some(60),
},
)
@@ -282,6 +284,7 @@ mod tests {
cache_creation_ephemeral_5m_tokens: 0,
cache_creation_ephemeral_1h_tokens: 0,
cache_read_tokens: 800,
image_count: 0,
cache_ttl_minutes: Some(60),
},
)
@@ -351,6 +354,7 @@ mod tests {
cache_creation_ephemeral_5m_tokens: 0,
cache_creation_ephemeral_1h_tokens: 0,
cache_read_tokens: 100,
image_count: 0,
cache_ttl_minutes: Some(5),
},
)
@@ -420,6 +424,7 @@ mod tests {
cache_creation_ephemeral_5m_tokens: 0,
cache_creation_ephemeral_1h_tokens: 0,
cache_read_tokens: 100,
image_count: 0,
cache_ttl_minutes: Some(60),
},
)