This branch was backfilled against master, which is the default branch in this repo. There is no local main branch.
- Branch point:
0ea08fe(chore: release v0.7.0) - Backfill window: 2026-03-08 through 2026-03-16
- Current head at backfill time:
641fb1e(Fix Bun streaming request timeouts) - Net branch diff vs
master: 29 files changed, 2659 insertions, 33 deletions
Commits:
42214b8feat: port PR #205 — Responses API support and model-level routingb188c93fix: address review issues in Responses API implementatione408560feat: add gpt-5.4 with full level support via Responses API26cbf7fchore: update bun.lock
What changed:
- Added OpenAI Responses API endpoints at
/responsesand/v1/responses. - Added upstream Responses client support in
src/services/copilot/create-responses.ts. - Added translation between chat completions and responses models in
src/routes/chat-completions/responses-translation.ts. - Introduced model-level routing in
src/lib/model-level.ts, including support for level suffixes andgpt-5.4. - Updated model listing and routing so Responses-capable models are exposed and handled correctly.
- Followed up with review fixes and a lockfile refresh.
Commits:
8f115dcfeat: add per-request and session usage logging716170cfeat: include thinking level in request logd77b3aafix: pick up thinking level from reasoning_effort/reasoning.effort fields4cb8bcafix: pick up reasoning.effort level in responses route
What changed:
- Added
src/lib/request-log.tsto centralize request accounting. - Extended
src/lib/state.tswith per-model session usage counters. - Logged token usage for chat completions, Anthropic messages, and Responses API flows.
- Added thinking/reasoning level extraction so usage logs reflect
reasoning_effortandreasoning.effort. - Tightened the Responses route so it records reasoning level consistently.
Commits:
eac1024feat: add opt-in proxy exchange capture5647f81Merge branch 'feat/proxy-exchange-capture' into dev
What changed:
- Added
--captureand--capture-pathto thestartcommand insrc/start.ts. - Added
src/lib/exchange-capture.tsto persist request/response exchanges as JSONL. - Captures include request metadata, upstream IDs, request bodies, response bodies, and token usage across chat, embeddings, messages, and responses routes.
- Added redaction of sensitive values before persistence.
- Added automatic gzip compression for older daily capture files under the default capture directory.
- Added supporting path/state plumbing in
src/lib/paths.ts,src/lib/state.ts, andsrc/lib/upstream-trace.ts. - Documented the feature in
README.mdand the RFC atdocs/rfcs/opt-in-proxy-exchange-capture.md. - Added focused test coverage in
tests/exchange-capture.test.ts.
Commit:
9e2a4e6Harden SSE stream forwarding
What changed:
- Added
src/lib/sse.tsto normalize and forward upstream SSE frames safely. - Fixed handling for metadata-only SSE events so events without
datado not crash or get dropped incorrectly. - Hardened streaming behavior in chat completions and responses handlers.
- Added test coverage in
tests/responses-route-stream.test.tsandtests/sse.test.ts.
Commit:
641fb1eFix Bun streaming request timeouts
What changed:
- Added startup-side idle-timeout parsing and validation in
src/start.ts. - Corrected the configurable Bun idle-timeout range to
0-255. - Added
src/lib/request-timeout.tsto disable Bun request timeouts on streaming requests. - Applied per-request timeout disabling for streaming chat completions, Anthropic messages, and Responses API routes.
- Documented the timeout behavior in
README.md. - Added tests in
tests/request-timeout.test.tsandtests/start-idle-timeout.test.ts.
What changed:
- Added a built-in activity dashboard at
/dashboardwith summary cards, quota snapshots, a full-width live log, and a locally served Chart.js history plot. - Added a SQLite-backed dashboard telemetry store with backfill from persisted JSONL and gzipped capture files plus an SSE live event stream.
- Captured telemetry for chat completions, Anthropic messages, Responses API, and embeddings, including completed requests, upstream errors, proxy errors, and client aborts.
- Changed the history chart to stacked
inputandoutputbars with hover breakdown by model, while keeping the model filter as a scope over the plotted data. - Filled missing hour/day/week/month buckets so zero-traffic intervals still appear in the history series.
- Moved the model filter to the history pane header and compacted the bucket/range controls into the chart toolbar with responsive native selects on narrower screens.
- Replaced the default Hono request logger with a timestamped
consolareporter and a single standardized HTTP access log line that includes method, path, status, and duration. - Added a
--log-levelstartup option and centralized runtime log formatting insrc/lib/logger.ts, while preserving--verboseas a compatibility shortcut. - Hardened dashboard telemetry persistence so SQLite I/O failures degrade the dashboard store to in-memory mode instead of breaking proxied requests.
- Added dashboard coverage in
tests/dashboard.test.ts, including API aggregation, backfill, live stream, and local chart asset checks. - Added startup logging coverage in
tests/start-idle-timeout.test.ts.
Commit:
4d9728dAdd OpenAI OAuth backend and backend-aware dashboard
What changed:
- Added a process-wide backend switch with
--backend copilot|openai-oauth. - Added OpenAI OAuth login, token persistence, refresh, and static model exposure for ChatGPT Plus/Pro Codex-style usage.
- Routed OpenAI-compatible and Anthropic-compatible traffic through the selected backend, with OpenAI OAuth using the Responses backend for compatibility flows.
- Added backend-aware request logging, exchange capture, telemetry persistence, and dashboard filtering.
- Kept a single dashboard UI and added
All backends,Copilot, andOpenAI OAuthfiltering. - Added focused tests for backend-filtered dashboard behavior and backend-specific
501responses.
Working tree progress:
- Fixed direct
/v1/responseshandling somodel(level)variants normalize to the base model plusreasoning.effortbefore upstream dispatch. - Fixed streamed Anthropic-over-Responses accounting so OpenAI OAuth streaming usage is preserved in logs and telemetry.
- Updated
README.mdto document--capture,--capture-path,--log-level,--backend, the built-in dashboard UI, and backend-specific endpoint behavior.
Commit:
0a05b26feat: refine dashboard history and runtime logging
What changed:
- Refined the token history chart to render stacked
inputandoutputbars while using per-bucket model breakdown data for hover details. - Kept the model filter as a scope over the charted data instead of using model-stacked bars directly.
- Filled missing history buckets across the supported bucket sizes so gaps in traffic still render as zero-value bars.
- Moved the model selector into the token history header and kept bucket/range controls compact with responsive native selects on narrower widths.
- Standardized runtime logging around a timestamped
consolareporter and a single HTTP access log line with method, path, status, and duration. - Added
--log-levelstartup support while keeping--verboseas a backwards-compatible shortcut.
Working tree progress:
- Adjusted the quota card status line so negative remaining values render as
N overageinstead of-N left. - Removed the redundant overage text from the quota card footer so it now shows entitlement only.
- Re-checked the inline dashboard client with
new Function(dashboardScript),bunx --bun tsc --noEmit, andbunx --bun eslint --cache src/routes/dashboard/page-script.ts.
Working tree progress:
- Split telemetry
severityfromoutcomesoclient_abortedentries can still render asINFOwhen the disconnect classification says the stream was effectively complete. - Persisted that severity through live telemetry, SQLite storage, and exchange capture backfill so future rebuilds from
.jsonldata keep the same dashboard tone. - Updated the live log line format to include the severity token and switched log-card styling to follow severity instead of treating every
client_abortedexchange as warning-colored. - Added focused coverage for severity preservation and the late-disconnect
infopath, then rechecked with targeted Bun tests,bunx --bun tsc --noEmit, and ESLint on the touched files.
Commits:
3a23ff5feat: classify late stream disconnects8d6480bMerge branch 'fix/late-stream-disconnect' into dev24236betest: cover stream disconnect log levels9c883d4Merge branch 'fix/late-stream-disconnect' into dev
What changed:
- Added
src/lib/stream-client-disconnect.tsto classify downstream aborts by stream phase instead of treating every disconnect as the same warning. - Responses, chat completions, Codex-via-responses, and Anthropic streaming handlers now track whether a terminal event or
[DONE]sentinel was seen or written before the client disconnected, along with forwarded SSE frame count. - Stream disconnect logs now emit as a single machine-friendly key/value line such as
stream_client_disconnect requestId=... route=... disconnectPhase=... completionEstimate=... forwardedChunks=... late=.... - Added an explicit
completionEstimatefield so tail-end disconnects can be distinguished from materially incomplete streams without relying only on the chunk count. - Kept telemetry capture behavior unchanged: these exchanges are still recorded as
client_aborted; only the operator-facing logging was refined. - Added focused coverage in
tests/stream-client-disconnect.test.tsand rechecked the changes with targeted route tests, typecheck, and ESLint. - Followed up with explicit tests that
logStreamClientDisconnect(...)emitswarnfor early disconnects,infofor late disconnects, and preserves the single-line machine-friendly payload.
Working tree progress:
- Fixed the OpenAI OAuth browser flow to use the
localhostcallback URL expected by the upstream auth flow. - Added source-run script shortcuts so
bun run start,bun run dev,bun run auth, andbun run debuginvoke the CLI subcommands directly. - Kept dashboard telemetry persistent by default even when
--captureis off, so usage history survives restart without requiring raw exchange capture. - Added
--ephemeralas an explicit in-memory-only dashboard mode for one-off sessions. - Defined
--ephemeraland--captureas conflicting flags instead of silently picking one behavior. - Updated
README.mdto explain the difference between persistent dashboard telemetry, opt-in raw exchange capture, and ephemeral mode.
Working tree progress:
- Added an explicit
activeBackendfield to the dashboard overview payload so the UI can distinguish the proxy's runtime backend from the dashboard's selected backend scope. - Updated the dashboard top badges to show
Active Backendseparately fromScope, and adjusted related status/log copy to usescopewording where the dashboard is describing filtered history rather than the process runtime backend. - Added coverage that the overview API preserves the active backend even when the dashboard is filtered to a different backend scope.
Working tree progress:
- Added Copilot token expiry tracking and refresh-failure state in
src/lib/state.tsandsrc/lib/token.ts. - Switched Copilot token refresh to record failures without crashing the process, so the existing token can stay in use until the next successful refresh.
- Added a dashboard token-health endpoint and a persistent top banner that appears when the Copilot token has expired and refresh has failed.
Working tree progress:
- Removed the standalone token-health polling loop from the dashboard client so the page no longer hits
/dashboard/api/token-healthon a timer. - Folded token-health into the existing dashboard overview payload and surfaced the warning as a compact badge in the top bar instead of a separate empty banner panel.
- Relaxed the dashboard alert condition so a refresh failure alone is enough to surface the warning.
- Added coverage for the new overview payload shape and updated the dashboard page asset expectations accordingly.
- Added coverage for token-health reporting, the refresh failure path, and the dashboard shell for the banner.
- Updated the Responses SSE route test fixture so the mocked module still provides the route-level normalization export.
42214b82026-03-08feat: port PR #205 — Responses API support and model-level routingb188c932026-03-08fix: address review issues in Responses API implementatione4085602026-03-08feat: add gpt-5.4 with full level support via Responses API8f115dc2026-03-08feat: add per-request and session usage logging716170c2026-03-08feat: include thinking level in request logd77b3aa2026-03-08fix: pick up thinking level from reasoning_effort/reasoning.effort fields4cb8bca2026-03-08fix: pick up reasoning.effort level in responses route26cbf7f2026-03-08chore: update bun.lockeac10242026-03-14feat: add opt-in proxy exchange capture5647f812026-03-14Merge branch 'feat/proxy-exchange-capture' into dev9e2a4e62026-03-16Harden SSE stream forwarding641fb1e2026-03-16Fix Bun streaming request timeouts0a05b262026-03-18feat: refine dashboard history and runtime logging3a23ff52026-03-18feat: classify late stream disconnects8d6480b2026-03-18Merge branch 'fix/late-stream-disconnect' into dev24236be2026-03-18test: cover stream disconnect log levels9c883d42026-03-18Merge branch 'fix/late-stream-disconnect' into dev