cuopt_mcp: warn/error when cuopt_solve_lp is given a model with integer/binary variables
@rg20 is already working on this.
Since Sep 18, 2026.
- Dominant language
- Cuda
- Stars
- 1k
- Forks
- 233
- Avg merge
- 4d 4h
- Merged PRs (30d)
- 95
Description
Reported in review on #1916.
`cuopt_solve_lp`/`cuopt_solve_milp` pick a settings schema (`pdlp_settings` vs `mip_settings`) based only on which tool was called, not on the parsed model. After `Read()`, the model's variable types are known — an `.lp` file with a `Generals`/`Binaries` section submitted via `cuopt_solve_lp` silently becomes an LP relaxation (integrality dropped) instead of failing loudly.
Suggestion: in `tools.submit`, after `_read_problem`, check the model's variable types against `kind`; if `kind == "pdlp_settings"` and any variable is integer/binary, raise a clear `CuOptMCPError` telling the caller to use `cuopt_solve_milp` instead (or at minimum return a warning field in the response).
Not done in #1916 to keep that PR's scope to the review items already raised.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.