core-agent-ide/codex-rs/app-server-protocol/schema/json
Curtis 'Fjord' Hawthorne b92146d48b
Add under-development original-resolution view_image support (#13050)
## Summary

Add original-resolution support for `view_image` behind the
under-development `view_image_original_resolution` feature flag.

When the flag is enabled and the target model is `gpt-5.3-codex` or
newer, `view_image` now preserves original PNG/JPEG/WebP bytes and sends
`detail: "original"` to the Responses API instead of using the legacy
resize/compress path.

## What changed

- Added `view_image_original_resolution` as an under-development feature
flag.
- Added `ImageDetail` to the protocol models and support for serializing
`detail: "original"` on tool-returned images.
- Added `PromptImageMode::Original` to `codex-utils-image`.
  - Preserves original PNG/JPEG/WebP bytes.
  - Keeps legacy behavior for the resize path.
- Updated `view_image` to:
- use the shared `local_image_content_items_with_label_number(...)`
helper in both code paths
  - select original-resolution mode only when:
    - the feature flag is enabled, and
    - the model slug parses as `gpt-5.3-codex` or newer
- Kept local user image attachments on the existing resize path; this
change is specific to `view_image`.
- Updated history/image accounting so only `detail: "original"` images
use the docs-based GPT-5 image cost calculation; legacy images still use
the old fixed estimate.
- Added JS REPL guidance, gated on the same feature flag, to prefer JPEG
at 85% quality unless lossless is required, while still allowing other
formats when explicitly requested.
- Updated tests and helper code that construct
`FunctionCallOutputContentItem::InputImage` to carry the new `detail`
field.

## Behavior

### Feature off
- `view_image` keeps the existing resize/re-encode behavior.
- History estimation keeps the existing fixed-cost heuristic.

### Feature on + `gpt-5.3-codex+`
- `view_image` sends original-resolution images with `detail:
"original"`.
- PNG/JPEG/WebP source bytes are preserved when possible.
- History estimation uses the GPT-5 docs-based image-cost calculation
for those `detail: "original"` images.


#### [git stack](https://github.com/magus/git-stack-cli)
- 👉 `1` https://github.com/openai/codex/pull/13050
-  `2` https://github.com/openai/codex/pull/13331
-  `3` https://github.com/openai/codex/pull/13049
2026-03-03 15:56:54 -08:00
..
v1 ignore v1 in JSON schema codegen (#12408) 2026-02-20 21:36:12 -08:00
v2 Add under-development original-resolution view_image support (#13050) 2026-03-03 15:56:54 -08:00
ApplyPatchApprovalParams.json chore: remove codex-core public protocol/shell re-exports (#12432) 2026-02-20 23:45:35 -08:00
ApplyPatchApprovalResponse.json feat: include available decisions in command approval requests (#12758) 2026-02-26 01:10:46 +00:00
ChatgptAuthTokensRefreshParams.json fix(app-server): for external auth, replace id_token with chatgpt_acc… (#11240) 2026-02-09 20:48:58 -08:00
ChatgptAuthTokensRefreshResponse.json fix(app-server): for external auth, replace id_token with chatgpt_acc… (#11240) 2026-02-09 20:48:58 -08:00
ClientNotification.json feat: vendor app-server protocol schema fixtures (#10371) 2026-02-01 23:38:43 -08:00
ClientRequest.json Add under-development original-resolution view_image support (#13050) 2026-03-03 15:56:54 -08:00
codex_app_server_protocol.schemas.json Add under-development original-resolution view_image support (#13050) 2026-03-03 15:56:54 -08:00
codex_app_server_protocol.v2.schemas.json Add under-development original-resolution view_image support (#13050) 2026-03-03 15:56:54 -08:00
CommandExecutionRequestApprovalParams.json fix: use AbsolutePathBuf for permission profile file roots (#12970) 2026-02-27 17:42:52 +00:00
CommandExecutionRequestApprovalResponse.json feat: include available decisions in command approval requests (#12758) 2026-02-26 01:10:46 +00:00
DynamicToolCallParams.json feat: vendor app-server protocol schema fixtures (#10371) 2026-02-01 23:38:43 -08:00
DynamicToolCallResponse.json feat(app-server, core): allow text + image content items for dynamic tool outputs (#10567) 2026-02-04 16:12:47 -08:00
EventMsg.json Add under-development original-resolution view_image support (#13050) 2026-03-03 15:56:54 -08:00
ExecCommandApprovalParams.json chore: remove codex-core public protocol/shell re-exports (#12432) 2026-02-20 23:45:35 -08:00
ExecCommandApprovalResponse.json feat: include available decisions in command approval requests (#12758) 2026-02-26 01:10:46 +00:00
FileChangeRequestApprovalParams.json feat: vendor app-server protocol schema fixtures (#10371) 2026-02-01 23:38:43 -08:00
FileChangeRequestApprovalResponse.json feat: vendor app-server protocol schema fixtures (#10371) 2026-02-01 23:38:43 -08:00
FuzzyFileSearchParams.json feat: vendor app-server protocol schema fixtures (#10371) 2026-02-01 23:38:43 -08:00
FuzzyFileSearchResponse.json feat: vendor app-server protocol schema fixtures (#10371) 2026-02-01 23:38:43 -08:00
FuzzyFileSearchSessionCompletedNotification.json [app-server] add fuzzyFileSearch/sessionCompleted (#11773) 2026-02-13 15:08:14 -08:00
FuzzyFileSearchSessionUpdatedNotification.json app-server: add fuzzy search sessions for streaming file search (#10268) 2026-02-12 10:49:44 -08:00
JSONRPCError.json feat: vendor app-server protocol schema fixtures (#10371) 2026-02-01 23:38:43 -08:00
JSONRPCErrorError.json feat: vendor app-server protocol schema fixtures (#10371) 2026-02-01 23:38:43 -08:00
JSONRPCMessage.json feat(app-server): add tracing to all app-server APIs (#13285) 2026-03-02 16:01:41 -08:00
JSONRPCNotification.json feat: vendor app-server protocol schema fixtures (#10371) 2026-02-01 23:38:43 -08:00
JSONRPCRequest.json feat(app-server): add tracing to all app-server APIs (#13285) 2026-03-02 16:01:41 -08:00
JSONRPCResponse.json feat: vendor app-server protocol schema fixtures (#10371) 2026-02-01 23:38:43 -08:00
RequestId.json feat: vendor app-server protocol schema fixtures (#10371) 2026-02-01 23:38:43 -08:00
ServerNotification.json [codex] include plan type in account updates (#13181) 2026-03-01 13:43:37 -08:00
ServerRequest.json fix: use AbsolutePathBuf for permission profile file roots (#12970) 2026-02-27 17:42:52 +00:00
ToolRequestUserInputParams.json feat: vendor app-server protocol schema fixtures (#10371) 2026-02-01 23:38:43 -08:00
ToolRequestUserInputResponse.json feat: vendor app-server protocol schema fixtures (#10371) 2026-02-01 23:38:43 -08:00