Dashboard › opencode-lore › Distillation
ad8042d2-473b-4cd3-9a47-e6f5284ca3d3["lore_tm_v1_ZtXOgtT1n47MhlPg5ASAuyfaUau1b95eCeZfBfs-o9g","lore_tm_v1_rpiYjNGIHGFkQWPuUquKPhlXwm0FLh8wdECIBBHxIrA","lore_tm_v1_2Spedhg5Adl_NRkiSyu6mFjteSWx2mBx6mepT3lfm3E","lore_tm_v1_f94jE8TW5cXi-aG-f2E1k0nalCMxmBnCPQnwogGYsMo","lore_tm_v1_PjPzFFZiy6uPGPjLOalLGrpsz6CrMdKAqppu10dQn0M","lore_tm_v1_hbQT-UckiBgt1tR32eqWB44jEt2fA3TS0VyksRJ_FY0","lore_tm_v1_32Sgv5gOtaSWsRZl3Ws2bcUIpbUw7UeefZqs8tPFyyQ","lore_tm_v1_y2RlLofEEojhsowY9VdWdtSlWGeTI60_xR2PxSH91E4","lore_tm_v1_KPreWyCXIgXbb2vxrQhKTc_ORszaCYNo9W6cz_1k174","lore_tm_v1_BlWntIhn2LfNOuz5T8rxZN67jya7A5U33sCgay1f95g","lore_tm_v1_I5MNlObiOjGc1UHl8kM5zboMf2344BvVJ24tr_2URHA","lore_tm_v1_APbI6CpVYTbdXw1jjwGQ7oGxJvzyxMayysIZV2ChjmE"]
Date: Sep 16, 2026
DEFAULT_MAX_SSE_FRAMES = 100_000 is exported from /home/byk/Code/opencode-lore-responses-accumulation/packages/gateway/src/stream/anthropic.ts; it is also used by anthropic.ts, openai.ts, gemini.ts, and openai-responses.ts, including as the default maxSparseIndex in openai-responses.ts./home/byk/Code/opencode-lore-responses-accumulation/packages/gateway/test/openai-responses-recall-aware-stream.test.ts test "computes the continuation offset without spreading 126000 retained item keys" creates visibleItemCount = 63_000, validates and accumulates all 63,000 items, then provides two complete 63,001-entry maps to the production max-index path; its total frame count must remain <= 100_000.Map.prototype[Symbol.iterator] to isolate the offset calculation from an existing quadratic duplicate-identity scan, restores the iterator before releasing the recall tail, uses maxRetainedStateBytes: 64 * 1024 * 1024, and has a 60_000 ms timeout."answer" in completedResponse.content, successful === true, output containing "response.completed", and no "response.failed"."accounts for terminal Codex continuation usage once when candidate flush exceeds the transaction limit" uses principal usage { input_tokens: 2, output_tokens: 3, total_tokens: 5 } and continuation usage { input_tokens: 5, output_tokens: 7, total_tokens: 12 }; its private terminal argument contains private-terminal-flush- followed by 4,096 x characters."rejects unfinished reasoning omitted from output_item.done" at line 4195 and "rejects unfinished reasoning when output_item.done omits summary" at line 4227 in /home/byk/Code/opencode-lore-responses-accumulation/packages/gateway/test/openai-responses-recall-aware-stream.test.ts./home/byk/Code/opencode-lore-responses-accumulation/packages/gateway/test/openai-responses-stream.test.ts includes "Codex binds an omitted added function-call ID from output_item.done" at line 2990 and "Codex validation infers omitted output/content indices and permits an added item without done" at line 3134.4b247d3850983b60a249cd0be3a6c005509d5fb26b41da259c8ed1c6e9ede154, 39593a5f72dec344a670f89125245f3cc4ad75337a1b9a3611aa1a99256bea34, 504b5448846f43333bccba80f9a262171a3b6e0fde6146252ca6334297d3ecaa, and a83e976242db98545e26f5c53618f8b5713ab6b5d60cba449ac9ae2996d31333./home/byk/Code/opencode-lore-responses-accumulation/packages/gateway/test/openai-responses-recall-aware-stream.test.ts has 6 maxStreamBytes references, including "bounds request-wide no-index stream bytes" at line 7163 and "caps raw stream bytes across a continuation" at line 7183."keeps sparse continuation candidates under the deferred input limit" uses a 1 * 1024 * 1024-character argument delta, maxDeferredBytes: 1024 * 1024, and maxRetainedStateBytes: 8 * 1024 * 1024; it expects PUBLIC_RECALL_ERROR and failure category "resource_limit"."charges a resolved sparse continuation candidate to the transactional spool" uses a 4 KiB anchorText, a sparse visible function-call path containing 10 KiB of x, maxDeferredBytes: 16 * 1024, and maxRetainedStateBytes: 32 * 1024; it expects PUBLIC_RECALL_ERROR and failure category "resource_limit"."delivers a resolved sparse continuation candidate exactly once" uses the same 10 KiB sparse arguments and 4 KiB anchor with maxDeferredBytes: 16 * 1024 and maxRetainedStateBytes: 48 * 1024; it expects exactly one response.function_call_arguments.delta frame with output_index: 1, item_id: "fc_sparse_0", and no PUBLIC_RECALL_ERROR."stops reading upstream while the client applies backpressure" confirms the source remains at exactly 3 pulls until the client reader is acquired and canceled."bounds request-wide no-index stream bytes" sets maxStreamBytes to the encoded lifecycle frame byte length plus 1 and expects "response.failed"."caps raw stream bytes across a continuation" sets maxStreamBytes to the encoded principal plus continuation-created frame length plus 1; it expects PUBLIC_RECALL_ERROR and failure category "resource_limit"."caps retained indexed state across a continuation" sets maxRetainedStateBytes to retained principal indexed bytes plus 1; it expects PUBLIC_RECALL_ERROR and failure category "resource_limit".parseSSEStream() in /home/byk/Code/opencode-lore-responses-accumulation/packages/gateway/src/stream/anthropic.ts at line 150; its shared frame counter is typed as frameCounter?: { count: number }, initialized at line 176, incremented at line 198, and checked against the limit at line 199.parseSSEStream() accepts maxEventBytes, maxFrames, frameCounter, inactivityMs, signal, requireEventTerminator, maxTotalBytes, and fatalUtf8; it defaults maxEventBytes to 4 * 1024 * 1024 and maxFrames to DEFAULT_MAX_SSE_FRAMES.parseSSEStream() validates that maxFrames is a non-negative safe integer, otherwise throws "SSE frame limit must be a non-negative safe integer"; exceeding it throws SSEStreamLimitError with message SSE stream exceeded ${maxFrames} frame limit.parseSSEStream() uses TextDecoder("utf-8", { fatal: opts.fatalUtf8, ignoreBOM: true }), performs its own initial UTF-8 BOM removal and byte accounting, joins multiple data: lines with \n, recognizes blank-line delimiters across CRLF/LF/CR forms, and defaults an event without an event: line to "message"./home/byk/Code/opencode-lore-responses-accumulation/packages/gateway/test/openai-responses-recall-aware-stream.test.ts."cancellation never waits for a non-settling recall callback" is at line 8715 of /home/byk/Code/opencode-lore-responses-accumulation/packages/gateway/test/openai-responses-recall-aware-stream.test.ts."rolls back every recall mutation when a commit callback fails" at line 8435, "aborts an in-flight recall callback when the client disconnects" at line 9150, and "classifies recall execution failure without exposing callback details" at line 9476; the latter uses private error text "private callback failure" and asserts it does not appear in output.