Skip to content

fix(opencode): allow opt out of auto generated sampling parameters - #42780

Open
sobakasu wants to merge 2 commits into
anomalyco:devfrom
sobakasu:feature/sampling-defaults
Open

fix(opencode): allow opt out of auto generated sampling parameters#42780
sobakasu wants to merge 2 commits into
anomalyco:devfrom
sobakasu:feature/sampling-defaults

Conversation

@sobakasu

Copy link
Copy Markdown

Issue for this PR

Closes #42775

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Adds an experimental 'sampling_defaults' (default true, to keep existing behaviour) config setting.
This can be set to false to opt out of the automatic sampling parameters that are generated based on model id/name.

{
  "$schema": "https://opencode.ai/config.json",
  "experimental": {
    "sampling_defaults": false
  },
}

The second commit makes some changes to these automatically generated settings, e.g. so that Qwen 3 uses top_p 0.95 instead of 1.

How did you verify your code works?

I built opencode in my branch and tested it against a local llama.cpp server. My opencode is configured with a model named "Qwen-3.8-27B" (see issue's how to reproduce section for details)

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

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.

[BUG]: (Incorrect) sampling parameters are hard-coded based on model name/id

1 participant