Skip to content

Add support for choosing a model with Codex.#9859

Open
abhishekp106 wants to merge 1 commit intoabhishek/harness_model_selectionfrom
abhishek/codex_model_selection
Open

Add support for choosing a model with Codex.#9859
abhishekp106 wants to merge 1 commit intoabhishek/harness_model_selectionfrom
abhishek/codex_model_selection

Conversation

@abhishekp106
Copy link
Copy Markdown
Contributor

Description

WISOTT! Codex will interrupt you with an interactive prompt if you choose a model that is 5.4 or below so we add some configuration on the client to set the necessary config to avoid that prompt.

Testing

Tested end to end that all the models work and don't prompt you.

Agent Mode

  • Warp Agent Mode - This PR was created via Warp's AI Agent Mode

@cla-bot cla-bot Bot added the cla-signed label May 1, 2026
@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 1, 2026

@abhishekp106

I'm starting a first review of this pull request.

You can view the conversation on Warp.

I completed the review and no human review was requested for this pull request.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Copy link
Copy Markdown
Contributor Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

Copy link
Copy Markdown
Contributor

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview

This PR threads the selected third-party harness model into the agent driver and writes Codex config so selected Codex models can run non-interactively. I also performed the supplemental security pass and did not find a credential exposure or config-injection issue in the changed lines.

Concerns

  • The Codex migration notice suppression is keyed to a single hard-coded target (gpt-5.4) for every selected model. Codex model migration prompts are target-specific, so any supported older model whose prompt target differs from that value can still block unattended runs.

Verdict

Found: 0 critical, 1 important, 0 suggestions

Request changes

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

// mapping the migration target to itself (e.g. `gpt-5.4 = "gpt-5.4"`) is a no-op
// for Codex, and keeping the client free of model-version knowledge means we
// don't have to ship a client update every time Anthropic/OpenAI ages out a model.
set_codex_model_migration(doc, model_id, CODEX_MODEL_MIGRATIONS_TARGET);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [IMPORTANT] This assumes every selected model's migration notice target is gpt-5.4; Codex acknowledgements are target-specific, so older supported models with a different target can still show the prompt and block the unattended run. Use the selected model's actual target mapping or a server-driven disable/acknowledgement value instead of stamping all models to one constant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant