NVIDIA / NVIDIA/cuopt

cuopt_mcp: warn/error when cuopt_solve_lp is given a model with integer/binary variables

Open
#1,942 0 comments 0 reactions 1 assignee View on GitHub

@rg20 is already working on this.

Since Sep 18, 2026.

awaiting response improvement
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.