Repository navigation
Show concise NVFP4 inference errors - #7145
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces handling for unsupported NVFP4 inference errors during model loading. It intercepts verbose MLX quantization metadata errors, logs a warning, and returns a user-friendly error message indicating that NVFP4 inference is not yet supported. Additionally, a new test suite has been added to verify this behavior and ensure unrelated load errors remain unaffected. There are no review comments, and I have no additional feedback to provide.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 46ab34e4f0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| raise HTTPException(status_code = 409, detail = str(e)) | ||
| # Friendlier message for models Unsloth cannot load. | ||
| redacted_msg = redact_native_paths(str(e)) | ||
| if _is_unsupported_nvfp4_inference_error(redacted_msg): |
There was a problem hiding this comment.
Handle NVFP4 validation errors too
This rewrite only runs in /load, but the main chat flow validates a selection before loading it (use-chat-model-runtime.ts calls /api/inference/validate before /load). validate_model runs the same ModelConfig.from_identifier(...) call and surfaces RuntimeError/ValueError via _maybe_unsupported_message; because the NVFP4 metadata error does not match the generic unsupported hints, the verbose metadata blob can still be returned during validation and the load path is never reached. Please apply the same NVFP4 rewrite in the validation exception path.
Useful? React with 👍 / 👎.
Summary
ValueErrorpaths.Why
NVFP4 checkpoints can reach an unsupported MLX per-module quantization path that returns the full metadata blob to Studio. The chat flow validates a model before loading it, so both endpoints must replace this signature. The metadata is not actionable and overwhelms the error notification.
Before
Studio could display the complete per-module quantization metadata during validation or loading.
After
Failed NVFP4 validation and load requests with this signature show:
Other errors retain their existing status codes and details.
Safety
The replacement requires both
nvfp4andper-module MLX quantization metadatain the error, using case-insensitive matching. Network, authentication, download, disk, GPU-selection, GGUF, and other model errors remain on their existing paths.Testing
uvmatrix on Python 3.10 through 3.14: 40 passed per versionThe simulation matrix covers validation and loading, generic exceptions, runtime errors, direct value errors, native and Hub models, mixed casing, long metadata, Windows and POSIX paths, unrelated failure signatures, HTTP response shape, and concurrent matching.