Skip to content

Fix TOML rendering crash on float config values - #116

Merged
derekwisong merged 1 commit into
mainfrom
fix/config-toml-float
May 14, 2026
Merged

Fix TOML rendering crash on float config values#116
derekwisong merged 1 commit into
mainfrom
fix/config-toml-float

Conversation

@derekwisong

Copy link
Copy Markdown
Owner

Problem

pyagent-config init crashed with TypeError: unsupported toml value: 0.3:

File "pyagent/config.py", line 236, in _render_toml_value
    raise TypeError(f"unsupported toml value: {v!r}")
TypeError: unsupported toml value: 0.3

_render_toml_value handled bool, int, str, and list, but not float — so rendering the commented default template blew up on the 0.3 temperature default in DEFAULTS.

Fix

Add a float branch to _render_toml_value that emits repr(v).

Test plan

  • pyagent-config init --force succeeds and writes the default config + seeds roles

_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.
@derekwisong
derekwisong merged commit dd06459 into main May 14, 2026
1 check passed
@derekwisong
derekwisong deleted the fix/config-toml-float branch May 14, 2026 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant