mirror of
https://github.com/outbackdingo/optimclaw.git
synced 2026-08-27 08:00:17 +00:00
29 lines
955 B
Rust
29 lines
955 B
Rust
use ironclaw::llm::ChatMessage;
|
|
|
|
#[test]
|
|
fn test_regression_gemini_oauth_fields() {
|
|
// This test ensures that the CompletionResponse and ToolCompletionResponse
|
|
// include the newly added caching fields, which was a critical compilation fix.
|
|
// Since we are using the public API, if it compiles and runs, the fields are present.
|
|
|
|
// Test model metadata logic (which we updated)
|
|
assert!(
|
|
!ironclaw::llm::gemini_oauth::GeminiOauthProvider::model_uses_cloud_code_api(
|
|
"gemini-1.5-pro"
|
|
)
|
|
);
|
|
assert!(
|
|
ironclaw::llm::gemini_oauth::GeminiOauthProvider::model_uses_cloud_code_api(
|
|
"gemini-2.0-flash"
|
|
)
|
|
);
|
|
}
|
|
|
|
#[tokio::test]
|
|
async fn test_regression_chat_message_helpers() {
|
|
// Verify ChatMessage helper methods which were used to fix tests
|
|
let msg = ChatMessage::user("test");
|
|
assert_eq!(msg.role, ironclaw::llm::Role::User);
|
|
assert_eq!(msg.content, "test");
|
|
}
|