llmsetup 0.6.1__tar.gz → 0.6.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {llmsetup-0.6.1/src/llmsetup.egg-info → llmsetup-0.6.2}/PKG-INFO +9 -7
- {llmsetup-0.6.1 → llmsetup-0.6.2}/README.md +7 -5
- {llmsetup-0.6.1 → llmsetup-0.6.2}/pyproject.toml +2 -2
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup/connect.py +32 -1
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup/runtimes/llamacpp.py +2 -2
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup/runtimes/lmstudio.py +2 -2
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup/runtimes/ollama.py +2 -2
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup/runtimes/vllm.py +2 -2
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup/util/log.py +31 -2
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup/util/proc.py +28 -6
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup/version.py +1 -1
- {llmsetup-0.6.1 → llmsetup-0.6.2/src/llmsetup.egg-info}/PKG-INFO +9 -7
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup.egg-info/SOURCES.txt +3 -0
- llmsetup-0.6.2/tests/test_connect_vscode_agents.py +50 -0
- llmsetup-0.6.2/tests/test_console_encoding.py +49 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/tests/test_module_entrypoint.py +1 -1
- llmsetup-0.6.2/tests/test_version_line.py +59 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/LICENSE +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/NOTICE +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/setup.cfg +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup/__main__.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup/bench/__init__.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup/bench/sweep.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup/catalog/__init__.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup/catalog/autoupdate.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup/catalog/catalog.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup/catalog/data/models.yaml +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup/catalog/discover.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup/catalog/hub.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup/catalog/refresh.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup/changes.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup/chat.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup/cli.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup/download.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup/gguf.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup/hardware/__init__.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup/hardware/bandwidth.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup/hardware/cpu.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup/hardware/detect.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup/hardware/gpu.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup/interop/__init__.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup/interop/export.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup/interop/jan.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup/interop/llama_swap.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup/interop/lmstudio.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup/interop/ollama.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup/interop/openai_clients.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup/interview/__init__.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup/interview/questions.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup/interview/wizard.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup/launch.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup/pipeline.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup/planner/__init__.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup/planner/memory.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup/planner/model_fit.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup/planner/moe.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup/planner/plan.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup/planner/requested.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup/planner/score.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup/repair/__init__.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup/repair/loop.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup/repair/strategies.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup/report/__init__.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup/report/render.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup/runtimes/__init__.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup/runtimes/base.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup/runtimes/capabilities.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup/runtimes/data/llamacpp_flags.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup/runtimes/dependencies.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup/runtimes/gguf_store.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup/runtimes/install.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup/runtimes/mlx.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup/runtimes/registry.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup/runtimes/tabby.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup/server.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup/tuning/__init__.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup/tuning/advanced.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup/tuning/overrides.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup/tuning/platform_tuning.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup/tuning/profiles.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup/tuning/publisher.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup/tuning/sampling.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup/tuning/tuner.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup/types.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup/ui/__init__.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup/ui/server.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup/ui/static/index.html +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup/util/__init__.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup/util/errors.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup/util/fs.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup/util/http.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup/util/modelfile.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup/util/units.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup/verify/__init__.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup/verify/checks.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup/verify/client.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup/verify/harness.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup/verify/signatures.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup.egg-info/dependency_links.txt +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup.egg-info/entry_points.txt +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup.egg-info/requires.txt +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/src/llmsetup.egg-info/top_level.txt +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/tests/test_advanced_tuning.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/tests/test_attention_and_drafting.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/tests/test_auto_detection.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/tests/test_auto_recovery.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/tests/test_autoupdate.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/tests/test_background_server.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/tests/test_capabilities.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/tests/test_catalog.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/tests/test_catalog_boundaries.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/tests/test_catalog_refresh.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/tests/test_catalog_validation.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/tests/test_changes.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/tests/test_chat.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/tests/test_cli.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/tests/test_cli_inputs.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/tests/test_connect.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/tests/test_console_wrap.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/tests/test_context_profile.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/tests/test_dense_offload.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/tests/test_dependency_compatibility.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/tests/test_disconnect.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/tests/test_download_integrity.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/tests/test_embedding_setup.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/tests/test_flag_coverage.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/tests/test_forum_practice.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/tests/test_gguf.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/tests/test_gpu_detection.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/tests/test_hub_models.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/tests/test_hybrid_attention.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/tests/test_interop.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/tests/test_interview.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/tests/test_kv_quality.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/tests/test_launch_failures.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/tests/test_launch_matrix.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/tests/test_memory.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/tests/test_model_revisions.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/tests/test_multigpu_and_apple.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/tests/test_offline_integration.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/tests/test_ollama.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/tests/test_ollama_live.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/tests/test_opencode_snippet.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/tests/test_overrides.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/tests/test_plan_reporting.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/tests/test_planner.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/tests/test_prefill.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/tests/test_release_script.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/tests/test_repair.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/tests/test_repair_provisioning.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/tests/test_report_next_steps.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/tests/test_reproducibility.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/tests/test_requested_model_planner.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/tests/test_research_config.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/tests/test_runtime_dependencies.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/tests/test_runtime_install.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/tests/test_security.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/tests/test_server_logs.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/tests/test_setups.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/tests/test_specific_model_interview.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/tests/test_specific_model_recovery.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/tests/test_specific_model_tuning.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/tests/test_start.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/tests/test_startup_recovery.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/tests/test_stop_waits_for_port.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/tests/test_sweep.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/tests/test_tool_parsers.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/tests/test_tuner.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/tests/test_ui.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/tests/test_verification_integrity.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/tests/test_verify.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/tests/test_vision.py +0 -0
- {llmsetup-0.6.1 → llmsetup-0.6.2}/tests/test_vllm_kv.py +0 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: llmsetup
|
|
3
|
-
Version: 0.6.
|
|
3
|
+
Version: 0.6.2
|
|
4
4
|
Summary: Run any open-weight LLM locally in one command: picks and tunes a model for your hardware (any Hugging Face GGUF, abliterated variants too), proves it works, and connects it to Claude Code, OpenCode, Aider, Continue, Zed or Goose. Every change can be undone.
|
|
5
5
|
License-Expression: Apache-2.0
|
|
6
6
|
Project-URL: Homepage, https://github.com/catfish-1234/llmsetup
|
|
7
7
|
Project-URL: Source, https://github.com/catfish-1234/llmsetup
|
|
8
8
|
Project-URL: Issues, https://github.com/catfish-1234/llmsetup/issues
|
|
9
9
|
Project-URL: Documentation, https://github.com/catfish-1234/llmsetup#readme
|
|
10
|
-
Keywords: llm,local-llm,local-ai,gguf,ollama,llama.cpp,lm-studio,vllm,mlx,huggingface,quantization,inference,claude-code,opencode,aider,coding-agent,abliterated,self-hosted
|
|
10
|
+
Keywords: llm,local-llm,local-ai,gguf,ollama,llama.cpp,lm-studio,vllm,mlx,huggingface,quantization,inference,claude-code,opencode,aider,cline,roo-code,coding-agent,abliterated,self-hosted
|
|
11
11
|
Classifier: Development Status :: 4 - Beta
|
|
12
12
|
Classifier: Environment :: Console
|
|
13
13
|
Classifier: Intended Audience :: Developers
|
|
@@ -48,7 +48,7 @@ Dynamic: license-file
|
|
|
48
48
|
```bash
|
|
49
49
|
pip install llmsetup
|
|
50
50
|
llmsetup setup # finds your hardware, picks and tunes a model, starts it, proves it works
|
|
51
|
-
llmsetup connect claude-code # or opencode, aider, continue, zed, goose,
|
|
51
|
+
llmsetup connect claude-code # or opencode, aider, cline, continue, zed, goose, ...
|
|
52
52
|
llmsetup undo # put back everything it changed
|
|
53
53
|
```
|
|
54
54
|
|
|
@@ -62,8 +62,9 @@ llmsetup undo # put back everything it changed
|
|
|
62
62
|
calls, long context, vision) before calling the setup done, and repairs or
|
|
63
63
|
falls back on its own when something fails.
|
|
64
64
|
- **Connected.** It writes the model into OpenCode, Continue, Aider, Zed, Qwen
|
|
65
|
-
Code and Goose configs, prints Claude Code's and Codex's launch settings
|
|
66
|
-
|
|
65
|
+
Code and Goose configs, prints Claude Code's and Codex's launch settings and
|
|
66
|
+
what to enter in Cline, Roo Code and Kilo Code, and registers it with Ollama,
|
|
67
|
+
LM Studio and Jan.
|
|
67
68
|
- **Reversible.** Every change outside its own folder is recorded; `llmsetup
|
|
68
69
|
undo` reverses a run and `llmsetup disconnect` takes a tool back off.
|
|
69
70
|
|
|
@@ -268,6 +269,7 @@ llmsetup connect goose # its own provider file, then how to start Goos
|
|
|
268
269
|
llmsetup connect claude-code # the launch command; --project writes .claude/settings.local.json
|
|
269
270
|
llmsetup connect codex # the ~/.codex/config.toml provider and profile
|
|
270
271
|
llmsetup connect crush # the crushrc lines that add it
|
|
272
|
+
llmsetup connect cline # what to enter in its settings (also roo-code, kilo-code)
|
|
271
273
|
```
|
|
272
274
|
|
|
273
275
|
It merges an llmsetup entry and keeps everything else in the file, replaces
|
|
@@ -277,8 +279,8 @@ loses them. Goose keeps each custom provider in a file of its own, so `connect
|
|
|
277
279
|
goose` writes `custom_providers/llmsetup.json` and says how to start a session
|
|
278
280
|
on it; a server key stays in the `LLMSETUP_API_KEY` environment variable rather
|
|
279
281
|
than the file. Crush now reads `crushrc` command files, so `connect crush`
|
|
280
|
-
prints the lines to add. Open WebUI and
|
|
281
|
-
so `connect` prints
|
|
282
|
+
prints the lines to add. Open WebUI, Cursor, Cline, Roo Code and Kilo Code are set up in
|
|
283
|
+
their own screens, so `connect` prints what to enter there. Claude Code needs a server that speaks the Anthropic Messages
|
|
282
284
|
API (llama.cpp from January 2026, Ollama, LM Studio 0.4.1 or later) and its
|
|
283
285
|
prompts need at least 32K tokens of context; `connect claude-code` prints the
|
|
284
286
|
per-launch command, and writes settings only for one project with `--project`,
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
```bash
|
|
11
11
|
pip install llmsetup
|
|
12
12
|
llmsetup setup # finds your hardware, picks and tunes a model, starts it, proves it works
|
|
13
|
-
llmsetup connect claude-code # or opencode, aider, continue, zed, goose,
|
|
13
|
+
llmsetup connect claude-code # or opencode, aider, cline, continue, zed, goose, ...
|
|
14
14
|
llmsetup undo # put back everything it changed
|
|
15
15
|
```
|
|
16
16
|
|
|
@@ -24,8 +24,9 @@ llmsetup undo # put back everything it changed
|
|
|
24
24
|
calls, long context, vision) before calling the setup done, and repairs or
|
|
25
25
|
falls back on its own when something fails.
|
|
26
26
|
- **Connected.** It writes the model into OpenCode, Continue, Aider, Zed, Qwen
|
|
27
|
-
Code and Goose configs, prints Claude Code's and Codex's launch settings
|
|
28
|
-
|
|
27
|
+
Code and Goose configs, prints Claude Code's and Codex's launch settings and
|
|
28
|
+
what to enter in Cline, Roo Code and Kilo Code, and registers it with Ollama,
|
|
29
|
+
LM Studio and Jan.
|
|
29
30
|
- **Reversible.** Every change outside its own folder is recorded; `llmsetup
|
|
30
31
|
undo` reverses a run and `llmsetup disconnect` takes a tool back off.
|
|
31
32
|
|
|
@@ -230,6 +231,7 @@ llmsetup connect goose # its own provider file, then how to start Goos
|
|
|
230
231
|
llmsetup connect claude-code # the launch command; --project writes .claude/settings.local.json
|
|
231
232
|
llmsetup connect codex # the ~/.codex/config.toml provider and profile
|
|
232
233
|
llmsetup connect crush # the crushrc lines that add it
|
|
234
|
+
llmsetup connect cline # what to enter in its settings (also roo-code, kilo-code)
|
|
233
235
|
```
|
|
234
236
|
|
|
235
237
|
It merges an llmsetup entry and keeps everything else in the file, replaces
|
|
@@ -239,8 +241,8 @@ loses them. Goose keeps each custom provider in a file of its own, so `connect
|
|
|
239
241
|
goose` writes `custom_providers/llmsetup.json` and says how to start a session
|
|
240
242
|
on it; a server key stays in the `LLMSETUP_API_KEY` environment variable rather
|
|
241
243
|
than the file. Crush now reads `crushrc` command files, so `connect crush`
|
|
242
|
-
prints the lines to add. Open WebUI and
|
|
243
|
-
so `connect` prints
|
|
244
|
+
prints the lines to add. Open WebUI, Cursor, Cline, Roo Code and Kilo Code are set up in
|
|
245
|
+
their own screens, so `connect` prints what to enter there. Claude Code needs a server that speaks the Anthropic Messages
|
|
244
246
|
API (llama.cpp from January 2026, Ollama, LM Studio 0.4.1 or later) and its
|
|
245
247
|
prompts need at least 32K tokens of context; `connect claude-code` prints the
|
|
246
248
|
per-launch command, and writes settings only for one project with `--project`,
|
|
@@ -11,14 +11,14 @@ build-backend = "setuptools.build_meta"
|
|
|
11
11
|
|
|
12
12
|
[project]
|
|
13
13
|
name = "llmsetup"
|
|
14
|
-
version = "0.6.
|
|
14
|
+
version = "0.6.2"
|
|
15
15
|
description = "Run any open-weight LLM locally in one command: picks and tunes a model for your hardware (any Hugging Face GGUF, abliterated variants too), proves it works, and connects it to Claude Code, OpenCode, Aider, Continue, Zed or Goose. Every change can be undone."
|
|
16
16
|
readme = "README.md"
|
|
17
17
|
requires-python = ">=3.9"
|
|
18
18
|
license = "Apache-2.0"
|
|
19
19
|
license-files = ["LICENSE", "NOTICE"]
|
|
20
20
|
keywords = ["llm", "local-llm", "local-ai", "gguf", "ollama", "llama.cpp", "lm-studio", "vllm", "mlx",
|
|
21
|
-
"huggingface", "quantization", "inference", "claude-code", "opencode", "aider", "coding-agent",
|
|
21
|
+
"huggingface", "quantization", "inference", "claude-code", "opencode", "aider", "cline", "roo-code", "coding-agent",
|
|
22
22
|
"abliterated", "self-hosted"]
|
|
23
23
|
classifiers = [
|
|
24
24
|
"Development Status :: 4 - Beta",
|
|
@@ -14,6 +14,7 @@ Tools configured only through their own UI (Open WebUI, Cursor) get the exact st
|
|
|
14
14
|
|
|
15
15
|
from __future__ import annotations
|
|
16
16
|
|
|
17
|
+
import functools
|
|
17
18
|
import json
|
|
18
19
|
import os
|
|
19
20
|
import platform
|
|
@@ -361,6 +362,35 @@ def codex_steps(target: Target) -> Dict[str, str]:
|
|
|
361
362
|
}
|
|
362
363
|
|
|
363
364
|
|
|
365
|
+
#: Coding agents that live in a VS Code panel and keep their provider settings in VS Code's own
|
|
366
|
+
#: storage rather than a file, all reaching a local server through an "OpenAI Compatible" provider.
|
|
367
|
+
#: Roo Code and Kilo Code are forks of Cline and share its settings screen.
|
|
368
|
+
VSCODE_AGENTS = {"cline": "Cline", "roo_code": "Roo Code", "kilo_code": "Kilo Code"}
|
|
369
|
+
|
|
370
|
+
#: Their system prompt and tool descriptions take thousands of tokens on every request.
|
|
371
|
+
VSCODE_AGENT_MIN_CONTEXT = 32768
|
|
372
|
+
|
|
373
|
+
|
|
374
|
+
def vscode_agent_steps(harness_id: str, target: Target) -> Dict[str, str]:
|
|
375
|
+
name = VSCODE_AGENTS[harness_id]
|
|
376
|
+
context = target.config.context_tokens
|
|
377
|
+
note = ""
|
|
378
|
+
if context < VSCODE_AGENT_MIN_CONTEXT:
|
|
379
|
+
note = (f"\nThe verified context is {context:,} tokens. {name} sends a long system prompt and its "
|
|
380
|
+
f"tool descriptions with every request, which leaves little of that for your code; rerun "
|
|
381
|
+
f"setup with --set context_tokens={VSCODE_AGENT_MIN_CONTEXT * 2} if it fits.\n")
|
|
382
|
+
return {
|
|
383
|
+
"name": name,
|
|
384
|
+
"path": f"{name}'s settings (the gear in its VS Code panel), under API Provider",
|
|
385
|
+
"format": "text",
|
|
386
|
+
"content": (f"API Provider: OpenAI Compatible\n"
|
|
387
|
+
f"Base URL: {target.base}\n"
|
|
388
|
+
f"API Key: {target.api_key or DUMMY_KEY}\n"
|
|
389
|
+
f"Model ID: {target.model}\n"
|
|
390
|
+
f"Context window: {context} (in the model's configuration below those)\n{note}"),
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
|
|
364
394
|
# --------------------------------------------------------------------------- #
|
|
365
395
|
# taking llmsetup's entries back out: `llmsetup disconnect`
|
|
366
396
|
# --------------------------------------------------------------------------- #
|
|
@@ -473,10 +503,11 @@ STEPS: Dict[str, Callable[[Target], Dict[str, str]]] = {
|
|
|
473
503
|
"claude_code": claude_code_steps,
|
|
474
504
|
"codex": codex_steps,
|
|
475
505
|
"crush": crush_steps,
|
|
506
|
+
**{agent: functools.partial(vscode_agent_steps, agent) for agent in VSCODE_AGENTS},
|
|
476
507
|
}
|
|
477
508
|
|
|
478
509
|
#: Configured in the tool's own interface, or through a file connect does not edit: it prints the steps.
|
|
479
|
-
INSTRUCTIONS_ONLY = {"open_webui", "cursor", "custom_openai", "codex", "crush"}
|
|
510
|
+
INSTRUCTIONS_ONLY = {"open_webui", "cursor", "custom_openai", "codex", "crush", *VSCODE_AGENTS}
|
|
480
511
|
|
|
481
512
|
|
|
482
513
|
# --------------------------------------------------------------------------- #
|
|
@@ -20,7 +20,7 @@ from llmsetup.types import ModelSpec, RuntimeConfig
|
|
|
20
20
|
from llmsetup.util import http
|
|
21
21
|
from llmsetup.util.fs import app_dir, ensure_dir
|
|
22
22
|
from llmsetup.util.log import Console
|
|
23
|
-
from llmsetup.util.proc import
|
|
23
|
+
from llmsetup.util.proc import run, spawn, version_line, which
|
|
24
24
|
|
|
25
25
|
#: Flags that stand alone, so filtering must not swallow the token after them.
|
|
26
26
|
_VALUELESS_FLAGS = {
|
|
@@ -59,7 +59,7 @@ class LlamaCppRuntime(Runtime):
|
|
|
59
59
|
|
|
60
60
|
def version(self) -> Optional[str]:
|
|
61
61
|
result = run([self.binary, "--version"], timeout=15)
|
|
62
|
-
return
|
|
62
|
+
return version_line(result.output) if result.output else None
|
|
63
63
|
|
|
64
64
|
def ensure_model(self, spec: ModelSpec, config: RuntimeConfig,
|
|
65
65
|
console: Console) -> RuntimeConfig:
|
|
@@ -18,7 +18,7 @@ from llmsetup.runtimes.registry import register
|
|
|
18
18
|
from llmsetup.types import ModelSpec, RuntimeConfig
|
|
19
19
|
from llmsetup.util import http
|
|
20
20
|
from llmsetup.util.log import Console
|
|
21
|
-
from llmsetup.util.proc import
|
|
21
|
+
from llmsetup.util.proc import format_command, run, version_line, which
|
|
22
22
|
|
|
23
23
|
DEFAULT_PORT = 1234
|
|
24
24
|
|
|
@@ -49,7 +49,7 @@ class LmStudioRuntime(Runtime):
|
|
|
49
49
|
|
|
50
50
|
def version(self) -> Optional[str]:
|
|
51
51
|
result = run(["lms", "version"], timeout=10)
|
|
52
|
-
return
|
|
52
|
+
return version_line(result.output) if result.ok else None
|
|
53
53
|
|
|
54
54
|
def ensure_model(self, spec: ModelSpec, config: RuntimeConfig,
|
|
55
55
|
console: Console) -> RuntimeConfig:
|
|
@@ -24,7 +24,7 @@ from llmsetup.util import http
|
|
|
24
24
|
from llmsetup.util.fs import app_dir, ensure_dir, write_text
|
|
25
25
|
from llmsetup.util.log import Console
|
|
26
26
|
from llmsetup.util.modelfile import modelfile_bare, modelfile_string, modelfile_text
|
|
27
|
-
from llmsetup.util.proc import
|
|
27
|
+
from llmsetup.util.proc import format_command, run, spawn, version_line, which
|
|
28
28
|
|
|
29
29
|
DEFAULT_PORT = 11434
|
|
30
30
|
|
|
@@ -48,7 +48,7 @@ class OllamaRuntime(Runtime):
|
|
|
48
48
|
|
|
49
49
|
def version(self) -> Optional[str]:
|
|
50
50
|
result = run(["ollama", "--version"], timeout=10)
|
|
51
|
-
return
|
|
51
|
+
return version_line(result.output) if result.ok else None
|
|
52
52
|
|
|
53
53
|
def derived_name(self, spec: ModelSpec) -> str:
|
|
54
54
|
"""Tag for our tuned variant. Kept distinct so we never shadow their model."""
|
|
@@ -20,7 +20,7 @@ from llmsetup.types import ModelSpec, RuntimeConfig
|
|
|
20
20
|
from llmsetup.util import http
|
|
21
21
|
from llmsetup.util.fs import app_dir, ensure_dir
|
|
22
22
|
from llmsetup.util.log import Console
|
|
23
|
-
from llmsetup.util.proc import
|
|
23
|
+
from llmsetup.util.proc import run, spawn, version_line, which
|
|
24
24
|
|
|
25
25
|
DEFAULT_PORT = 8000
|
|
26
26
|
|
|
@@ -59,7 +59,7 @@ class VllmRuntime(Runtime):
|
|
|
59
59
|
|
|
60
60
|
def version(self) -> Optional[str]:
|
|
61
61
|
result = run(["vllm", "--version"], timeout=30)
|
|
62
|
-
return
|
|
62
|
+
return version_line(result.output) if result.ok else None
|
|
63
63
|
|
|
64
64
|
def supports(self, spec: ModelSpec) -> bool:
|
|
65
65
|
return bool(spec.hf_repo)
|
|
@@ -48,13 +48,42 @@ def wrap_line(line: str, columns: int) -> str:
|
|
|
48
48
|
return "\n".join(rows)
|
|
49
49
|
|
|
50
50
|
|
|
51
|
+
# Plain stand-ins for the symbols llmsetup prints, used when the stream's
|
|
52
|
+
# encoding has no room for them. Output piped or redirected on Windows is
|
|
53
|
+
# cp1252, and Python writes what cp1252 lacks to stderr as "✓" escapes
|
|
54
|
+
# rather than failing, so those escapes would land in a pasted bug report.
|
|
55
|
+
_PLAIN = {"✓": "+", "✗": "x", "→": "->", "…": "..."}
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
def _encodable(text: str, encoding: str) -> str:
|
|
59
|
+
"""`text` with each character `encoding` lacks swapped for a stand-in or "?"."""
|
|
60
|
+
try:
|
|
61
|
+
text.encode(encoding)
|
|
62
|
+
return text
|
|
63
|
+
except UnicodeEncodeError:
|
|
64
|
+
pass
|
|
65
|
+
out = []
|
|
66
|
+
for char in text:
|
|
67
|
+
try:
|
|
68
|
+
char.encode(encoding)
|
|
69
|
+
out.append(char)
|
|
70
|
+
except UnicodeEncodeError:
|
|
71
|
+
out.append(_PLAIN.get(char, "?"))
|
|
72
|
+
return "".join(out)
|
|
73
|
+
|
|
74
|
+
|
|
51
75
|
def write_console(stream: TextIO, text: str) -> None:
|
|
52
76
|
"""Keep legacy Windows consoles usable without changing their code page."""
|
|
77
|
+
encoding = getattr(stream, "encoding", None)
|
|
78
|
+
if encoding:
|
|
79
|
+
try:
|
|
80
|
+
text = _encodable(text, encoding)
|
|
81
|
+
except LookupError:
|
|
82
|
+
pass
|
|
53
83
|
try:
|
|
54
84
|
stream.write(text)
|
|
55
85
|
except UnicodeEncodeError:
|
|
56
|
-
|
|
57
|
-
stream.write(text.encode(encoding, errors="replace").decode(encoding))
|
|
86
|
+
stream.write(_encodable(text, "ascii"))
|
|
58
87
|
stream.flush()
|
|
59
88
|
|
|
60
89
|
|
|
@@ -8,6 +8,7 @@ so "the command failed" is normal control flow here, not an error.
|
|
|
8
8
|
from __future__ import annotations
|
|
9
9
|
|
|
10
10
|
import os
|
|
11
|
+
import re
|
|
11
12
|
import shlex
|
|
12
13
|
import shutil
|
|
13
14
|
import subprocess
|
|
@@ -121,12 +122,33 @@ def spawn(
|
|
|
121
122
|
hint=f"Rerun: {format_command(cmd)}") from None
|
|
122
123
|
|
|
123
124
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
125
|
+
_TERMINAL_ESCAPE = re.compile(r"\x1b\[[0-9;?]*[A-Za-z]")
|
|
126
|
+
# "version: 4743 (d07c6213)", "client version is 0.32.1", "version 1.2"
|
|
127
|
+
_NAMED_VERSION = re.compile(r"\bversion\b[\s:=]*(?:is\s+)?v?\d", re.IGNORECASE)
|
|
128
|
+
_DOTTED_NUMBER = re.compile(r"\d+\.\d+")
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
def version_line(text: str) -> str:
|
|
132
|
+
"""The line of an engine's version output that names its version.
|
|
133
|
+
|
|
134
|
+
The version is often not the first line: a CUDA build of llama.cpp lists
|
|
135
|
+
its GPUs first ("compute capability 8.6"), `ollama --version` warns that no
|
|
136
|
+
server is running before "client version is 0.32.1", and `lms version`
|
|
137
|
+
draws a coloured banner and gives only a commit. Prefer a line where the
|
|
138
|
+
word "version" is followed by a number, then a bare dotted number (vLLM
|
|
139
|
+
prints just "0.6.3"), then a commit, then the first line.
|
|
140
|
+
"""
|
|
141
|
+
lines = [_TERMINAL_ESCAPE.sub("", line).strip() for line in text.splitlines()]
|
|
142
|
+
lines = [line for line in lines if line]
|
|
143
|
+
|
|
144
|
+
def find(test) -> Optional[str]:
|
|
145
|
+
return next((line for line in lines if test(line)), None)
|
|
146
|
+
|
|
147
|
+
line = (find(_NAMED_VERSION.search)
|
|
148
|
+
or find(_DOTTED_NUMBER.search)
|
|
149
|
+
or find(lambda row: "commit" in row.lower())
|
|
150
|
+
or (lines[0] if lines else ""))
|
|
151
|
+
return re.sub(r"^(?:warning|info)\s*:\s*", "", line, flags=re.IGNORECASE)
|
|
130
152
|
|
|
131
153
|
|
|
132
154
|
def _decode(value) -> str:
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: llmsetup
|
|
3
|
-
Version: 0.6.
|
|
3
|
+
Version: 0.6.2
|
|
4
4
|
Summary: Run any open-weight LLM locally in one command: picks and tunes a model for your hardware (any Hugging Face GGUF, abliterated variants too), proves it works, and connects it to Claude Code, OpenCode, Aider, Continue, Zed or Goose. Every change can be undone.
|
|
5
5
|
License-Expression: Apache-2.0
|
|
6
6
|
Project-URL: Homepage, https://github.com/catfish-1234/llmsetup
|
|
7
7
|
Project-URL: Source, https://github.com/catfish-1234/llmsetup
|
|
8
8
|
Project-URL: Issues, https://github.com/catfish-1234/llmsetup/issues
|
|
9
9
|
Project-URL: Documentation, https://github.com/catfish-1234/llmsetup#readme
|
|
10
|
-
Keywords: llm,local-llm,local-ai,gguf,ollama,llama.cpp,lm-studio,vllm,mlx,huggingface,quantization,inference,claude-code,opencode,aider,coding-agent,abliterated,self-hosted
|
|
10
|
+
Keywords: llm,local-llm,local-ai,gguf,ollama,llama.cpp,lm-studio,vllm,mlx,huggingface,quantization,inference,claude-code,opencode,aider,cline,roo-code,coding-agent,abliterated,self-hosted
|
|
11
11
|
Classifier: Development Status :: 4 - Beta
|
|
12
12
|
Classifier: Environment :: Console
|
|
13
13
|
Classifier: Intended Audience :: Developers
|
|
@@ -48,7 +48,7 @@ Dynamic: license-file
|
|
|
48
48
|
```bash
|
|
49
49
|
pip install llmsetup
|
|
50
50
|
llmsetup setup # finds your hardware, picks and tunes a model, starts it, proves it works
|
|
51
|
-
llmsetup connect claude-code # or opencode, aider, continue, zed, goose,
|
|
51
|
+
llmsetup connect claude-code # or opencode, aider, cline, continue, zed, goose, ...
|
|
52
52
|
llmsetup undo # put back everything it changed
|
|
53
53
|
```
|
|
54
54
|
|
|
@@ -62,8 +62,9 @@ llmsetup undo # put back everything it changed
|
|
|
62
62
|
calls, long context, vision) before calling the setup done, and repairs or
|
|
63
63
|
falls back on its own when something fails.
|
|
64
64
|
- **Connected.** It writes the model into OpenCode, Continue, Aider, Zed, Qwen
|
|
65
|
-
Code and Goose configs, prints Claude Code's and Codex's launch settings
|
|
66
|
-
|
|
65
|
+
Code and Goose configs, prints Claude Code's and Codex's launch settings and
|
|
66
|
+
what to enter in Cline, Roo Code and Kilo Code, and registers it with Ollama,
|
|
67
|
+
LM Studio and Jan.
|
|
67
68
|
- **Reversible.** Every change outside its own folder is recorded; `llmsetup
|
|
68
69
|
undo` reverses a run and `llmsetup disconnect` takes a tool back off.
|
|
69
70
|
|
|
@@ -268,6 +269,7 @@ llmsetup connect goose # its own provider file, then how to start Goos
|
|
|
268
269
|
llmsetup connect claude-code # the launch command; --project writes .claude/settings.local.json
|
|
269
270
|
llmsetup connect codex # the ~/.codex/config.toml provider and profile
|
|
270
271
|
llmsetup connect crush # the crushrc lines that add it
|
|
272
|
+
llmsetup connect cline # what to enter in its settings (also roo-code, kilo-code)
|
|
271
273
|
```
|
|
272
274
|
|
|
273
275
|
It merges an llmsetup entry and keeps everything else in the file, replaces
|
|
@@ -277,8 +279,8 @@ loses them. Goose keeps each custom provider in a file of its own, so `connect
|
|
|
277
279
|
goose` writes `custom_providers/llmsetup.json` and says how to start a session
|
|
278
280
|
on it; a server key stays in the `LLMSETUP_API_KEY` environment variable rather
|
|
279
281
|
than the file. Crush now reads `crushrc` command files, so `connect crush`
|
|
280
|
-
prints the lines to add. Open WebUI and
|
|
281
|
-
so `connect` prints
|
|
282
|
+
prints the lines to add. Open WebUI, Cursor, Cline, Roo Code and Kilo Code are set up in
|
|
283
|
+
their own screens, so `connect` prints what to enter there. Claude Code needs a server that speaks the Anthropic Messages
|
|
282
284
|
API (llama.cpp from January 2026, Ollama, LM Studio 0.4.1 or later) and its
|
|
283
285
|
prompts need at least 32K tokens of context; `connect claude-code` prints the
|
|
284
286
|
per-launch command, and writes settings only for one project with `--project`,
|
|
@@ -110,6 +110,8 @@ tests/test_chat.py
|
|
|
110
110
|
tests/test_cli.py
|
|
111
111
|
tests/test_cli_inputs.py
|
|
112
112
|
tests/test_connect.py
|
|
113
|
+
tests/test_connect_vscode_agents.py
|
|
114
|
+
tests/test_console_encoding.py
|
|
113
115
|
tests/test_console_wrap.py
|
|
114
116
|
tests/test_context_profile.py
|
|
115
117
|
tests/test_dense_offload.py
|
|
@@ -164,5 +166,6 @@ tests/test_tuner.py
|
|
|
164
166
|
tests/test_ui.py
|
|
165
167
|
tests/test_verification_integrity.py
|
|
166
168
|
tests/test_verify.py
|
|
169
|
+
tests/test_version_line.py
|
|
167
170
|
tests/test_vision.py
|
|
168
171
|
tests/test_vllm_kv.py
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"""Cline, Roo Code and Kilo Code keep their provider in VS Code's own storage, so
|
|
2
|
+
`llmsetup connect` prints what to enter on their settings screen."""
|
|
3
|
+
|
|
4
|
+
from __future__ import annotations
|
|
5
|
+
|
|
6
|
+
import pytest
|
|
7
|
+
|
|
8
|
+
from llmsetup.cli import main
|
|
9
|
+
from llmsetup.connect import Target, vscode_agent_steps
|
|
10
|
+
from llmsetup.runtimes.base import Endpoint
|
|
11
|
+
from llmsetup.types import RuntimeConfig
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@pytest.fixture
|
|
15
|
+
def target(catalog):
|
|
16
|
+
endpoint = Endpoint(base_url="http://127.0.0.1:8080", model="qwen3-coder", runtime="llama.cpp")
|
|
17
|
+
config = RuntimeConfig(runtime="llama.cpp", model_id="qwen3-8b", quant="Q4_K_M", context_tokens=65536)
|
|
18
|
+
return Target(endpoint=endpoint, spec=catalog.require("qwen3-8b"), config=config)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
@pytest.mark.parametrize("name, label", [("cline", "Cline"), ("roo-code", "Roo Code"),
|
|
22
|
+
("kilo-code", "Kilo Code")])
|
|
23
|
+
def test_connect_prints_the_openai_compatible_provider_settings(capsys, name, label):
|
|
24
|
+
assert main(["connect", name, "--base-url", "http://127.0.0.1:8080", "--model", "local"]) == 0
|
|
25
|
+
out = capsys.readouterr().out
|
|
26
|
+
assert label in out
|
|
27
|
+
assert "API Provider: OpenAI Compatible" in out
|
|
28
|
+
assert "Base URL: http://127.0.0.1:8080/v1" in out
|
|
29
|
+
assert "Model ID: local" in out
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
def test_the_server_key_is_given_when_there_is_one(target):
|
|
33
|
+
target.endpoint.headers["Authorization"] = "Bearer s3cret"
|
|
34
|
+
assert "API Key: s3cret" in vscode_agent_steps("cline", target)["content"]
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def test_a_small_context_gets_a_warning_and_a_large_one_does_not(target):
|
|
38
|
+
content = vscode_agent_steps("roo_code", target)["content"]
|
|
39
|
+
assert "Context window: 65536" in content and "--set context_tokens" not in content
|
|
40
|
+
target.config.context_tokens = 8192
|
|
41
|
+
assert "--set context_tokens=65536" in vscode_agent_steps("roo_code", target)["content"]
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def test_they_are_listed_and_disconnect_says_there_is_nothing_to_remove(capsys):
|
|
45
|
+
assert main(["connect", "--list"]) == 0
|
|
46
|
+
out = capsys.readouterr().out
|
|
47
|
+
for tool in ("cline", "roo_code", "kilo_code"):
|
|
48
|
+
assert f" {tool} " in out
|
|
49
|
+
assert main(["disconnect", "kilo-code"]) == 1
|
|
50
|
+
assert "only printed steps for kilo-code" in capsys.readouterr().err
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"""Output piped or redirected on Windows is cp1252, which has no check mark.
|
|
2
|
+
|
|
3
|
+
Python writes such characters to stderr as "\\u2713" escapes instead of failing,
|
|
4
|
+
so the console has to swap in plain stand-ins itself.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
import io
|
|
8
|
+
|
|
9
|
+
from llmsetup.util.log import Console, write_console
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def _stream(encoding: str, errors: str) -> io.TextIOWrapper:
|
|
13
|
+
return io.TextIOWrapper(io.BytesIO(), encoding=encoding, errors=errors, newline="\n")
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def _written(stream: io.TextIOWrapper) -> str:
|
|
17
|
+
stream.flush()
|
|
18
|
+
return stream.buffer.getvalue().decode(stream.encoding)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def test_cp1252_stderr_gets_plain_symbols_not_escapes():
|
|
22
|
+
stream = _stream("cp1252", "backslashreplace") # how Python opens stderr
|
|
23
|
+
console = Console(stream=stream, color=False)
|
|
24
|
+
console.ok("llama.cpp: installed")
|
|
25
|
+
console.error("verification failed")
|
|
26
|
+
console.info("Settings → Developer")
|
|
27
|
+
out = _written(stream)
|
|
28
|
+
assert "\\u" not in out
|
|
29
|
+
assert out == (" + llama.cpp: installed\n"
|
|
30
|
+
" x verification failed\n"
|
|
31
|
+
" Settings -> Developer\n")
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
def test_cp1252_strict_stream_does_not_raise():
|
|
35
|
+
stream = _stream("cp1252", "strict") # how Python opens a redirected stdout
|
|
36
|
+
write_console(stream, "✓ done … café 中\n")
|
|
37
|
+
assert _written(stream) == "+ done … café ?\n"
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def test_utf8_stream_keeps_the_symbols():
|
|
41
|
+
stream = _stream("utf-8", "strict")
|
|
42
|
+
Console(stream=stream, color=False).ok("installed")
|
|
43
|
+
assert _written(stream) == " ✓ installed\n"
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
def test_stream_without_an_encoding_is_written_unchanged():
|
|
47
|
+
stream = io.StringIO()
|
|
48
|
+
Console(stream=stream, color=False).ok("installed")
|
|
49
|
+
assert stream.getvalue() == " ✓ installed\n"
|
|
@@ -8,7 +8,7 @@ from pathlib import Path
|
|
|
8
8
|
import pytest
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
@pytest.mark.parametrize("flag,expected", [("--version", "llmsetup 0.6.
|
|
11
|
+
@pytest.mark.parametrize("flag,expected", [("--version", "llmsetup 0.6.2"),
|
|
12
12
|
("--help", "Pick, tune, verify")])
|
|
13
13
|
def test_module_entrypoint(flag, expected):
|
|
14
14
|
source = Path(__file__).resolve().parents[1] / "src"
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"""`llmsetup runtimes` shows each engine's version, taken from output that
|
|
2
|
+
often leads with banners, colour codes, warnings or GPU listings."""
|
|
3
|
+
|
|
4
|
+
from llmsetup.util.proc import version_line
|
|
5
|
+
|
|
6
|
+
LMS_VERSION = (
|
|
7
|
+
"\x1b[38;5;166m __ __ ___ ______ ___ _______ ____\x1b[0m\n"
|
|
8
|
+
"\x1b[38;5;214m / / / |/ / / __/ /___ _____/ (_)__ / ___/ / / _/\x1b[0m\n"
|
|
9
|
+
"\x1b[38;5;226m / /__/ /|_/ / _\\ \\/ __/ // / _ / / _ \\ / /__/ /___/ / \x1b[0m\n"
|
|
10
|
+
"\x1b[38;5;46m/____/_/ /_/ /___/\\__/\\_,_/\\_,_/_/\\___/ \\___/____/___/ \x1b[0m\n"
|
|
11
|
+
"\n"
|
|
12
|
+
"lms is LM Studio's CLI utility for your models, server, and inference runtime.\n"
|
|
13
|
+
"CLI commit: 71bd99c\n"
|
|
14
|
+
"\n"
|
|
15
|
+
"Docs: https://lmstudio.ai/docs/developer\n"
|
|
16
|
+
"Join our Discord: https://discord.gg/lmstudio\n"
|
|
17
|
+
)
|
|
18
|
+
|
|
19
|
+
LLAMACPP_CUDA_VERSION = (
|
|
20
|
+
"ggml_cuda_init: GGML_CUDA_FORCE_MMQ: no\n"
|
|
21
|
+
"ggml_cuda_init: GGML_CUDA_FORCE_CUBLAS: no\n"
|
|
22
|
+
"ggml_cuda_init: found 1 CUDA devices:\n"
|
|
23
|
+
" Device 0: NVIDIA GeForce RTX 3090, compute capability 8.6, VMM: yes\n"
|
|
24
|
+
"version: 4743 (d07c6213)\n"
|
|
25
|
+
"built with cc (Ubuntu 13.3.0) 13.3.0 for x86_64-linux-gnu\n"
|
|
26
|
+
)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def test_lm_studio_banner_gives_way_to_its_commit():
|
|
30
|
+
assert version_line(LMS_VERSION) == "CLI commit: 71bd99c"
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def test_ollama_without_a_running_server_reports_the_client_version():
|
|
34
|
+
output = ("Warning: could not connect to a running Ollama instance\n"
|
|
35
|
+
"Warning: client version is 0.32.1\n")
|
|
36
|
+
assert version_line(output) == "client version is 0.32.1"
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def test_ollama_with_a_running_server():
|
|
40
|
+
assert version_line("ollama version is 0.32.1\n") == "ollama version is 0.32.1"
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def test_llama_cpp_version_line_beats_the_gpu_listing_before_it():
|
|
44
|
+
assert version_line(LLAMACPP_CUDA_VERSION) == "version: 4743 (d07c6213)"
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
def test_llama_cpp_cpu_build():
|
|
48
|
+
output = ("version: 0.7.0-dev (build 11669, commit 620d2225c)\n"
|
|
49
|
+
"built with Clang 20.1.8 for Windows x86_64\n")
|
|
50
|
+
assert version_line(output) == "version: 0.7.0-dev (build 11669, commit 620d2225c)"
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
def test_bare_version_number_after_log_lines():
|
|
54
|
+
assert version_line("INFO starting up\n0.6.3\n") == "0.6.3"
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
def test_falls_back_to_the_first_line_and_handles_empty_output():
|
|
58
|
+
assert version_line("\n some engine \nmore\n") == "some engine"
|
|
59
|
+
assert version_line("") == ""
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|