fix: fix typo in Gemini's generation_config property to use camelCase exclusively

This commit is contained in:
2026-07-21 11:11:00 -06:00
parent cd4bf245e9
commit cab1e72b97
+6 -2
View File
@@ -322,7 +322,11 @@ fn gemini_extract_chat_completions_text(data: &Value) -> Result<ChatCompletionsO
bail!("Invalid response data: {data}"); bail!("Invalid response data: {data}");
} }
} }
let output = ChatCompletionsOutput { text, tool_calls, ..Default::default() }; let output = ChatCompletionsOutput {
text,
tool_calls,
..Default::default()
};
Ok(output) Ok(output)
} }
@@ -435,7 +439,7 @@ pub fn gemini_build_chat_completions_body(
body["generationConfig"]["topP"] = v.into(); body["generationConfig"]["topP"] = v.into();
} }
if let Some(v) = reasoning_effort { if let Some(v) = reasoning_effort {
body["generation_config"]["thinking_level"] = v.into(); body["generationConfig"]["thinking_config"] = json!({"thinking_level": v});
} }
if let Some(functions) = functions { if let Some(functions) = functions {