Skip to content

Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure

TypeScript

test(codex): pin image-input flag parity and tool JPEG

Alfredo Lopez54ba1f908e65
diff --git a/control-api/package-lock.json b/control-api/package-lock.json
index 4d871b0c3..7744eb931 100644
--- a/control-api/package-lock.json
+++ b/control-api/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "clerum-control-api",
- "version": "0.1.555",
+ "version": "0.1.556",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "clerum-control-api",
- "version": "0.1.555",
+ "version": "0.1.556",
"dependencies": {
"@clerum/display-field": "file:../packages/display-field",
"@clerum/image-policy": "file:../packages/image-policy",
diff --git a/control-api/package.json b/control-api/package.json
index 2dcf0f57a..c27919fdd 100644
--- a/control-api/package.json
+++ b/control-api/package.json
@@ -1,6 +1,6 @@
{
"name": "clerum-control-api",
- "version": "0.1.555",
+ "version": "0.1.556",
"description": "Internal Clerum control plane REST API + UI for managing CRDs and secrets",
"main": "dist/main.js",
"engines": {
diff --git a/control-api/test/services.llmProviderAttemptAuthorizer.test.ts b/control-api/test/services.llmProviderAttemptAuthorizer.test.ts
index 30caab115..092bef548 100644
--- a/control-api/test/services.llmProviderAttemptAuthorizer.test.ts
+++ b/control-api/test/services.llmProviderAttemptAuthorizer.test.ts
@@ -230,6 +230,7 @@ describe('authorizeLlmProviderAttempt', () => {
['png', 'attachment', false, 10 * 1024 * 1024],
['png', 'tool', true, 5 * 1024 * 1024],
['jpeg', 'attachment', true, 5 * 1024 * 1024],
+ ['jpeg', 'tool', true, 5 * 1024 * 1024],
] as const)(
'carries %s from %s (tools=%s) through Host authorization and proxy projection',
async (format, origin, withTools, imageBytes = 0) => {
diff --git a/deploy/base/control-plane/codex-llm-proxy.yaml b/deploy/base/control-plane/codex-llm-proxy.yaml
index d8cf25cb2..384384c4e 100644
--- a/deploy/base/control-plane/codex-llm-proxy.yaml
+++ b/deploy/base/control-plane/codex-llm-proxy.yaml
@@ -21,6 +21,8 @@ data:
CODEX_LLM_PROXY_MAX_BODY_BYTES: "1048576"
# V2 visual envelope. Keep this equal to LIMITS.maxVisualRequestBodyBytes.
# Ordinary and anonymous requests still use CODEX_LLM_PROXY_MAX_BODY_BYTES.
+ # Visual parse stays on the 1 MiB ordinary cap until CODEX_IMAGE_INPUT_MODELS
+ # is set to the same list on this proxy and on mcp-host.
CODEX_LLM_PROXY_MAX_VISUAL_BODY_BYTES: "25165824"
CODEX_LLM_PROXY_MAX_STREAM_DURATION_MS: "300000"
CODEX_LLM_PROXY_MAX_DEADLINE_MS: "300000"
diff --git a/docs/architecture/codex-subscription-transport-contract.md b/docs/architecture/codex-subscription-transport-contract.md
index a47e50f90..5dd0e1720 100644
--- a/docs/architecture/codex-subscription-transport-contract.md
+++ b/docs/architecture/codex-subscription-transport-contract.md
@@ -72,9 +72,12 @@ an inline data URL. The shape is grounded in the official Codex client
This source evidence is not a successful call to Evenfire's frozen endpoint.
`CODEX_IMAGE_INPUT_MODELS` is an explicit, comma-separated model rollout gate in
-both Host and proxy. It defaults to empty. Set it only for the models whose
-interoperability has been independently verified, after every authorizer/proxy
-replica accepts V2. This gate is not a replacement for catalog authorization.
+both Host and proxy. It defaults to empty. Set the same list on both services:
+enabling it on Host alone still parses the proxy at 1 MiB, and enabling it on
+the proxy alone still returns `image_input_unsupported` from Host. Set it only
+for the models whose interoperability has been independently verified, after
+every authorizer/proxy replica accepts V2. This gate is not a replacement for
+catalog authorization.
Until enabled, visual input returns `image_input_unsupported`; it is not silently
removed and does not trigger automatic fallback. Ordinary eligible failures
retain the existing configured fallback policy. Limit errors, including HTTP
diff --git a/tests/e2e/integration/codex-subscription-contract-freeze.test.ts b/tests/e2e/integration/codex-subscription-contract-freeze.test.ts
index 4d3f77a6a..417f4352f 100644
--- a/tests/e2e/integration/codex-subscription-contract-freeze.test.ts
+++ b/tests/e2e/integration/codex-subscription-contract-freeze.test.ts
@@ -130,6 +130,12 @@ describe('codex-subscription contract freeze', () => {
expect(proxyDeploy).toContain(
`CODEX_LLM_PROXY_MAX_VISUAL_BODY_BYTES: "${localContract.LIMITS.maxVisualRequestBodyBytes}"`
)
+ expect(proxyDeploy).not.toMatch(/CODEX_IMAGE_INPUT_MODELS:/)
+ const hostConfig = readFileSync(join(repoRoot, 'mcp-host/src/config.ts'), 'utf8')
+ const proxyConfig = readFileSync(join(repoRoot, 'codex-llm-proxy/src/config.ts'), 'utf8')
+ expect(hostConfig).toMatch(/CODEX_IMAGE_INPUT_MODELS[\s\S]{0,120}split\(','\)/)
+ expect(proxyConfig).toMatch(/CODEX_IMAGE_INPUT_MODELS[\s\S]{0,120}split\(','\)/)
+ expect(architecture).toContain('Set the same list on both services')
})
it('requires the sanitized fixture and both freeze documents', () => {
diff --git a/tests/e2e/package-lock.json b/tests/e2e/package-lock.json
index 2c10f9a69..e8e24e0d9 100644
--- a/tests/e2e/package-lock.json
+++ b/tests/e2e/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "clerum-e2e-tests",
- "version": "0.1.87",
+ "version": "0.1.88",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "clerum-e2e-tests",
- "version": "0.1.87",
+ "version": "0.1.88",
"devDependencies": {
"@types/jsonwebtoken": "^9.0.10",
"@types/node": "^22.0.0",
diff --git a/tests/e2e/package.json b/tests/e2e/package.json
index da4a3e8a1..3ae01f2c5 100644
--- a/tests/e2e/package.json
+++ b/tests/e2e/package.json
@@ -1,6 +1,6 @@
{
"name": "clerum-e2e-tests",
- "version": "0.1.87",
+ "version": "0.1.88",
"private": true,
"type": "module",
"scripts": {