feat: land six repaired cherry-picks (MiniMax, picker order, terminal guard, streamAborted, imageInput, droid docs) - #1744
Conversation
Port the codex-router #139 streamAborted metering marker: when an upstream stream dies after its 200 head was committed, the persisted usage attempt now carries streamAborted: true alongside the synthetic 502 terminal so the turn never meters as a success the client did not receive. - usage/log.ts: optional streamAborted on PersistedUsageAttempt, whitelisted in normalizeUsageAttempt (only the literal true marker survives the round trip; ordinary and legacy rows keep their exact shape). - relay.ts: set the marker on consumeForInspection's mid-stream read-failure path (failed/502) and on trackSseForRequestLog's read-failure path (incomplete/502). Client-cancel (499) semantics are untouched and never carry the marker. - tests: usage-log.test.ts gains persistence/backward-compat coverage; stream-aborted-marker.test.ts drives the relay paths end to end through addFinalRequestLog to the persisted JSONL row.
…er order Large routed catalogs (10-20+ models across several providers) have no supported way to control the Codex model-picker display order beyond the 5-slot subagentModels list: every non-featured routed row is emitted at the same flat priority, so the picker order is undefined and reshuffles on each catalog rebuild (ocx sync / service restart / upgrade). Add an optional, display-only config.modelPickerOrder: string[]. Listed routed <provider>/<model> slugs are shown in array order in the picker; unlisted rows and subagentModels-featured rows keep their positions. When unset, catalog priority is byte-identical to before (the codex-catalog golden oracle is unchanged). Display and spawn_agent candidacy are fully decoupled: modelPickerOrder rewrites only the Codex-visible `priority`, while each moved row records its natural priority in an OpenCodex-private catalog field (opencodex_spawn_priority) that effectiveSubagentRoster uses to pick candidates. The spawn_agent candidate set is therefore provably unchanged by any display reordering — even reversing every row. Codex ignores the unknown field (same as opencodex_catalog_kind), so this is purely a user-facing picker feature. Fixes #1649
Per-combo image/multimodal policy: default auto keeps the target intersection; disabled strips image from catalog modalities and rejects image-bearing requests (including previous_response_id expansions) with HTTP 400 before dispatch. Management API sparsifies only explicit disabled. GUI exposes a capability switch when every target supports images.
Fail closed for incomplete targets in comboImagesSupported; omit default imageInput auto from management GET/PUT responses; reject unresolved previous_response_id when images are disabled; cover disabled draft persistence and normalizedCombo fixture.
Restrict image-disabled detection to materialised Responses input after previous_response_id expansion so tool schemas and metadata cannot false- positive HTTP 400. Treat unresolved continuations by object identity, strip previous_response_id after a successful expand to avoid double replay on child dispatch, and align docs with capability-intersection wording.
…ai-chat providers The no-tool-call terminal continuation guard (#394) is bound to the anthropic adapter only. Self-hosted OpenAI-compatible gateways (GLM/Kimi-family, etc.) routed through openai-chat hit the same premature-completion pattern -- the model announces work but ends the turn without emitting a tool call -- yet never get the bounded re-ask, so they stop mid-work. Extend the guard to openai-chat, gated behind a new per-provider opt-in flag `terminalContinuationGuard`. Default behavior is unchanged: anthropic keeps the guard, and the many registry providers sharing the openai-chat adapter stay off unless a provider explicitly enables it (the suspicious-no-tool-stop heuristic in analyzeTerminalTurn was tuned on Anthropic turns, so opt-in is the conservative default). Fixes #1651
…e path Address CodeRabbit review on #1660: add server-level integration coverage that exercises the openai-chat guard flag through handleResponses/core.ts rather than only passing adapterName to guardTerminalEventStream. - unset/absent terminalContinuationGuard on an openai-chat provider => no continuation (exactly one upstream call). - terminalContinuationGuard: true => one bounded continuation (two upstream calls) and the recovered tool call is forwarded. The existing anthropic combo-attempt and routed-compaction exclusions are unchanged and still covered by the surrounding suite.
|
✅ Deterministic PR hygiene checks passed. |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (83)
📝 WalkthroughWalkthroughThis change adds MiniMax Code and MiniMax CLI support, combo image-input configuration, display-only model ordering, terminal continuation handling, stream-abort metering, self-launch argument construction, GUI controls, documentation, localization, and tests. ChangesRuntime and integration features
GUI and documentation
Estimated code review effort: 5 (Critical) | ~120 minutes Possibly related PRs
Suggested labels: Suggested reviewers: ✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
⏳ DRAFT
What to do
Automatic draft conversion failed (token cannot change draft status). Please convert this pull request to a draft manually. The required |
Summary\n\nLands six repaired cherry-picks from old draft PRs (triage: devlog/_plan/260815_old_draft_triage/). Contributor commits were cherry-picked with authorship preserved, then repaired per review findings; each repair branch was reviewed independently (PASS after one folded blocker):\n\n- #1664 MiniMax Code/CLI integration (+ shared standalone-aware self-launch argv helper, migrating 12 launcher call sites incl. update/job, update/notify, system-restart)\n- #1669 modelPickerOrder (+ fail-soft malformed-config normalization, docs fix)\n- #1660 opt-in terminal guard for openai-chat (+ explicit-false and combo/compaction exclusion tests, docs)\n- #1652 streamAborted usage marker (+ eager/WS path coverage, cancellation race fix)\n- #1165 combo imageInput control (+ tr/zh-TW locale keys, CLI round-trip, anti-double-expansion regression lock)\n- #1644 Factory Droid bridge guide (+ provider-id/contract repairs, EN+KO)\n\n## Verification\n\n- Remote full gates on ssh lidge @ b05c494 (this branch tip): 12259 pass / 11 skip / 0 fail (12270 tests, 781 files); typecheck, privacy:scan, lint:gui all green.\n- Independent repair review: GO-WITH-FIXES -> blocker (2 missed launcher sites) fixed in 2f276eb and re-verified PASS by the same reviewer.\n\n## Checklist\n\n- [x] Targets dev\n- [x] No token/secret logging added\n- [x] Regression tests included for every behavior change
Summary by CodeRabbit