Skip to content

feat(web-search): opt-in live streaming of routed-model output + Dashboard toggle - #1500

Open
RobinBially wants to merge 11 commits into
lidge-jun:devfrom
RobinBially:feat/web-search-sidecar-live-streaming
Open

feat(web-search): opt-in live streaming of routed-model output + Dashboard toggle#1500
RobinBially wants to merge 11 commits into
lidge-jun:devfrom
RobinBially:feat/web-search-sidecar-live-streaming

Conversation

@RobinBially

@RobinBially RobinBially commented Aug 11, 2026

Copy link
Copy Markdown

feat(web-search): opt-in live streaming of routed-model output (streamRoutedModelOutput) + Dashboard toggle

Problem

With the web-search sidecar engaged (Codex sends a hosted web_search tool on every real turn, and
a usable ChatGPT credential exists), runWithWebSearch fully buffers every semantic adapter event
of an iteration before scanning for web_search calls. The client sees nothing until the turn
finishes — on reasoning-heavy turns 6–50 s of silence, then the whole answer as one burst. This is
the "chat doesn't stream through opencodex" experience for every routed model.

Reproduced end-to-end: a byte-identical replay of a captured real codex exec request buffers on a
sidecar-enabled instance and streams on an identical instance without ChatGPT auth; a field bisect
shows removing only the web_search tool from the request restores streaming (448 deltas, first at
3.5 s), while removing the other hosted tools does not.

Fix

