Repository navigation
Conversation
There was a problem hiding this comment.
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.
| 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)` | ||
| ); | ||
| } | ||
| }); |
There was a problem hiding this comment.
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.
| 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)' | |
| ); | |
| } | |
| }); |
|
Closing: superseded upstream. models.dev#3331 (merged ~1h after this PR went up) marks the base |
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-installapplies the same transform when checking for drift.Why
Controlled A/B tests against OpenCode Go showed that Kimi K3 returns HTTP 400 when
temperatureis 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 skips0.4opencode-go/kimi-k3have no temperature; Research onkirocc/claude-opus-4-8keeps0.3npm run check-install— all installed roles in sync