[codex] Add CLI model option pass-through#84
Open
rawwerks wants to merge 7 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
prose run --model ... --reasoning-effort ....ThreadOptions.modelandThreadOptions.modelReasoningEffort.PROSE_CODEX_MODELandPROSE_CODEX_REASONING_EFFORT.modelandeffortthrough the Claude Agent SDK.Use Case / Run Evidence
This came from a current OpenProse/Codex session where
prose runcould select--harnessbut could not select the underlying Codex model or reasoning effort, even though@openai/codex-sdkexposes those thread options.The user-visible friction was simple: model selection should be a thin pass-through to the selected harness, not a missing feature or a Contract Markdown semantic.
Local run receipt:
runs/20260515-102114-8cd0b6.Design Boundary
This belongs in
tools/cli/because it is shell/harness forwarding behavior. It does not change Contract Markdown, Forme, Prose VM semantics, or stdlib contracts.The implementation keeps OpenProse harness/model agnostic by default: the CLI forwards controls only to harness adapters that know how to apply them. Codex receives
model/modelReasoningEffort; Claude receivesmodel/effort.CI Model Discovery
The real harness smoke no longer hardcodes exact provider model names.
codex debug modelsand selects an API-supported model that advertises reasoning-effort support.PROSE_SMOKE_CODEX_MODEL,PROSE_SMOKE_CODEX_MODEL_PATTERN,PROSE_SMOKE_CLAUDE_MODEL, andPROSE_SMOKE_CLAUDE_MODEL_PATTERN.Examples
The canonical prompt remains a Prose command, without model-control flags being treated as caller inputs:
Testing
cd tools/cli && npm test: 254 tests passedcd tools/cli && npm test -- tests/scripts/smoke-harness.test.mjs tests/harnesses/harnesses.test.ts: 17 tests passedcd tools/cli && npm run typecheck: passedcd tools/cli && npm run build: passednode tools/cli/scripts/smoke-harness.mjs --help: passedruby -e 'require "yaml"; YAML.load_file(".github/workflows/cli-real-harness-smoke.yml")': passedgit diff --check: passedd6b8fc0:CLI Real Harness Smokepassed for bothcodex-sdkandclaude-sdkd6b8fc0:CLI Release Check,OpenProse Smoke, andCodeQLpassedsafe-push origin codex/cli-model-options: reviewer gate approved and branch pushedAudit Notes
A read-only subagent audit found two smoke-discovery issues: Claude discovery was checking the wrong thinking capability for the live path, and it allowed
xhigheven though the Claude harness rejects it. This PR now has targeted smoke-discovery tests for both cases.Residual Risk / Follow-ups
OPENAI_API_KEYorANTHROPIC_API_KEY; live provider validation was completed by GitHub Actions with repository secrets.serve.