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

Revert PR #7188 - Restore temperature parameter to fix TabbyApi/ExLlamaV2 crashes - #7594

Merged
mrubens merged 4 commits into
mainfrom
revert-7188-clean-temperature-omission
Sep 8, 2025
Merged

Revert PR #7188 - Restore temperature parameter to fix TabbyApi/ExLlamaV2 crashes#7594
mrubens merged 4 commits into
mainfrom
revert-7188-clean-temperature-omission

Conversation

@daniel-lxs

@daniel-lxs daniel-lxs commented Sep 2, 2025

Copy link
Copy Markdown
Member

Summary

This is a clean revert of PR #7188 (commit 090737c) which introduced crashes in TabbyApi/ExLlamaV2 by omitting the temperature parameter when not explicitly set.

Why This Revert?

PR #7188 made the temperature parameter optional, omitting it when not explicitly set. This caused crashes in certain backends like TabbyApi/ExLlamaV2 that expect the temperature parameter to always be present.

What This Does

This PR performs a pure of the problematic commit, restoring the original behavior where:

  • Temperature is always included in API calls
  • The default temperature value is used when not explicitly set

Difference from PR #7582

PR #7582 attempted to fix the same issue but added new functionality (provider-specific default temperatures) that wasn't in the original code. This PR is a clean revert without any additional changes.

Testing

After this revert:

Fixes #7581


Important

Reverts commit 090737c to always include temperature in API calls, fixing crashes in TabbyApi/ExLlamaV2.

  • Behavior:
    • Reverts commit 090737c in base-openai-compatible-provider.ts and openai.ts to always include temperature in API calls.
    • Restores default temperature usage when not explicitly set.
  • Testing:
    • Ensures TabbyApi/ExLlamaV2 no longer crashes without explicit temperature.
    • All tests pass as before the original change.

This description was created by Ellipsis for cb25121. You can customize this summary. It will automatically update as commits are pushed.

@dosubot dosubot Bot added size:L This PR changes 100-499 lines, ignoring generated files. bug Something isn't working labels Sep 2, 2025

@ghost ghost 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.

Thank you for this clean revert! I've reviewed the changes and this effectively addresses the TabbyApi/ExLlamaV2 crash issue reported in #7581. The approach of doing a pure revert rather than adding new functionality is the right choice for a critical bug fix.

info: { maxTokens: max_tokens },
} = this.getModel()

const temperature = this.options.modelTemperature ?? this.defaultTemperature

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Good restoration of the temperature parameter. This ensures it's always included with a fallback to the default temperature (0) when not explicitly set, preventing the TypeError in TabbyApi/ExLlamaV2.

Consider adding a comment here explaining why temperature must always be included to prevent future developers from attempting similar optimizations:


const requestOptions: OpenAI.Chat.Completions.ChatCompletionCreateParamsStreaming = {
model: modelId,
temperature: this.options.modelTemperature ?? (deepseekReasoner ? DEEP_SEEK_DEFAULT_TEMPERATURE : 0),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The restoration here correctly handles the special case for DeepSeek Reasoner models while ensuring temperature is always included. This maintains compatibility with all OpenAI-compatible endpoints.

undefined,
)
})
})

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Good cleanup - removing the tests that validated omitting temperature. The remaining test correctly expects temperature to always be present.

stream: true,
stream_options: { include_usage: true },
// temperature should be omitted when not set
temperature: 0,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Is it intentional that the temperature here is 0 instead of a default like 0.5 or 0.7? Just want to confirm this aligns with the expected default behavior for OpenAI providers when temperature isn't explicitly set.

@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Sep 2, 2025
@daniel-lxs daniel-lxs moved this from Triage to PR [Needs Review] in Roo Code Roadmap Sep 2, 2025
@hannesrudolph hannesrudolph added PR - Needs Review and removed Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. labels Sep 2, 2025
@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Sep 5, 2025
…penAI Compatible providers (#7188)"

This reverts commit 090737c.
The requestOptions parameter was added after PR #7188, so tests need to be updated to not expect it after the revert
@daniel-lxs
daniel-lxs force-pushed the revert-7188-clean-temperature-omission branch from 2e05f51 to a521eaf Compare September 5, 2025 22:46
…evert

After reverting PR #7188, the createStream method in base-openai-compatible-provider.ts
calls client.chat.completions.create() with two parameters: params and requestOptions.
The tests need to be updated to expect this second parameter (which is often undefined).
@mrubens
mrubens merged commit 0ce4e89 into main Sep 8, 2025
@mrubens
mrubens deleted the revert-7188-clean-temperature-omission branch September 8, 2025 14:30
@github-project-automation github-project-automation Bot moved this from PR [Needs Review] to Done in Roo Code Roadmap Sep 8, 2025
@github-project-automation github-project-automation Bot moved this from New to Done in Roo Code Roadmap Sep 8, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug Something isn't working lgtm This PR has been approved by a maintainer PR - Needs Review size:L This PR changes 100-499 lines, ignoring generated files.

Projects

No open projects
Archived in project

Development

Successfully merging this pull request may close these issues.

Roo crashes TabbyApi/Exlamma after v3.25.20

3 participants