From 93bfff7b168f276483abae0c2660d3a5726181af Mon Sep 17 00:00:00 2001 From: Derek Wisong Date: Thu, 14 May 2026 15:56:36 -0400 Subject: [PATCH] Fix TOML rendering crash on float config values _render_toml_value handled bool/int/str/list but not float, so rendering the commented default template crashed on the 0.3 temperature default. Add a float branch. --- pyagent/config.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pyagent/config.py b/pyagent/config.py index 8e1d4cb..31a9892 100644 --- a/pyagent/config.py +++ b/pyagent/config.py @@ -228,6 +228,8 @@ def _render_toml_value(v: Any) -> str: return "true" if v else "false" if isinstance(v, int): return str(v) + if isinstance(v, float): + return repr(v) if isinstance(v, str): escaped = v.replace("\\", "\\\\").replace('"', '\\"') return f'"{escaped}"'