Use GPT-6 Sol to review and fix code
Give Sol a concrete contract, require a reproduction, review the patch, and retain the tests that support the result.
OpenAI’s model page positions GPT-6 Sol for complex coding and agent workflows. It lists medium as the default reasoning effort and documents the Responses API for built-in tools and function calling. Those product details can change; check the official page when configuring a new API workflow. A coding task still needs its own contract, repository context, and observed checks.
Start with the contract the code must satisfy
Name the entry point, input shape, output shape, and the boundary that matters. For a pagination helper, “fix pagination” is underspecified. A useful request says whether pages start at zero or one, what invalid input should do, whether filtering happens before slicing, and what total counts. Give a small example with an expected result. This makes it possible to distinguish a defect from a preference.
For code review, supply the diff and nearby call sites. Ask for findings ordered by impact, each with a file location, a reproduction or counterexample, and a proposed check. A review that only says a line “might be wrong” is a lead; the decisive step is an input that produces the wrong output under the agreed contract.
Isolate the bug, then make a focused change
If the cause is uncertain, ask Sol to state the visible symptom and list competing explanations before editing. Run the cheapest check that separates them. A failing test or one small instrumented call gives a stable reference point for the repair. Preserve it so the review can show what changed.
For the synthetic pagination example, the first page of a status-filtered list was short because the helper sliced the unfiltered array. The correction filters first, validates page and pageSize, and computes counts from matching records. Its local Node tests then check the same input plus boundary cases.
Check the patch at the right level
Run the failing case against the original and corrected code where practical. Add nearby cases likely to break from the change: empty results, a page past the end, invalid types and sizes, and preservation of the caller’s input. Review the diff for unrelated edits and for contract changes hidden inside “cleanup.” If the code belongs to a service, run its relevant integration checks; a unit test of a helper cannot establish endpoint behavior, deployment status, or production data compatibility.
When using an agent with tools, record which commands it actually ran, their exit codes, and the test environment. Ask it to separate a proposed check from an observed pass. A helpful handoff names the changed behavior first, then the relevant files, the repeatable commands, and any unresolved production check. That lets the next engineer assess the work without reconstructing the entire conversation.
Reusable prompt
Review [FILE OR DIFF] against [EXACT CONTRACT] in [REPOSITORY CONTEXT]. Show concrete input, expected result, and actual result for each correctness finding. Once a failure is reproduced, make the smallest patch, add tests for that case and adjacent boundaries, and run the relevant command. Report the observed exit status and remaining checks. Do not infer production behavior from a local unit test.
Choose the model for your own workload using the Sol model profile and model comparison. If you intend to use the API, estimate request cost with the pricing calculator and confirm the current rates and modes on OpenAI’s model page.