Skip to content

Agent temperature parameter is not passed to LLM API requests #34405

Closed as not planned

Description

@hmppt

Description

The temperature parameter configured for a specific agent in opencode.json is not taking effect. When the agent sends a request through the custom model API (myprovider/MiniMax-M2.7), the temperature parameter is not included in the API request.

Expected behavior
When agent.build.temperature is configured, these parameters should be passed to the corresponding LLM API request.

I confirm that I am using the build mode.

Plugins

None

OpenCode version

1.17.11

Steps to reproduce

  • OpenCode configuration file: ~.config\opencode\opencode.json
  • Model used: myprovider/MiniMax-M2.7
  • API provider: Custom OpenAI-compatible API (baseURL: http://localhost:8090/v1)
  • AI SDK: @ai-sdk/openai-compatible

opencode.json

{
  "model": "myprovider/MiniMax-M2.7",
  "small_model": "myprovider/MiniMax-M2.7",
  "provider": {
    "myprovider": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "maas",
      "options": {
        "baseURL": "http://localhost:8090/v1",
        "apiKey": "ah-xxx"
      }
    }
  },
  "agent": {
    "build": {"temperature": 1}
  }
}

Screenshot and/or share link

The request content is as follows:

{
    model : "MiniMax-M2.7"
    max_tokens : 32000
    top_p : 0.95
    messages [
        {
            role : "system"
            content : "You are opencode, an interactive AI ..."
        }
        {
            role : "user"
            content : "你是谁"
        }
    ]
    tools [ 17 items ]
    tool_choice : "auto"
    stream : true
    stream_options {
        include_usage : true
    }
}

Operating System

Windows 11

Terminal

Powershell

Activity

  1. github-actions commented on Jun 29, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

  2. Xre0uS commented on Jul 26, 2026

    @Xre0uS

    Also ran into this on version 1.18.4 with my own provider, on Linux.

    The issue is silent, the schema accepts the field, debug config shows it, and output is fine, just non-deterministic while temperature is set to 0.

  3. github-actions commented on Sep 25, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions