fix(llm): omit temperature for OpenAI GPT-6 family (#1101) - #1115
Merged
Merged
Conversation
Official openai channel already skipped temperature for gpt-5* (Open-Less#857); GPT-6 Astra/Sol/Luna reject non-default temperature the same way. Extend the omit rule and cover display-name / prefixed model ids in unit tests.
aeoform
added a commit
to aeoform/openless
that referenced
this pull request
Sep 28, 2026
现场:一个跑了一晚的 UI 进程 RSS 5.8 GB(VSS 7.2 GB),但 21 小时只用了
60 秒 CPU、GPU 显存 47 MiB —— 涨的是纯内存,不是渲染,也不是泄漏式的匀速增长。
成因是三段代码凑在一起:
1. 宿主 `publish_view_model()`:内容没变也**每 2 秒发一份保活快照**。
2. UI 侧收件通道是无界 `mpsc::channel()`(`UiBridgeClient::connect`)。
3. 窗口被遮挡/不可见时,eframe 会**完全跳过 egui pass**
(eframe 0.36 `wgpu_integration.rs` 的 `if !show_ui { /* 不做任何 egui pass */ }`),
`UiClientApp::ui()` 根本不会被调用,也就没人排空那个通道。
于是「窗口不可见」的每一秒都在堆快照:21 小时 ≈ 3.7 万份 × ~154 KB ≈ 5.8 GB,
且窗口恢复可见后要先逐份消化积压再回到正常帧,看起来就是卡死。
旁证:健康实例每 40 秒左右会写一条 `[ui-client] ipc round-trip ...`(UI 每 2 秒
一次 ping),而那个实例 21 小时里一条都没有 —— 它的 egui pass 一直没跑。
改法:快照不再走通道,只进 `UiBridgeClient` 的**单一槽位**(`LatestSnapshot`)。
旧快照本来就会被后一份覆盖,中间那些没有任何价值;窗口每帧 `take_snapshot()`
一次即可。内存因此与「窗口被遮挡多久 / 宿主发过多少份」无关。
控制帧(Ready/Hotkeys/Pong/Focus…)照旧走通道:它们由事件驱动、体积小。
回归测试 `an_undrained_window_keeps_only_the_newest_snapshot`:连发 40 份快照、
一份都不取,断言只有序号 40 留在槽位、取走后清空、通道里一句快照都没有
(把快照改回走通道时该测试立刻超时失败,已验证)。
另外这次同步把 origin/beta 的两个提交(Open-Less#1113 空格/鼠标热键、Open-Less#1115 GPT-6 温度)
合入本分支,无冲突。
package revision 120。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
openaiChat Completions path no longer sends customtemperatureforgpt-6*(Astra/Sol/Luna), matching the existing gpt-5* omit rule from [area] open ai gpt-5 系列無法使用 #857.GPT-6 Astra,openai/prefix, and the custom-provider bypass path.Test plan
cargo test -p openless-core --locked --lib omits_temperaturecargo test -p openless-core --locked --lib keeps_custom_temperature_for_gptcargo test -p openless-core --locked --lib keeps_default_temperature_for_openai_non