Repository navigation
Conversation
Add a description-model setting that preserves the description-only response schema without changing title routing.
yetone
left a comment
There was a problem hiding this comment.
Thanks for this. Routing thread_description on its own is useful, and with a model set it works end to end: I checked it at b528a04 in a sandbox gateway on both /v1/responses and /backend-api/codex/responses, and the usage record shows the thread_description kind. A few things before it can merge:
- Codex on magpie with the setting empty.
codexTitlesTofalls back to routing titles when Codex itself runs on magpie (#743), butcodexDescriptionsTodoesn't. With Codex on a Chat-backed magpie model and no description model set, the upstream gets no schema, returns plain text, and Codex shows no description. CouldcodexDescriptionsTofall back the same way? - Translations. The three new strings have zh but no ja or de, so
gui-jaandgui-defail in both engines. The new "Description" purpose label fromusage/purpose.gohas no translation at all, so it shows in English in Usage and Routing. - Tests. Codex's real
thread_descriptionschema (from ChatGPT.app) is{"description":{"type":"string","minLength":1}}with nomaxLength; please build the fixtures from that instead ofmaxLength:24. Nothing fails whennoDescriptionnever flags a reply, so please add a case with an unusable reply. The newTestPurposeFilterrow passes without thepurpose.gochange, because unknown kinds already show askind:<kind>; please check the label instead. - Small things. Please move the
renderCodexTitles(#705) comment back above its function, and add the new row to the list of settings hidden in gateway mode indocs/reference.md.
Ran: go vet (darwin, linux, windows), builds, Go tests for gateway, gui, usage and settings (pass), go generate ./internal/usage (no diff), targeted breaks of the source, a sandbox gateway with a fake upstream, and the focused GUI set in Chromium and WebKit (71/73; the 2 failures are gui-ja and gui-de).
Wrap descriptions for Codex on Magpie when no model is selected, and cover the real schema, unusable replies, translations, and gateway-mode documentation.
yetone
left a comment
There was a problem hiding this comment.
Re-reviewed at ac79156. Thanks, most of the earlier points are addressed, and each fix is caught by its test:
- without the fallback,
TestCodexDescriptionFallbackOnMagpiefails - with
checknever flagging,TestNoDescriptionfails - without the
purpose.goline,TestDescriptionPurposeLabelfails
ja and de pass, and the fixtures use Codex's real schema.
Still needed:
- zh-TW. main now has a
"zh-TW"block ini18n.js, and after merginggui-zh-twfails with 4 strings missing: "Codex thread descriptions", its two subtitles, and "Description". Please add their Traditional Chinese. - The
renderCodexTitlescomment. It is now aboverenderCodexTitles, but the old copy is still aboverenderCodexDescriptionsand describes the titles picker. Please replace it with a comment for the description picker.
Nits:
- The description fallback is tested only on
/v1/responses(ours=true). A case on/backend-api/codex/responseswith aprovider/modelwould cover the other call site. descriptionShape'sMaxLengthand its comment ("Its max length is all magpie needs") come from the earlier made-up schema. Codex's real schema has no max length, so drop it, or say it is only a guard.- A real Codex
thread_descriptionrun is still unchecked in the test plan.
Ran at ac79156, merged onto e4882f9:
go vet -tags noguion linux, windows and darwin for gateway, gui, usage and settings: cleango testfor those four packages: okgo generate ./internal/usage: no diff- GUI in Chromium and WebKit: codex-titles, gateway-mode, purpose-filter, routing-purpose-state, settings-sections, settings-groups, settings-shortcut, click-scroll and codex-memories-settings (82/82); gui-ja, gui-de and i18n-keys pass; gui-zh-tw fails (point 1)
…ss the remaining review
|
Updated the branch onto current main and addressed the remaining review points:
Verification on the updated branch:
Real Codex sidebar description acceptance remains unchecked. The production gateway was not replaced. Full repository tests/builds and the full GUI suite were not run here; the focused results above do not establish those suites passed. October 3–9 local logs also show 66 final response-protection failures, all |
Summary
codexDescriptions, sothread_descriptioncan use a selected Magpie model or routing group while the empty default preserves Codex's original requestcodexTitlesthread_descriptionas its own Description purpose and keep the setting across unrelated Settings savesThis is the first concrete slice of #742. It does not add the general per-purpose routing proposed there, and it intentionally has no Off mode until Codex's handling of an empty description is verified.
Test plan
go test -tags nogui ./internal/gateway -run 'TestCodexTitlesSetting|TestCodexDescriptionsSetting|TestDescriptionJSON|TestTitleJSON'go test -tags nogui ./internal/usage -run TestPurposeFiltergo test -tags nogui ./internal/gui -run 'TestSettingsSaveKeepsWhatItDoesNotSend|TestCodexDescriptionsSetting|TestCodexTitlesSetting'🎬 界面预览
CI 用这个 PR 的代码构建并真实运行 magpie(沙盒环境,配置了真实的 DeepSeek key),按改动自动操作、截图和录屏 ·
6c5b2a4· 运行记录改动(按代码):网关开始独立处理 Codex 的会话描述请求(thread_description):设置 › 常规 里「Codex 会话标题」下方新增一行「Codex 会话描述」,可从 Codex 自带的 ChatGPT 模型切换到 magpie 的任意模型或路由组;用量与路由中该用途显示为「描述」。
Note
沙盒里看不到:用量/路由页把 thread_description 记为「描述」这一处,以及描述请求真正改道后模型回答被包成 {"description": …} 的效果,都要有真实的 thread_description 请求才会出现;这类请求由 Codex 自己发出,沙盒现有记录里没有,因此只能看到设置页新增的这一行,看不到用量里的「描述」标签与实际改道结果。
设置里的 Codex 会话描述行
「Codex 会话标题」下方新增的「Codex 会话描述」一行
展开的选择列表,可以看看都有哪些项
选完之后这一行,以及它上方「Codex 会话标题」那一行