Conversation
Greptile SummaryThis PR fixes a regression where custom GGUF models configured via the UI were lost after a gateway restart and not shown in the download-progress modal. It achieves this through three coordinated changes: persisting Key points:
Confidence Score: 2/5
Important Files Changed
Sequence DiagramsequenceDiagram
actor User
participant UI as Browser (providers.js)
participant GW as Gateway (local_llm_setup.rs)
participant FS as Filesystem (models.rs)
participant HF as HuggingFace
User->>UI: Configure custom GGUF (hfRepo + hfFilename)
UI->>GW: RPC: providers.local.configure-custom-model
GW->>GW: Validate hf_filename (validate_hf_filename_path)
GW->>GW: Build custom_gguf_model_id
GW->>GW: Save LocalModelEntry {hf_repo, hf_filename} to config
GW-->>UI: {ok: true, modelId, displayName}
UI->>UI: showModelDownloadProgress()
GW->>GW: tokio::spawn download task
GW->>FS: ensure_custom_model_with_progress()
FS->>HF: GET huggingface.co/{hf_repo}/resolve/main/{hf_filename}
loop Progress chunks
HF-->>FS: chunk
FS->>GW: on_progress callback
GW-->>UI: SSE: local-llm.download {progress}
UI->>UI: Update progress bar
end
FS-->>GW: Ok(model_path)
GW->>GW: register_local_model_entry()
GW->>GW: status = Ready
GW-->>UI: SSE: local-llm.download {complete: true}
UI->>UI: fetchModels(), refreshProvidersPage()
Note over GW,FS: On gateway restart
GW->>GW: register_saved_local_models()
GW->>FS: Load LocalLlmConfig
GW->>GW: Register each saved entry into ProviderRegistry
Last reviewed commit: 02922de |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 02922de4e4
ℹ️ 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".
Merging this PR will not alter performance
Comparing Footnotes
|
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7eb81c6605
ℹ️ 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".
# Conflicts: # crates/tools/src/sandbox.rs
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fbfae6948d
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e69726b8e0
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d9f99f9d26
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1715028046
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 096bfa295f
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 52e8488aae
ℹ️ 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".
| if backend != "GGUF" && backend != "MLX" { | ||
| return Err(format!("invalid backend: {backend}. Must be GGUF or MLX").into()); | ||
| } |
There was a problem hiding this comment.
Reject custom MLX setup when runtime support is missing
configure_custom now starts immediate background downloads for MLX repos, but this validation only checks that backend is one of GGUF/MLX and never enforces the same MLX capability gate used in configure (Apple Silicon + mlx-lm installed). In unsupported environments, users can download large MLX models and receive a successful configuration state even though inference will fail at load time, so this path should fail fast before spawning the MLX download.
Useful? React with 👍 / 👎.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
* fix(local-llm): restore custom gguf downloads and startup registration * fix(local-llm): address PR review feedback * test(sandbox): fix off mode coverage * fix(web): unhide local model progress modal * fix(local-llm): address review feedback * fix(local-llm): preserve colliding provider entries * fix(gateway): retain custom local models after discovery * fix(local-llm): harden custom model validation and cleanup * fix(gateway): honor local disable flag during restore * fix(gateway): preserve local model restore state * test(web-ui): stabilize voice fallback websocket e2e
…#417) * fix(local-llm): restore custom gguf downloads and startup registration * fix(local-llm): address PR review feedback * test(sandbox): fix off mode coverage * fix(web): unhide local model progress modal * fix(local-llm): address review feedback * fix(local-llm): preserve colliding provider entries * fix(gateway): retain custom local models after discovery * fix(local-llm): harden custom model validation and cleanup * fix(gateway): honor local disable flag during restore * fix(gateway): preserve local model restore state * test(web-ui): stabilize voice fallback websocket e2e
Summary
hf_repoandhf_filenamefor custom GGUF entries and derive filename-scoped custom model idsValidation
Completed
just formatcargo check -p moltis-gateway --testscargo test -p moltis-gateway register_saved_local_models_registers_custom_gguf_provider_from_saved_configcargo test -p moltis-gateway custom_model_cargo test -p moltis-gateway round_trip_preserves_custom_gguf_metadatacargo test -p moltis-providers --features local-llm custom_model_cargo test -p moltis-providers --features local-llm download_gguf_file_with_progress_downloads_to_target_pathcargo +nightly-2025-11-30 clippy -Z unstable-options -p moltis-gateway -p moltis-providers --all-targets -- -D warningsbiome check --write crates/web/src/assets/js/providers.js crates/web/ui/e2e/specs/providers.spec.jsRemaining
./scripts/local-validate.sh <PR_NUMBER>cd crates/web/ui && npm run e2e -- e2e/specs/providers.spec.js -g "custom local model download progress modal renders without JS errors"(playwright: command not foundin this environment)Manual QA
Closes #132