Skip to content

OpenCode: the sampling profile's temperature and top_p - #281

Merged
mzueri merged 3 commits into
mainfrom
opencode-sampling
Nov 30, 2026
Merged

mzueri merged 3 commits into
mainfrom
opencode-sampling

Conversation

@mzueri

@mzueri mzueri commented Nov 30, 2026

Copy link
Copy Markdown
Contributor

OpenCode sent no sampling settings, so the server sampled at vLLM's defaults (temperature 1.0, top_p 1.0), while terminus-2 and OpenHands get the harbor profile (thinking: 0.6 / 0.95). The server log of a debug job showed every OpenCode request at 1.0 / 1.0.

  • the profile's temperature and top_p become the build agent's settings in the generated opencode_config (the agent opencode run uses); a user opencode_config still wins over them
  • the model entry gets temperature: true: without it OpenCode sends the agent's top_p but no temperature (seen in the server log: top_p 0.95 with temperature 1.0)
  • other samplers (top_k, ...) are refused for OpenCode, like for OpenHands
  • docs and tests updated

Checked on Clariden (Chonk v0.2, --reasoning-effort high, 3 SWE-bench tasks x 4 attempts, server logging on): 464 requests arrived at temperature 0.6 / top_p 0.95, none at 1.0 / 1.0 (a few title-agent requests at 0.5 / 1.0).

This is a parity fix and does not fix the empty final replies: in that run 3 of 9 trials still ended with an empty reply after the thinking frame (3 completion tokens, prompts of 13 to 15k tokens), as in the runs before. Invalid tool calls (malformed argument JSON) were 7 of 284 generations before and 0 after, on a small sample.

@mzueri
mzueri merged commit 4646643 into main Nov 30, 2026
3 checks passed
@mzueri
mzueri deleted the opencode-sampling branch November 30, 2026 14:40
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