Skip to content

fix(config): wire prm.temperature from config.yaml to PRMScorer - #58

Open
grimmjoww wants to merge 2 commits into
AMAP-ML:mainfrom
grimmjoww:fix/prm-temperature-config
Open

fix(config): wire prm.temperature from config.yaml to PRMScorer#58
grimmjoww wants to merge 2 commits into
AMAP-ML:mainfrom
grimmjoww:fix/prm-temperature-config

Conversation

@grimmjoww

Copy link
Copy Markdown

Problem

SkillClawConfig.prm_temperature exists (default 0.6) but ConfigStore.to_skillclaw_config() never populates it from the prm section of config.yaml — every other prm key (provider, url, model, api_key, enabled) is mapped, temperature is silently dropped. PRM scoring therefore always sends temperature=0.6 upstream.

Models with sampling constraints reject this. kimi k3 only accepts temperature=1, so every PRM vote fails:

[PRMScorer] query failed (vote 1): Error code: 400 - {'error': {'message': 'invalid temperature: only 1 is allowed for this model'}}

All votes fail → PRM scoring is silently disabled for any temperature-restricted upstream.

Fix

Two lines: read prm.temperature (default 0.6, unchanged) in to_skillclaw_config() and pass it through to SkillClawConfig.

The key is already user-settable via the existing generic CLI — skillclaw config prm.temperature 1 round-trips through ConfigStore.get/set — so no CLI changes are needed; the setting is now actually honored.

Not hard-coded: each deployment sets the value its model requires (prm.temperature: 1 for k3, anything else for other models); 0.6 remains the default.

Verification

  • skillclaw config prm.temperature 1to_skillclaw_config().prm_temperature == 1.0 (verified against a live config with prm.model: k3)
  • Daemon restarted; no more invalid temperature 400s in the PRM scorer path
  • Existing behavior unchanged when the key is absent (default 0.6)

The prm_temperature field existed on SkillClawConfig but was never
populated from the prm section of config.yaml, so PRM scoring always
sent the hard default 0.6 upstream. Models with sampling constraints
(e.g. kimi k3, which only accepts temperature=1) rejected every PRM
vote with HTTP 400, silently disabling PRM scoring.

Map prm.temperature (already settable via 'skillclaw config
prm.temperature <value>') through to SkillClawConfig, keeping 0.6 as
the default when unset.
Review feedback on the initial wiring: float(prm.get('temperature',
0.6) or 0.6) silently rewrote an explicit temperature: 0 to 0.6 —
the same 'user setting ignored' defect class this PR exists to fix.
Use a None-check guard instead, and add temperature to the defaults
dict so the key is self-documenting in seeded configs.

Adds tests/test_prm_temperature_config.py pinning: configured values
pass through (1, 0.2), explicit 0 is honored, absent key defaults to
0.6. 4/4 passing.
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