New config option webSearchSidecar.streamRoutedModelOutput (default false — behavior unchanged
without opt-in). When enabled, each iteration's leading output streams live and the live window
closes permanently at the first buffer-only event:

  • Allowlist of live-streamable types in loop.ts: text_delta, thinking_delta,
    reasoning_raw_delta, thinking_signature, redacted_thinking, kiro_redacted_reasoning
    exactly what the sidecar-less path would deliver identically. Anything else (tool calls above
    all) closes the window, so the web_search interception decision stays atomic and live events
    are exactly the first N passthrough entries.
  • The window is per iteration: after a search, the next iteration (including the final answer)
    streams live again.
  • The terminal replay skips the already-streamed head by count — nothing is delivered twice.
  • Live events are still buffered for the scanner, so extractIterationThinking and the
    forced-answer output check ([Bug]: Hosted web-search forced-answer pass accepts a malformed tool call and completes without an assistant message #1001) are unchanged.
  • The existing Kiro commentary bypass is untouched.

Documented tradeoff (docs-site/guides/sidecars.md): text the model emits before deciding to
search — which buffered mode silently drops — becomes visible and may partially repeat in the
post-search answer. Reasoning-first models avoid the text-repetition case (their leading reasoning
deltas become client-visible — that visibility is the point of the option).

Discoverability: Dashboard toggle

A config-file-only flag would be hard to find for anyone hitting "why doesn't chat stream?", so the
option is also surfaced in the UI:

  • GET/PUT /api/sidecar-settings now carry webSearch.streamRoutedModelOutput (boolean;
    non-boolean values are rejected with 400; false removes the key so config files stay minimal).
  • The web-search sidecar card on the Dashboard overview page gains a Stream answers live
    switch (strings in all eight locales).

Dashboard overview: web-search sidecar card with the new "Stream answers live" toggle

Tests

  • bun test tests/web-search.test.ts — 55 pass (4 new). The live-delivery tests are gated: the
    fake adapter withholds its next event until the test has observed the leading delta on the wire,
    and the 5 s deadline rejects instead of releasing the gate, so a buffered implementation
    fails rather than passing via the terminal replay. Covered: live first delta mid-turn; default
    (flag unset) still buffers; window closes at tool_call_start with exactly-once, in-order replay
    (prefix delta → function_call → suffix); search loop delivers pre-search text and final answer
    exactly once.
  • bun test tests/sidecar-settings-web-search-stream.test.ts — 4 pass (new): GET reflection,
    PUT true/false round-trip with key removal, 400 on non-boolean, PUT without the flag leaves an
    enabled value untouched.
  • bun test tests/web-search-*.test.ts — 78 pass. GUI: cd gui && bun test tests — 764 pass;
    eslint . clean. bun x tsc --noEmit clean in root and gui (TypeScript 7.0.2).
  • Full bun run test suite (after merging current dev): 11310 pass / 0 fail / 8 skip,
    699 files, 509 s.
  • Live E2E on a real instance (ChatGPT credential present, sidecar engaged, routed model
    opencode-go/deepseek-v4-flash, identical text-forcing request):
    • toggle off: 18.3 s silence, then 2829 text deltas within 0.02 s (one terminal burst);
    • toggle on: first text delta at 4.0 s, 2538 deltas trickling over 9.9 s (live), applied
      without restart via PUT /api/sidecar-settings.

Devlog: devlog/_plan/260812_websearch_sidecar_live_streaming/000_findings_and_design.md carries
the full investigation (bit-identical-instance comparison, capture, bisect).

🤖 Generated with Claude Code

Review readiness checklist

This PR stays in draft until every box below is ticked. Tick all four boxes once the requirements are met:

  • All CI tests are green on my local testing.

  • I pushed my PR to the latest dev commit.

  • I resolved all correct Codex and CodeRabbit findings.

  • My PR is ready for review.

Summary by CodeRabbit

  • New Features

    • Added opt-in live streaming of routed model text and reasoning during web searches.
    • Added Dashboard and API controls for enabling or disabling streaming.
    • Streaming stops at tool calls and resumes with buffered content without duplicate output.
    • Added localized setting labels and guidance across supported languages.
  • Documentation

    • Updated sidecar documentation with configuration examples and behavior details, including possible repeated pre-search text.
  • Tests

    • Added coverage for streaming, buffering defaults, tool-call boundaries, ordering, persistence, and validation.

With the sidecar engaged, runWithWebSearch buffers every semantic adapter
event of an iteration before scanning for web_search calls, so clients see
nothing until the turn ends — 6-50s of silence, then the whole answer as
one burst, on every routed-model turn (Codex sends the hosted web_search
tool on every real turn).

New config option webSearchSidecar.streamRoutedModelOutput (default false,
behavior unchanged without opt-in): stream each iteration's leading
text/thinking deltas live; the live window closes permanently at the first
buffer-only event (tool calls above all), so web_search interception stays
atomic, live events are exactly the first N passthrough entries, and the
terminal replay skips them by count — nothing is delivered twice. Scanner
semantics (thinking extraction, forced-answer output check) are unchanged.

Verified: bun run test — 11197 pass / 0 fail (691 files); 4 new tests
including a gated adapter proving live delivery mid-turn; tsc clean.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

Deterministic PR hygiene checks passed.

@github-actions github-actions Bot added the enhancement New feature or request label Aug 11, 2026
@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Important

Review skipped

No new commits to review since the last review.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 4e0bf8c0-8598-4023-8156-d9b55c7d64c1

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: bd281fbd-abde-48c7-8b0a-fb1b3cf5fab7

📥 Commits

Reviewing files that changed from the base of the PR and between f4ed061 and 1a08c88.

📒 Files selected for processing (1)
  • tests/sidecar-settings-web-search-stream.test.ts

📝 Walkthrough

Walkthrough

The PR adds an opt-in streamRoutedModelOutput setting for web-search sidecars. Leading text and thinking events stream before the first tool call. Buffered scanning remains active, and replay avoids duplicate events.

Changes

Web-search sidecar live streaming

Layer / File(s) Summary
Streaming contract and plan wiring
src/types.ts, src/web-search/index.ts, src/server/responses/core.ts
Adds the optional setting, resolves it only when explicitly true, and passes it into sidecar execution.
Settings API and dashboard control
src/server/management/config-routes.ts, gui/src/pages/dashboard-shared.ts, gui/src/pages/dashboard-overview-sections.tsx, gui/src/i18n/*
Adds GET and PUT support, validates boolean values, persists enabled state, and exposes a dashboard toggle with translations.
Live window and replay behavior
src/web-search/loop.ts
Streams leading allowlisted text and thinking events while retaining them for web-search scanning. The live window closes at the first non-streamable event, and terminal replay omits events already sent.
Behavior validation and documentation
tests/web-search.test.ts, tests/sidecar-settings-web-search-stream.test.ts, tests/vision-anthropic.test.ts, docs-site/src/content/docs/guides/sidecars.md, devlog/_plan/260812_websearch_sidecar_live_streaming/000_findings_and_design.md
Tests cover live delivery, default buffering, tool-call boundaries, settings persistence, replay ordering, and search iterations. Documentation records the configuration and streaming behavior.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Dashboard
  participant SettingsAPI
  participant WebSearchPlan
  participant WebSearchLoop
  participant SSEClient
  Dashboard->>SettingsAPI: Save streamRoutedModelOutput
  SettingsAPI->>WebSearchPlan: Persisted streaming setting
  WebSearchPlan->>WebSearchLoop: Resolved streaming flag
  WebSearchLoop->>SSEClient: Leading allowlisted text/thinking events
  WebSearchLoop->>WebSearchLoop: Buffer events for web-search scanning
  WebSearchLoop->>SSEClient: Deduplicated replay after tool-call boundary
Loading

Possibly related PRs

  • lidge-jun/opencodex#1155: Both PRs modify src/web-search/loop.ts and src/server/responses/core.ts to control routed-model streaming during web-search iterations.

Suggested reviewers: ingwannu, lidge-jun, wibias

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the opt-in live streaming feature and its Dashboard toggle, which are the main changes.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

✅ READY

  • all PR quality gates passed; the review readiness checklist is complete.

Review readiness checklist

  • ✅ All CI tests are green on my local testing.
  • ✅ I pushed my PR to the latest dev commit.
  • ✅ I resolved all correct Codex and CodeRabbit findings.
  • ✅ My PR is ready for review.

4/4 boxes ticked.

This pull request is already Ready for Review.
The review-ready label marks this PR as ready; review automation runs independently. If no CodeRabbit review appears, comment @coderabbitai review to request one.
Maintainers: @lidge-jun @Ingwannu @Wibias

@github-actions
github-actions Bot marked this pull request as draft August 11, 2026 23:02

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@devlog/_plan/260812_websearch_sidecar_live_streaming/000_findings_and_design.md`:
- Around line 42-44: Update the final sentence in the documented accepted
tradeoff to qualify the reasoning-first model claim: state that these models may
avoid pre-search text repetition, while acknowledging that leading
thinking_delta and reasoning events still become client-visible when the option
is enabled.

In `@docs-site/src/content/docs/guides/sidecars.md`:
- Around line 37-43: Update the streamRoutedModelOutput documentation near its
description to explicitly cover Kiro behavior: sidecar commentary may stream
before the terminal event, while only search-decision events remain buffered.
Preserve the existing explanation of the live window, atomic web_search
interception, and terminal replay.

In `@tests/web-search.test.ts`:
- Around line 2191-2198: Update tests/web-search.test.ts lines 2191-2198 to gate
the adapter after “prefix ”, use frameReader.readUntil to confirm that delta
reaches the client before releasing the tool call, and assert the function-call
frame precedes the replayed “suffix”. Update lines 2233-2237 to gate the first
pass after “Let me check. ”, require client receipt before allowing web_search,
and assert the post-search answer is emitted exactly once.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 52d2cbcb-0b07-40b2-a9a6-868a3ab47950

📥 Commits

Reviewing files that changed from the base of the PR and between e8db4e0 and 3393011.

📒 Files selected for processing (7)
  • devlog/_plan/260812_websearch_sidecar_live_streaming/000_findings_and_design.md
  • docs-site/src/content/docs/guides/sidecars.md
  • src/server/responses/core.ts
  • src/types.ts
  • src/web-search/index.ts
  • src/web-search/loop.ts
  • tests/web-search.test.ts

Comment thread devlog/_plan/260812_websearch_sidecar_live_streaming/000_findings_and_design.md Outdated
Comment thread docs-site/src/content/docs/guides/sidecars.md Outdated
Comment thread tests/web-search.test.ts Outdated
…ient receipt

Address review: both tests previously asserted only final frames, which a
fully buffered implementation also produces. They now withhold the tool
call until the test has observed the leading delta on the wire (buffered
delivery deadlocks the gate), and the tool-boundary test additionally
asserts wire order: prefix delta -> function_call item -> suffix delta.

Docs: note that Kiro commentary streaming is independent of the new option;
devlog: qualify the reasoning-first-model claim (their leading reasoning
becomes visible too — that visibility is the point).

Verified: bun run test tests/web-search.test.ts — 55 pass / 0 fail; tsc clean.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@RobinBially

Copy link
Copy Markdown
Author

Addressed all three review findings in 2e9e514:

  • tests/web-search.test.ts (major): Both the tool-boundary and the search-loop test now gate the adapter on live client receipt — the adapter withholds its tool call until the test has observed the leading delta on the wire, so a fully buffered implementation deadlocks the gate instead of passing on identical final frames. The tool-boundary test additionally asserts wire order (prefix delta → function_call item → suffix delta).
  • docs sidecars.md (minor): Added the Kiro distinction — commentary-phase text already streams ahead of the terminal event in buffered mode and is independent of the new option; only search-decision events remain buffered.
  • devlog (minor): Qualified the reasoning-first-model claim — they avoid the text-repetition case, but their leading reasoning deltas become client-visible too.

Re-verified: bun run test tests/web-search.test.ts — 55 pass / 0 fail; bun x tsc --noEmit clean.

@RobinBially
RobinBially marked this pull request as ready for review August 11, 2026 23:36
@github-actions
github-actions Bot marked this pull request as draft August 11, 2026 23:36

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@tests/web-search.test.ts`:
- Around line 2165-2167: Update both live-delivery tests around releaseToolCall
and releaseWebSearch so their 5-second timeout rejects or otherwise fails the
readUntil wait instead of invoking the release gate. Ensure each release
function is called only after readUntil observes the prefix, preventing buffered
terminal replay from satisfying the test.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 87c79557-80a7-4bdf-a411-f8600dc7c482

📥 Commits

Reviewing files that changed from the base of the PR and between 3393011 and 2e9e514.

📒 Files selected for processing (3)
  • devlog/_plan/260812_websearch_sidecar_live_streaming/000_findings_and_design.md
  • docs-site/src/content/docs/guides/sidecars.md
  • tests/web-search.test.ts

Comment thread tests/web-search.test.ts
@github-actions
github-actions Bot marked this pull request as ready for review August 11, 2026 23:42
@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Tip

For best results, initiate chat on the files or code changes.

@github-actions[bot] Pull request #1500 is marked ready for review. The readiness checklist is complete at 2e9e514d679f6c3732a4e6c51aca91cb95990c03.


🧠 Learnings used
Learnt from: harryzhou2000
Repo: lidge-jun/opencodex PR: 0
File: :0-0
Timestamp: 2026-08-03T12:43:51.638Z
Learning: For PR `#865`, residual full-suite shard-2 failures in server-auth WebSocket upgrade/auth statuses, active-registry WebSocket test 129, Claude Messages 502-versus-503 handling, and OpenAI compact transport reproduced on both upstream/dev commit 6a7351b4 and pre-fix merge head 528b4550 under a loaded machine. Treat these failures as pre-existing environment flakes unless a later change provides contrary evidence.

Learnt from: baileyh8
Repo: lidge-jun/opencodex PR: 1361
File: src/server/responses-custom-tool-repair.ts:117-135
Timestamp: 2026-08-10T09:36:43.941Z
Learning: In `src/server/responses-custom-tool-repair.ts`, pending SSE argument blocks preserve their original `item_id` when replayed, so an output-index collision alone does not convert one item's delta into another item's custom-tool input. In `takePendingArguments`, a pending block with an `itemId` must match only that ID. Use `outputIndex` only as a fallback when the pending block has no `itemId`, to avoid incorrect retained-budget release and recharge churn.

Learnt from: Wibias
Repo: lidge-jun/opencodex PR: 771
File: tests/windows-tray.test.ts:70-75
Timestamp: 2026-07-31T01:24:14.745Z
Learning: For the Windows tray launcher tests in `tests/windows-tray.test.ts`, maintainers consider asserting the exact persisted UTF-16LE launcher bytes a non-blocking test-hardening improvement, not a product defect. The current build-and-BOM coverage is acceptable for the PR; a follow-up is welcome.

Learnt from: Eleven-is-cool
Repo: lidge-jun/opencodex PR: 616
File: src/adapters/openai-responses.ts:524-609
Timestamp: 2026-07-29T03:40:00.160Z
Learning: In `src/adapters/openai-responses.ts`, the top-level `tools` plus nested `input[].tools` (`additional_tools`) traversals in `preferConfiguredHostedTools` and `normalizeImageGenClientTools` intentionally retain separate implementations: the former strips configured client image-generation declarations while preserving hosted-tool selection, whereas the latter normalizes aliases and deduplicates declarations with different change-detection behavior. Do not recommend a shared traversal abstraction unless additional rewrite passes make the common behavior substantial.

Learnt from: Wibias
Repo: lidge-jun/opencodex PR: 986
File: .github/workflows/enforce-pr-target.yml:631-636
Timestamp: 2026-08-04T06:41:30.089Z
Learning: For the PR readiness gate in `.github/workflows/enforce-pr-target.yml`, the required scope is to bind contributor checklist completion and maintainer notification to the exact PR head SHA, then reset them after a new head commit. Maintainer approval staleness is separate from this gate and should be enforced by GitHub branch protection, such as `dismiss-stale-reviews` or `require_last_push_approval`, when configured for `dev`.

You are interacting with an AI system.

@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

@github-actions Review readiness is confirmed. I will review pull request #1500.

⚠️ Action not completed

Already reviewed.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@github-actions
github-actions Bot marked this pull request as draft August 11, 2026 23:43
…ad of releasing the gate

The previous 5s guard called the adapter's release function on timeout, so a
fully buffered implementation could still pass: the timer opens the gate, the
terminal replay delivers the leading delta, and readUntil observes the replayed
copy. The deadline now rejects the readUntil wait; the gate opens only after
the client has genuinely observed the live delta.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions
github-actions Bot marked this pull request as ready for review August 11, 2026 23:47
@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

@github-actions[bot] Pull request #1500 is ready for review. I will review the current head.

⚠️ Action not completed

Already reviewed.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@github-actions
github-actions Bot marked this pull request as draft August 11, 2026 23:57
RobinBially and others added 2 commits August 12, 2026 02:02
…oggle on the overview page

GET/PUT /api/sidecar-settings now carry webSearch.streamRoutedModelOutput
(boolean; false is the default and removes the key so config files stay
minimal), and the web-search sidecar card on the Dashboard overview gains a
"Stream answers live" switch so the option is discoverable without editing
config.json. Strings added to all eight locales.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…notes

Swept in by a bulk add; the follow-up devlog in
260812_websearch_sidecar_live_streaming stands on its own.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@RobinBially RobinBially changed the title feat(web-search): opt-in live streaming of routed-model output (streamRoutedModelOutput) feat(web-search): opt-in live streaming of routed-model output + Dashboard toggle Aug 12, 2026
RobinBially added a commit to RobinBially/opencodex that referenced this pull request Aug 12, 2026
RobinBially added a commit to RobinBially/opencodex that referenced this pull request Aug 12, 2026
@github-actions
github-actions Bot marked this pull request as ready for review August 12, 2026 10:16
@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

@github-actions[bot] The readiness checklist is complete. I will review pull request #1500 at d16b9c4dec3ee1336488cf863429f34011448385.

⚠️ Action not completed

Already reviewed.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Tip

For best results, initiate chat on the files or code changes.

@github-actions[bot] Readiness is confirmed at d16b9c4dec3ee1336488cf863429f34011448385. The review request for this head is already active.


🧠 Learnings used
Learnt from: harryzhou2000
Repo: lidge-jun/opencodex PR: 0
File: :0-0
Timestamp: 2026-08-03T12:43:51.638Z
Learning: For PR `#865`, residual full-suite shard-2 failures in server-auth WebSocket upgrade/auth statuses, active-registry WebSocket test 129, Claude Messages 502-versus-503 handling, and OpenAI compact transport reproduced on both upstream/dev commit 6a7351b4 and pre-fix merge head 528b4550 under a loaded machine. Treat these failures as pre-existing environment flakes unless a later change provides contrary evidence.

Learnt from: baileyh8
Repo: lidge-jun/opencodex PR: 1361
File: src/server/responses-custom-tool-repair.ts:117-135
Timestamp: 2026-08-10T09:36:48.510Z
Learning: In `src/server/responses-custom-tool-repair.ts`, pending SSE argument blocks preserve their original `item_id` when replayed, so an output-index collision alone does not convert one item's delta into another item's custom-tool input. In `takePendingArguments`, a pending block with an `itemId` must match only that ID. Use `outputIndex` only as a fallback when the pending block has no `itemId`, to avoid incorrect retained-budget release and recharge churn.

Learnt from: Eleven-is-cool
Repo: lidge-jun/opencodex PR: 616
File: src/adapters/openai-responses.ts:524-609
Timestamp: 2026-07-29T03:40:00.160Z
Learning: In `src/adapters/openai-responses.ts`, the top-level `tools` plus nested `input[].tools` (`additional_tools`) traversals in `preferConfiguredHostedTools` and `normalizeImageGenClientTools` intentionally retain separate implementations: the former strips configured client image-generation declarations while preserving hosted-tool selection, whereas the latter normalizes aliases and deduplicates declarations with different change-detection behavior. Do not recommend a shared traversal abstraction unless additional rewrite passes make the common behavior substantial.

Learnt from: Eleven-is-cool
Repo: lidge-jun/opencodex PR: 616
File: src/adapters/openai-responses.ts:574-621
Timestamp: 2026-07-29T07:51:11.356Z
Learning: For Responses Lite requests in `src/adapters/openai-responses.ts`, top-level `tools` and `input` items of type `additional_tools` form one request-wide tool set, and `tool_choice` is request-scoped. In `preferConfiguredHostedTools`, a surviving hosted `image_generation` declaration in any such group satisfies a rewritten image-generation selector; do not restore duplicate hosted declarations into every stripped group.

Learnt from: Wibias
Repo: lidge-jun/opencodex PR: 771
File: tests/windows-tray.test.ts:70-75
Timestamp: 2026-07-31T01:24:14.745Z
Learning: For the Windows tray launcher tests in `tests/windows-tray.test.ts`, maintainers consider asserting the exact persisted UTF-16LE launcher bytes a non-blocking test-hardening improvement, not a product defect. The current build-and-BOM coverage is acceptable for the PR; a follow-up is welcome.

Learnt from: Wibias
Repo: lidge-jun/opencodex PR: 957
File: .github/workflows/release.yml:430-445
Timestamp: 2026-08-03T19:34:43.041Z
Learning: In `lidge-jun/opencodex/.github/workflows/release.yml`, `workflow_dispatch` intentionally permits both `main` and `preview`. The `preview` branch is the preview release train for preview prereleases, so applying a guard that unconditionally rejects non-default-branch dispatches would break the intended release process. `scripts/release.ts` supplies `expected-sha`; the `expected-sha` input remains optional for deliberate manual maintainer dispatches. Review changes to this workflow separately from pre-existing manual-dispatch hardening unless the change modifies its trust controls.

Learnt from: Yuxin-Qiao
Repo: lidge-jun/opencodex PR: 1205
File: src/adapters/openai-chat.ts:427-439
Timestamp: 2026-08-07T15:27:17.924Z
Learning: In `src/responses/reasoning-replay-cache.ts`, `rememberReasoningForCall` rejects empty reasoning text when `text.length === 0`. Therefore, `peekReasoningForCall` cannot return an empty string through the current cache write path. In `src/adapters/openai-chat.ts`, orphan tool-call repair still uses a falsy-value fallback to a reasoning placeholder as defense-in-depth.

Learnt from: Wibias
Repo: lidge-jun/opencodex PR: 0
File: :0-0
Timestamp: 2026-08-04T08:02:51.614Z
Learning: In PR `#949`, `src/server/index.ts` must derive both bare native OpenAI discovery rows and account-qualified discovery rows from `NATIVE_OPENAI_MODELS` when `accountSelectors.length > 0`, excluding disabled native slugs. Exact qualified IDs in `config.disabledModels`, such as `team/gpt-5.5`, must also omit that specific qualified discovery row.

Learnt from: baileyh8
Repo: lidge-jun/opencodex PR: 1361
File: src/adapters/openai-responses.ts:1249-1251
Timestamp: 2026-08-10T09:09:45.766Z
Learning: In the TypeScript resolver `src/server/adapter-resolve.ts`, `resolveWireProtocolOverride()` changes only the provider `adapter` through a shallow copy and preserves `authMode`, credentials, and `baseUrl`. Reviews must not treat `route.provider.authMode` and the resolved adapter provider's `authMode` as divergent through this resolver.

Learnt from: coseung2
Repo: lidge-jun/opencodex PR: 439
File: src/adapters/kiro.ts:1145-1162
Timestamp: 2026-07-25T07:08:40.193Z
Learning: In `src/adapters/kiro.ts`, Kiro bounded completion retries rebuild their payload from the request snapshot and intentionally omit private reasoning from the first attempt, retaining only replayable assistant text or an empty structural assistant boundary. Consequently, `mergeKiroUsage` must not carry first-attempt context growth into a reasoning-only retry; `contextTotalTokens` represents the maximum of real per-request checkpoints, with a combined-output floor, rather than a synthetic union of first-request reasoning context and fallback output.

Learnt from: Wibias
Repo: lidge-jun/opencodex PR: 986
File: .github/workflows/enforce-pr-target.yml:631-636
Timestamp: 2026-08-04T06:41:30.089Z
Learning: For the PR readiness gate in `.github/workflows/enforce-pr-target.yml`, the required scope is to bind contributor checklist completion and maintainer notification to the exact PR head SHA, then reset them after a new head commit. Maintainer approval staleness is separate from this gate and should be enforced by GitHub branch protection, such as `dismiss-stale-reviews` or `require_last_push_approval`, when configured for `dev`.

Learnt from: baileyh8
Repo: lidge-jun/opencodex PR: 1361
File: src/adapters/openai-responses.ts:1249-1251
Timestamp: 2026-08-10T09:09:45.766Z
Learning: For DeepSeek Responses streaming in `src/server/responses/core.ts`, calls to `providerModelResponsesTerminalRepair()` must use the provider-wide `route.provider`, not the per-model `adapterProvider`. The DeepSeek registry transport is `openai-chat`, while `deepseek-v4-flash` resolves to `openai-responses`; using the resolved adapter provider would fail `providerMatchesRegistryTransport()` and disable terminal repair.

You are interacting with an AI system.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@gui/src/i18n/en.ts`:
- Around line 284-285: Update the dash.webSearchStreamHint translation to
explicitly state that only leading text and reasoning stream until the first
buffer-only event, while remaining output is buffered for scanning and terminal
replay; keep the wording consistent with the actual runtime behavior.

In `@gui/src/i18n/ru.ts`:
- Around line 281-282: Update the dash.webSearchStreamHint translation to
clarify that only the initial allowlisted text and reasoning are streamed live,
stopping at the first non-streamable event, while subsequent output is buffered
for scanning and replay; leave dash.webSearchStream unchanged.

In `@tests/sidecar-settings-web-search-stream.test.ts`:
- Around line 70-83: Update the test around putSidecarSettings to call
loadConfig() after each PUT, then assert the reloaded configuration preserves
streamRoutedModelOutput as true after enabling and omits the key after disabling
it. Retain the existing response status and echoed-value assertions.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 4c888ac5-ab19-4fcd-9d05-183fe841f7b0

📥 Commits

Reviewing files that changed from the base of the PR and between 09bd6a6 and d16b9c4.

📒 Files selected for processing (19)
  • devlog/_plan/260812_websearch_sidecar_live_streaming/000_findings_and_design.md
  • docs-site/src/content/docs/guides/sidecars.md
  • gui/src/i18n/de.ts
  • gui/src/i18n/en.ts
  • gui/src/i18n/ja.ts
  • gui/src/i18n/ko.ts
  • gui/src/i18n/ru.ts
  • gui/src/i18n/tr.ts
  • gui/src/i18n/zh-TW.ts
  • gui/src/i18n/zh.ts
  • gui/src/pages/dashboard-overview-sections.tsx
  • gui/src/pages/dashboard-shared.ts
  • src/server/management/config-routes.ts
  • src/server/responses/core.ts
  • src/types.ts
  • src/web-search/loop.ts
  • tests/sidecar-settings-web-search-stream.test.ts
  • tests/vision-anthropic.test.ts
  • tests/web-search.test.ts

Comment thread gui/src/i18n/en.ts Outdated
Comment thread gui/src/i18n/ru.ts Outdated
Comment thread tests/sidecar-settings-web-search-stream.test.ts
@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Tip

For best results, initiate chat on the files or code changes.

@github-actions[bot] The readiness checklist is complete for head d16b9c4dec3ee1336488cf863429f34011448385. The review request is already active.


🧠 Learnings used
Learnt from: Wibias
Repo: lidge-jun/opencodex PR: 986
File: .github/workflows/enforce-pr-target.yml:631-636
Timestamp: 2026-08-04T06:41:30.089Z
Learning: For the PR readiness gate in `.github/workflows/enforce-pr-target.yml`, the required scope is to bind contributor checklist completion and maintainer notification to the exact PR head SHA, then reset them after a new head commit. Maintainer approval staleness is separate from this gate and should be enforced by GitHub branch protection, such as `dismiss-stale-reviews` or `require_last_push_approval`, when configured for `dev`.

You are interacting with an AI system.

…rt durable persistence

CodeRabbit round 4: the dashboard hint implied the whole turn streams — reworded
in all eight locales to say leading text/reasoning streams until the model
decides on a tool call, with the rest buffered for search interception. The
sidecar-settings test now reloads the config from disk after each PUT and
asserts the flag survives (true persists, false removes the key); the fixture
gained a schema-valid provider because loadConfig() discards invalid files
wholesale, which would have voided the reload assertions.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Tip

For best results, initiate chat on the files or code changes.

@github-actions The readiness checklist and deterministic hygiene checks are complete at d16b9c4dec3ee1336488cf863429f34011448385. This head was already reviewed.

You are interacting with an AI system.

@github-actions
github-actions Bot marked this pull request as draft August 12, 2026 10:35
@github-actions
github-actions Bot marked this pull request as ready for review August 12, 2026 10:36
@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

@github-actions[bot] The readiness checklist is complete at f4ed061755319373e66662c9f410d794cc4bcc04. I will review the current pull request head.


🧠 Learnings used
Learnt from: coseung2
Repo: lidge-jun/opencodex PR: 439
File: src/adapters/kiro.ts:1145-1162
Timestamp: 2026-07-25T07:08:40.193Z
Learning: In `src/adapters/kiro.ts`, Kiro bounded completion retries rebuild their payload from the request snapshot and intentionally omit private reasoning from the first attempt, retaining only replayable assistant text or an empty structural assistant boundary. Consequently, `mergeKiroUsage` must not carry first-attempt context growth into a reasoning-only retry; `contextTotalTokens` represents the maximum of real per-request checkpoints, with a combined-output floor, rather than a synthetic union of first-request reasoning context and fallback output.
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Tip

For best results, initiate chat on the files or code changes.

@github-actions The readiness checklist is complete at f4ed061755319373e66662c9f410d794cc4bcc04. The pull request is ready for review, and review automation is already active.


🧠 Learnings used
Learnt from: Wibias
Repo: lidge-jun/opencodex PR: 986
File: .github/workflows/enforce-pr-target.yml:631-636
Timestamp: 2026-08-04T06:41:30.089Z
Learning: For the PR readiness gate in `.github/workflows/enforce-pr-target.yml`, the required scope is to bind contributor checklist completion and maintainer notification to the exact PR head SHA, then reset them after a new head commit. Maintainer approval staleness is separate from this gate and should be enforced by GitHub branch protection, such as `dismiss-stale-reviews` or `require_last_push_approval`, when configured for `dev`.

You are interacting with an AI system.

@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Tip

For best results, initiate chat on the files or code changes.

@github-actions[bot] Confirmed. Pull request #1500 is ready for review at f4ed061755319373e66662c9f410d794cc4bcc04. The review automation is already active.


🧠 Learnings used
Learnt from: Wibias
Repo: lidge-jun/opencodex PR: 986
File: .github/workflows/enforce-pr-target.yml:631-636
Timestamp: 2026-08-04T06:41:30.089Z
Learning: For the PR readiness gate in `.github/workflows/enforce-pr-target.yml`, the required scope is to bind contributor checklist completion and maintainer notification to the exact PR head SHA, then reset them after a new head commit. Maintainer approval staleness is separate from this gate and should be enforced by GitHub branch protection, such as `dismiss-stale-reviews` or `require_last_push_approval`, when configured for `dev`.

You are interacting with an AI system.

@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Tip

For best results, initiate chat on the files or code changes.

@github-actions[bot] The readiness checklist is complete at f4ed061755319373e66662c9f410d794cc4bcc04. Review automation is already active for this pull request.


🧠 Learnings used
Learnt from: Wibias
Repo: lidge-jun/opencodex PR: 986
File: .github/workflows/enforce-pr-target.yml:631-636
Timestamp: 2026-08-04T06:41:30.089Z
Learning: For the PR readiness gate in `.github/workflows/enforce-pr-target.yml`, the required scope is to bind contributor checklist completion and maintainer notification to the exact PR head SHA, then reset them after a new head commit. Maintainer approval staleness is separate from this gate and should be enforced by GitHub branch protection, such as `dismiss-stale-reviews` or `require_last_push_approval`, when configured for `dev`.

You are interacting with an AI system.

@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Tip

For best results, initiate chat on the files or code changes.

@github-actions[bot] Confirmed. The readiness checklist is complete at f4ed061755319373e66662c9f410d794cc4bcc04. Review automation is already active.


🧠 Learnings used
Learnt from: Wibias
Repo: lidge-jun/opencodex PR: 986
File: .github/workflows/enforce-pr-target.yml:631-636
Timestamp: 2026-08-04T06:41:30.089Z
Learning: For the PR readiness gate in `.github/workflows/enforce-pr-target.yml`, the required scope is to bind contributor checklist completion and maintainer notification to the exact PR head SHA, then reset them after a new head commit. Maintainer approval staleness is separate from this gate and should be enforced by GitHub branch protection, such as `dismiss-stale-reviews` or `require_last_push_approval`, when configured for `dev`.

You are interacting with an AI system.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@tests/sidecar-settings-web-search-stream.test.ts`:
- Around line 33-34: Update the comment near the schema-valid provider setup to
accurately describe loadConfig(): it merges defaults with preserved providers
first, then uses backup/defaults only if the merged configuration fails
validation, rather than discarding every invalid file wholesale.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: c2319d3b-984c-42d6-875c-67cc5f46f236

📥 Commits

Reviewing files that changed from the base of the PR and between d16b9c4 and f4ed061.

📒 Files selected for processing (9)
  • gui/src/i18n/de.ts
  • gui/src/i18n/en.ts
  • gui/src/i18n/ja.ts
  • gui/src/i18n/ko.ts
  • gui/src/i18n/ru.ts
  • gui/src/i18n/tr.ts
  • gui/src/i18n/zh-TW.ts
  • gui/src/i18n/zh.ts
  • tests/sidecar-settings-web-search-stream.test.ts

Comment thread tests/sidecar-settings-web-search-stream.test.ts Outdated
@github-actions
github-actions Bot marked this pull request as draft August 12, 2026 10:43
@github-actions
github-actions Bot marked this pull request as ready for review August 12, 2026 11:18
@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

@github-actions[bot] The readiness checklist is complete at 1a08c88fe9110b5b2f9fff065937c196b384c54b. I will review the current pull request head.


🧠 Learnings used
Learnt from: coseung2
Repo: lidge-jun/opencodex PR: 439
File: src/adapters/kiro.ts:1145-1162
Timestamp: 2026-07-25T07:08:40.193Z
Learning: In `src/adapters/kiro.ts`, Kiro bounded completion retries rebuild their payload from the request snapshot and intentionally omit private reasoning from the first attempt, retaining only replayable assistant text or an empty structural assistant boundary. Consequently, `mergeKiroUsage` must not carry first-attempt context growth into a reasoning-only retry; `contextTotalTokens` represents the maximum of real per-request checkpoints, with a combined-output floor, rather than a synthetic union of first-request reasoning context and fallback output.
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Tip

For best results, initiate chat on the files or code changes.

@github-actions[bot] Confirmed. The checklist is complete at 1a08c88fe9110b5b2f9fff065937c196b384c54b. CodeRabbit review automation is already active for this head.


🧠 Learnings used
Learnt from: Wibias
Repo: lidge-jun/opencodex PR: 986
File: .github/workflows/enforce-pr-target.yml:631-636
Timestamp: 2026-08-04T06:41:30.089Z
Learning: For the PR readiness gate in `.github/workflows/enforce-pr-target.yml`, the required scope is to bind contributor checklist completion and maintainer notification to the exact PR head SHA, then reset them after a new head commit. Maintainer approval staleness is separate from this gate and should be enforced by GitHub branch protection, such as `dismiss-stale-reviews` or `require_last_push_approval`, when configured for `dev`.

You are interacting with an AI system.

@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Tip

For best results, initiate chat on the files or code changes.

@github-actions[bot] Confirmed. The readiness checklist is complete at 1a08c88fe9110b5b2f9fff065937c196b384c54b. Review automation is already active for this pull request.


🧠 Learnings used
Learnt from: Wibias
Repo: lidge-jun/opencodex PR: 986
File: .github/workflows/enforce-pr-target.yml:631-636
Timestamp: 2026-08-04T06:41:30.089Z
Learning: For the PR readiness gate in `.github/workflows/enforce-pr-target.yml`, the required scope is to bind contributor checklist completion and maintainer notification to the exact PR head SHA, then reset them after a new head commit. Maintainer approval staleness is separate from this gate and should be enforced by GitHub branch protection, such as `dismiss-stale-reviews` or `require_last_push_approval`, when configured for `dev`.

You are interacting with an AI system.

@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

@github-actions[bot] The readiness checklist is complete. I will review pull request #1500.

⚠️ Action not completed

Already reviewed.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request review-ready

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant