feat: improve macOS support and local LLM (GPT4All) compatibility#3
Open
lmntrixace wants to merge 1 commit into
Open
feat: improve macOS support and local LLM (GPT4All) compatibility#3lmntrixace wants to merge 1 commit into
lmntrixace wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue
Two issues were affecting users on macOS running GPT4All:
entities listreturned no results even after downloading models. The CLI was searching for models in~/.cache/ctxgraph/models(a Linux path), while the macOS downloader saves them to~/Library/Caches/ctxgraph/models. This prevented the extraction pipeline from being loaded.LLM escalation failed: 404 Not Foundwhen pointingCTXGRAPH_LLM_URLat a local server. The code used the provided URL literally (e.g..../v1) without appending the required/chat/completionspath. Additionally, when a local model like GPT4All correctly rejected the "Strict JSON Schema" request format it doesn't support, the fallback to simple prompt-based extraction was never triggered.Environment
Reasoner v1onhttp://localhost:4891)Fix
Updated find_models_dir in mod.rs to use
ModelManager::default_cache_dir()— the same cross-platform path logic the downloader already uses — so the CLI and downloader always agree on where models live.Added ensure_chat_path in llm_extract.rs — a small private helper that appends
/chat/completionsto any URL missing it, applied across all three env-var loading paths.Changed the extract method from
if let Oktomatchso any error from the strict JSON attempt (including a 400/404 from an unsupported local model) correctly triggers the simpler fallback extraction method.