Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure
TypeScript
docs(llm-proxy): correct catalog provenance and heap-cap rationale (#739)
Alfredo Lopez937ce4b1ce0d
diff --git a/codex-llm-proxy/test/codexTransport.conformance.test.ts b/codex-llm-proxy/test/codexTransport.conformance.test.tsindex cd3c3d8b3..3a47159bb 100644--- a/codex-llm-proxy/test/codexTransport.conformance.test.ts+++ b/codex-llm-proxy/test/codexTransport.conformance.test.ts@@ -507,7 +507,7 @@ describe('streamCodexCompletion', () => {}it.each([- { events: 'the recorded error + response.failed pair', frames: UPSTREAM_CONTEXT_OVERFLOW_FRAMES },+ { events: 'the transcribed error + response.failed pair', frames: UPSTREAM_CONTEXT_OVERFLOW_FRAMES },{ events: 'the error event alone', frames: [sseFrame(UPSTREAM_CONTEXT_ERROR_EVENT)] },{ events: 'the response.failed event alone', frames: [sseFrame(UPSTREAM_CONTEXT_FAILED_EVENT)] },])('T-R7-2a maps $events to context_length_exceeded', async ({ frames }) => {diff --git a/codex-llm-proxy/test/fixtures/upstreamContextOverflow.ts b/codex-llm-proxy/test/fixtures/upstreamContextOverflow.tsindex fd877847d..fa6eb3296 100644--- a/codex-llm-proxy/test/fixtures/upstreamContextOverflow.ts+++ b/codex-llm-proxy/test/fixtures/upstreamContextOverflow.ts@@ -1,8 +1,9 @@// The two SSE events the Codex upstream sends when a request exceeds the-// model's context window. Recorded on 2026-09-23 with `codex exec` 0.154.0-// against `gpt-5.6-luna` over HTTPS (1,040,000 CJK characters of input); the-// trace was filtered to these events, so no message text or account data is-// kept. #731: the proxy used to discard the code and answer 503.+// model's context window, transcribed by hand from the recorded trace: a+// `codex exec` 0.154.0 run on 2026-09-23 against `gpt-5.6-luna` over HTTPS+// (1,040,000 CJK characters of input). Only these events are transcribed, so+// no message text or account data is kept. #731: the proxy used to discard the+// code and answer 503.export const UPSTREAM_CONTEXT_ERROR_EVENT = {type: 'error',error: {diff --git a/deploy/base/control-plane/grok-llm-proxy.yaml b/deploy/base/control-plane/grok-llm-proxy.yamlindex f22147197..81f1b01b1 100644--- a/deploy/base/control-plane/grok-llm-proxy.yaml+++ b/deploy/base/control-plane/grok-llm-proxy.yaml@@ -73,10 +73,11 @@ spec:secretKeyRef:name: grok-llm-proxy-secretskey: GROK_LLM_PROXY_CONTROL_API_TOKEN- # Caps V8's old space well under the 768Mi limit so the heap is- # collected before the kernel kills the pod. Measured peak with- # three 8 MiB bodies in flight: 230-252 MiB of RSS without this- # cap and 249-292 MiB with it (one run per mode).+ # Caps V8's old space well under the 768Mi limit, so heap growth+ # is bounded and collected before the kernel kills the pod. The+ # cap does not lower the peak: with three 8 MiB bodies in flight,+ # RSS measured 249-292 MiB with it and 230-252 MiB without it+ # (one run per mode).- name: NODE_OPTIONSvalue: "--max-old-space-size=384"ports:diff --git a/grok-llm-proxy/src/grokTransport.ts b/grok-llm-proxy/src/grokTransport.tsindex 34b6d8d54..76e37272b 100644--- a/grok-llm-proxy/src/grokTransport.ts+++ b/grok-llm-proxy/src/grokTransport.ts@@ -736,8 +736,8 @@ function displayNameOf(row: Record<string, unknown>): string | undefined {/*** The upstream row's `context_window`, when it is a positive integer the- * catalog store can hold. The field name matches the Grok CLI's model cache;- * the raw catalog envelope is confirmed by the live probe on #739.+ * catalog store can hold. Unverified against the live catalog: the field+ * name and the envelope are taken from the shape of the Grok CLI's model cache.*/function contextWindowOf(row: Record<string, unknown>): number | undefined {const value = row.context_windowdiff --git a/grok-llm-proxy/test/fixtures/grokModelsCatalog.sanitized.json b/grok-llm-proxy/test/fixtures/grokModelsCatalog.sanitized.jsonindex 0e1f07502..108cebaad 100644--- a/grok-llm-proxy/test/fixtures/grokModelsCatalog.sanitized.json+++ b/grok-llm-proxy/test/fixtures/grokModelsCatalog.sanitized.json@@ -3,7 +3,7 @@"origin": "https://cli-chat-proxy.grok.com/v1/models","recordedBy": "Grok CLI 1.0.30 models cache","fetchedAt": "2026-09-16T15:05:42.026248Z",- "sanitization": "The per-model object is kept as recorded, reduced to its identity, name and context-window fields; the CLI's own key and endpoint settings are dropped. The CLI re-wraps the list, so the OpenAI-compatible { data: [...] } envelope is reconstructed. The field name is confirmed by the live catalog sync in #731 R3-5."+ "sanitization": "The per-model object is kept as recorded, reduced to its identity, name and context-window fields; the CLI's own key and endpoint settings are dropped. The CLI re-wraps the list, so the OpenAI-compatible { data: [...] } envelope is reconstructed. Unverified against the live catalog: the field names and the envelope are taken from the CLI cache shape."},"data": [{