Skip to content

Use llama.cpp as the local default#54

Merged
wesleysimplicio merged 2 commits into
masterfrom
fix/llama-cpp-local-default
Jun 1, 2026
Merged

Use llama.cpp as the local default#54
wesleysimplicio merged 2 commits into
masterfrom
fix/llama-cpp-local-default

Conversation

@wesleysimplicio
Copy link
Copy Markdown
Owner

Summary

  • Switches the no-config and --local path from Ollama to local-llama/default via llama-cpp-python.
  • Adds GGUF header validation so corrupt local model files are not silently reused.
  • Connects simplicio doctor in the main CLI and makes it validate/download the default Qwen3.5 GGUF.
  • Updates docs, local LLM policy, package interdependence, mapper artifacts, and bumps package version to 0.5.17.

Local Runtime

Default local model now resolves to:

  • local-llama/default
  • bartowski/Qwen_Qwen3.5-2B-GGUF
  • Qwen_Qwen3.5-2B-Q6_K.gguf
  • runtime: llama.cpp through llama-cpp-python

No Ollama service is required in the local default path.

Evidence

  • pytest tests/python/test_providers_local.py tests/python/test_providers_shellout.py tests/python/test_local_models.py tests/python/test_package_metadata.py tests/python/test_run_cli.py::test_doctor_command_delegates_to_local_model_preflight -q -> 66 passed
  • python -m compileall -q simplicio ... -> passed
  • ruff check on touched Python files -> passed
  • simplicio doctor --json -> installed=true, can_run=true, model_id=local-llama/default
  • simplicio smoke -> model reply: OK simplicio connected.
  • python -m build && twine check dist/* -> passed
  • simplicio-mapper index . --json -> updated mapper artifacts

Known Existing Validation Gaps

  • taskflow run simplicio-dev-cli still fails on the existing required root dotnet build gate because this repo has no root solution/project file.
  • Full pytest still has 6 pre-existing bench/fixture/hash failures unrelated to this local model change; 523 passed and 2 skipped in the full run.

Related

Copilot AI review requested due to automatic review settings June 1, 2026 22:01
@wesleysimplicio wesleysimplicio merged commit c43fee2 into master Jun 1, 2026
2 checks passed
@wesleysimplicio wesleysimplicio deleted the fix/llama-cpp-local-default branch June 1, 2026 22:02
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Switches the no-config and --local execution path from local Ollama to in-process llama-cpp-python (local-llama/default with Qwen_Qwen3.5-2B-Q6_K.gguf), drops the Ollama plumbing from local_models, and wires simplicio doctor into the main CLI to validate/download the default GGUF. Adds a GGUF magic-header check so corrupt local model files are not silently reused. Bumps version to 0.5.17 and updates docs/policies/mapper artifacts accordingly.

Changes:

  • Replace local Ollama default + GGUF fallback with a single llama.cpp in-process default; remove _generate_default_ollama_with_fallback and Ollama subprocess plumbing in local_models.
  • Add _is_gguf_file validation in providers._resolve_local_path and in local_models so corrupt/non-GGUF files are rejected; refactor local_models around download/can_download (with pull/can_pull aliases).
  • Register the doctor subcommand in cli.main and update --local to set SIMPLICIO_MODEL=local-llama/default (clearing base/key); update README, LLM policy, package interdependence, CHANGELOG, and version bump to 0.5.17.

Reviewed changes

Copilot reviewed 23 out of 23 changed files in this pull request and generated no comments.

Show a summary per file
File Description
simplicio/providers.py New default routes to in-process llama.cpp; adds GGUF header validation; removes Ollama-default-with-fallback path.
simplicio/local_models.py Replaces Ollama plumbing with HF GGUF download; renames pull→download/can_pull→can_download with back-compat aliases.
simplicio/doctor.py Renders GGUF/llama.cpp status instead of Ollama; uses auto_download and prints model_id/repo/filename/path.
simplicio/cli.py Adds doctor subcommand wiring; --local now forces local-llama/default and unsets base/key.
simplicio/init.py, pyproject.toml Bump to 0.5.17.
tests/python/test_providers_local.py Updates default-routing tests, adds corrupt-GGUF skip test, writes valid GGUF magic in fixtures.
tests/python/test_providers_shellout.py Renames default-config test to assert local-llama route instead of Ollama.
tests/python/test_local_models.py Rewrites tests around download/can_download/model_file_present and new ModelSpec shape.
tests/python/test_run_cli.py Adds test confirming doctor CLI delegates to simplicio.doctor.main.
tests/python/test_package_metadata.py Asserts new version 0.5.17.
README.md, README.pt-BR.md Replace Ollama default rows/sections with llama.cpp default; update install snippet.
docs/LLM_USAGE_POLICY.md, docs/PYTHON_PACKAGE_INTERDEPENDENCE.md, docs/agent-architecture.md Reflect llama.cpp-only default; mention native-runtime direction.
CHANGELOG.md Records 0.5.17 changes.
.simplicio/* Auto-regenerated mapper/index artifacts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants