mirror of
https://github.com/fawney19/Aether.git
synced 2026-10-11 03:39:49 +08:00
refactor(workspace): enforce layered crate boundaries
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
pub fn gemini_cli_v1internal_requires_upstream_streaming(
|
||||
provider_api_format: &str,
|
||||
client_requires_streaming: bool,
|
||||
) -> bool {
|
||||
client_requires_streaming
|
||||
&& aether_ai_formats::normalize_api_format_alias(provider_api_format)
|
||||
== "gemini:generate_content"
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::gemini_cli_v1internal_requires_upstream_streaming;
|
||||
|
||||
#[test]
|
||||
fn v1internal_generate_content_requires_upstream_streaming_for_stream_clients() {
|
||||
assert!(gemini_cli_v1internal_requires_upstream_streaming(
|
||||
"gemini:generate_content",
|
||||
true,
|
||||
));
|
||||
assert!(!gemini_cli_v1internal_requires_upstream_streaming(
|
||||
"gemini:generate_content",
|
||||
false,
|
||||
));
|
||||
assert!(!gemini_cli_v1internal_requires_upstream_streaming(
|
||||
"openai:chat",
|
||||
true,
|
||||
));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user