diff --git a/crates/openfang-runtime/src/drivers/anthropic.rs b/crates/openfang-runtime/src/drivers/anthropic.rs index fdbe99b5..344b4d46 100644 --- a/crates/openfang-runtime/src/drivers/anthropic.rs +++ b/crates/openfang-runtime/src/drivers/anthropic.rs @@ -472,7 +472,8 @@ impl LlmDriver for AnthropicDriver { }) = blocks.get(block_idx) { let input: serde_json::Value = - serde_json::from_str(input_json).unwrap_or_default(); + serde_json::from_str(input_json) + .unwrap_or_else(|_| serde_json::json!({})); let _ = tx .send(StreamEvent::ToolUseEnd { id: id.clone(), diff --git a/crates/openfang-runtime/src/drivers/openai.rs b/crates/openfang-runtime/src/drivers/openai.rs index 54f55181..7d54c432 100644 --- a/crates/openfang-runtime/src/drivers/openai.rs +++ b/crates/openfang-runtime/src/drivers/openai.rs @@ -153,9 +153,14 @@ fn rejects_temperature(model: &str) -> bool { m.starts_with("o1") || m.starts_with("o3") || m.starts_with("o4") - // GPT-5-mini is a reasoning model that rejects temperature + // GPT-5 nano/mini are reasoning models that reject temperature || m.starts_with("gpt-5-mini") + || m.starts_with("gpt-5-nano") || m.starts_with("gpt5-mini") + || m.starts_with("gpt5-nano") + // DeepSeek-R1 reasoning models + || m.contains("deepseek-r1") + || m.contains("reasoner") // Catch any model explicitly tagged as "reasoning" || m.contains("-reasoning") } diff --git a/rustfmt.toml b/rustfmt.toml new file mode 100644 index 00000000..758d4179 --- /dev/null +++ b/rustfmt.toml @@ -0,0 +1 @@ +max_width = 100