Skip to content
This repository was archived by the owner on Aug 24, 2026. It is now read-only.

Scope agent temperature compatibility by provider - #28

Closed
mihneaptu wants to merge 2 commits into
mainfrom
codex/model-temperature
Closed

mihneaptu wants to merge 2 commits into
mainfrom
codex/model-temperature

Conversation

@mihneaptu

@mihneaptu mihneaptu commented Jul 18, 2026 •

Copy link
Copy Markdown
Owner

What changed

Keep each Fusion agent's normal temperature in the source prompt, but omit it from the installed copy when that role uses exactly opencode-go/kimi-k3.

The compatibility rule is provider-qualified, so Kimi K3 served by Kimi For Coding or another provider keeps the role's default temperature. check-install applies the same transform when checking for drift.

Why

Controlled A/B tests against OpenCode Go showed that Kimi K3 returns HTTP 400 when temperature is present and succeeds when the field is omitted. Removing temperatures from every agent affected unrelated models and providers unnecessarily.

Verification

  • npm test — 109 passed, 0 failed, 2 POSIX-only skips
  • Installer regression — OpenCode Go Kimi K3 omits temperature while Kimi For Coding Kimi K3 keeps Design's 0.4
  • Live install — Sidekick and Design on opencode-go/kimi-k3 have no temperature; Research on kirocc/claude-opus-4-8 keeps 0.3
  • npm run check-install — all installed roles in sync

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request removes the temperature configuration from the frontmatter of several agent markdown files (design, research, reviewer, sidekick, and vision) and introduces a contract test in test/contracts.test.js to ensure no agent frontmatter sets a temperature. Feedback suggests improving the robustness of the test's regular expression to handle potentially quoted YAML keys and refining the test description.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread test/contracts.test.js Outdated
Comment on lines +212 to +221
test('no source agent frontmatter forces a model-specific temperature', () => {
for (const [role, agent] of Object.entries(agents)) {
const hasTemperature = linesOf(agent.frontmatter).some((line) => /^\s*temperature\s*:/.test(line));
assert.equal(
hasTemperature,
false,
`contract violated: agent/${role}.md frontmatter must not set temperature: (sampling support is model-specific)`
);
}
});

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The test description uses the word 'forces', but 'defines' or 'sets' is more accurate. Additionally, the regular expression /^\s*temperature\s*:/ does not account for keys that might be quoted (e.g., "temperature": or 'temperature':), which is valid YAML. Updating the regex to support optional quotes makes the contract check more robust.

Suggested change
test('no source agent frontmatter forces a model-specific temperature', () => {
for (const [role, agent] of Object.entries(agents)) {
const hasTemperature = linesOf(agent.frontmatter).some((line) => /^\s*temperature\s*:/.test(line));
assert.equal(
hasTemperature,
false,
`contract violated: agent/${role}.md frontmatter must not set temperature: (sampling support is model-specific)`
);
}
});
test('no source agent frontmatter defines a temperature', () => {
for (const [role, agent] of Object.entries(agents)) {
const hasTemperature = linesOf(agent.frontmatter).some((line) => /^\s*['"]?temperature['"]?\s*:/.test(line));
assert.equal(
hasTemperature,
false,
'contract violated: agent/' + role + '.md frontmatter must not set temperature: (sampling support is model-specific)'
);
}
});

@mihneaptu mihneaptu changed the title Remove model-specific agent temperatures Scope agent temperature compatibility by provider Jul 18, 2026
@mihneaptu

Copy link
Copy Markdown
Owner Author

Closing: superseded upstream. models.dev#3331 (merged ~1h after this PR went up) marks the base moonshotai/kimi-k3 as temperature = false, so opencode omits the field for Kimi K3 on every provider automatically — no client-side compat layer needed. Verified against the refreshed live catalog and the local cache.

@mihneaptu mihneaptu closed this Jul 18, 2026
@mihneaptu
mihneaptu deleted the codex/model-temperature branch July 18, 2026 17:19
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant