Files
pipelines/internal/codex/testdata/README.md
T

45 lines
2.6 KiB
Markdown

# Codex model protocol fixtures
These use synthetic models/providers, never guessed production identifiers.
Wire shapes were checked against the official app-server documentation and the
generated protocol source matching the installed package manifest (Codex 0.163.0):
- https://developers.openai.com/codex/app-server
- https://github.com/openai/codex/blob/rust-v0.163.0/codex-rs/app-server-protocol/schema/typescript/v2/ModelListResponse.ts
- Same directory: `ModelListParams.ts`, `Model.ts`, `Thread.ts`, `ThreadStartResponse.ts`, `TurnStartParams.ts`.
`Model.model` is the turn override, not the catalog row's opaque `id`.
`Thread.model` is current configured/latest persisted metadata, not per-turn
execution telemetry. `thread/start` also returns model/provider at the top level.
The fixtures project fields consumed by this adapter and retain real casing and
pagination shapes. Tests use an isolated fake WebSocket JSON-RPC server.
Local `codex --version` timed out before output, so schema generation was not reached;
the installed `codex-package.json` identified version 0.163.0, so version-tagged
generated source was read instead. No live app-server socket was contacted.
Model selection validates via `thread/read` + `model/list`, persists a Pipelines
next-turn choice, and supplies `turn/start.model` only when the user sends a
prompt. It never calls `thread/resume`, which can awaken a queued goal, nor any
configuration-writing API. The acknowledgement means "saved for the next turn,"
not "remote settings changed." The override is supplied again after a Pipelines
restart; an already-running turn is not reconfigured.
## Attachment inputs
Attachment wire tests also use the installed 0.163.0 tag's
`schema/typescript/v2/UserInput.ts` and `TurnStartParams.ts`. Verified PNG,
JPEG and GIF bytes use `localImage` with an absolute local path. Other files
(including unsupported/corrupt image formats) retain their bytes and use a
`mention` name/path plus an explicit statement that the reference has **not**
loaded their contents: the agent must inspect them with its normal tools.
This does not bypass the thread's sandbox or grant filesystem permissions.
Text inputs include the schema's `text_elements` array.
Only unchanged server-prepared file URIs are admitted; private regular files,
eight-file/1 MiB combined bounds, and image decode allocation bounds are checked
before `turn/start`. Files retain the existing attachment-store retention rules.
History keeps local file/image parts; native image parts use the stored basename
while a companion text input retains the original display name.
All wire tests use fake JSON-RPC servers, never the production control socket.