Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ body:
attributes:
label: Package version
description: Output of `pip show local-llm-kit`
placeholder: "e.g. 0.2.0"
placeholder: "e.g. 0.3.0"
validations: { required: true }
- type: input
id: python
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ jobs:
run: >
python -c
"import local_llm_kit;
assert local_llm_kit.__version__ == '0.2.0', local_llm_kit.__version__;
from importlib.metadata import version;
assert local_llm_kit.__version__ == version('local-llm-kit'), local_llm_kit.__version__;
from local_llm_kit import LLM, chat, complete, add_function;
print('smoke OK', local_llm_kit.__version__)"

Expand Down
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.3.0] - 2026-10-17

### Added
- Native Apple Foundation Models adapter and apfel profile, including native schemas, fresh sessions, inline image attachments, exact token counting, cooperative timeouts and streaming stop handling.
- Server discovery, native capability metadata, `doctor` CLI and a locality guard that rejects unknown or remote routes.
Expand All @@ -31,7 +33,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Validation scope
- Core requirements remain Python 3.9+ with no new mandatory dependencies; Apple SDK and official SDK interoperability have separate version requirements.
- These are unreleased changes. Protocol/SDK tests do not establish performance superiority or certify every runtime/hardware combination.
- Protocol/SDK tests do not establish performance superiority or certify every runtime/hardware combination.

## [0.2.0] - 2026-10-17

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Thanks for contributing! This guide gets you from zero to a passing PR in ~10 minutes.

> **v0.2.0 context:** core install stays light (stdlib + `typing-extensions`, Python 3.9+).
> Core install stays light (stdlib + `typing-extensions`, Python 3.9+).
> Heavy deps (`torch`/`transformers`/`llama-cpp-python`/`fastapi`/`uvicorn`, etc.)
> are **optional extras, lazily imported** — never import them at module top-level in core paths.
> Keep the legacy API working: `LLM` / `chat()` / `complete()` / `add_function()`.
Expand Down
11 changes: 4 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,15 @@ Use OpenAI-shaped chat, streaming, tools and structured output while choosing
where your model runs. The core install needs only `typing-extensions`; model
engines and validation packages are optional.

**Development status:** PyPI **0.2.0** is the current release. Native Apple FM,
**Release 0.3.0** includes native Apple FM,
MCP, discovery, Responses, agents, hybrid retrieval, logging and the hardware
advisor below are **unreleased changes on this branch**. To try this branch:
advisor. Install or upgrade from PyPI:

```bash
git clone https://github.com/1Utkarsh1/Local-LLM-kit.git
cd Local-LLM-kit
git checkout feat/consolidated-community-upgrades
python -m pip install -e '.[structured,server]'
python -m pip install --upgrade local-llm-kit
```

For the released API, use the [0.2.0 documentation](https://github.com/1Utkarsh1/Local-LLM-kit/tree/v0.2.0).
For the released API, use the [0.3.0 documentation](https://github.com/1Utkarsh1/Local-LLM-kit/tree/v0.3.0).
No API key is needed for local inference. Prepare your engine, dependencies and
model weights before disconnecting from the internet.

Expand Down
4 changes: 2 additions & 2 deletions docs/source/advanced_features.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Agents, retrieval and local history
==================================
===================================

These features are unreleased additions. See the repository README for runnable
These features are available in 0.3.0. See the repository README for runnable
examples and :doc:`community_pr_review` for their provenance and review fixes.

Agents and structured output
Expand Down
4 changes: 3 additions & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@
# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

from local_llm_kit import __version__

project = "Local_LLM_Kit"
copyright = "2025, Utkarsh Rajput"
author = "Utkarsh Rajput"
release = "0.2.0"
release = __version__

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
Expand Down
4 changes: 2 additions & 2 deletions docs/source/discovery.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Discover servers and model capabilities
======================================
=======================================

These APIs are unreleased additions. ``discover()`` probes known loopback
These APIs are available in 0.3.0. ``discover()`` probes known loopback
endpoints concurrently without generating text. ``probe_endpoint(url)`` checks
one endpoint; extra URLs can be supplied to discovery. Authentication is not
handled by discovery, so an authenticated server may appear unavailable.
Expand Down
5 changes: 3 additions & 2 deletions docs/source/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ inference engine to be installed in the client environment.

python -m venv .venv
source .venv/bin/activate
pip install local-llm-kit
pip install --upgrade local-llm-kit

For unreleased features, install from the branch or checkout containing them:
Release 0.3.0 includes the discovery, MCP, agents and retrieval APIs documented
here. For development, install from a checkout:

.. code-block:: bash

Expand Down
8 changes: 3 additions & 5 deletions docs/source/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@ Quickstart
Install and run offline
-----------------------

The core package needs no GPU or model download. Unreleased features need a
source install until the next PyPI release.
The core package needs no GPU or model download. The examples here target
Local LLM Kit 0.3.0 or newer.

.. code-block:: bash

pip install local-llm-kit
# From a checkout, including unreleased changes:
pip install -e .
pip install --upgrade local-llm-kit

.. code-block:: python

Expand Down
6 changes: 3 additions & 3 deletions llms.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@

## Status

PyPI 0.2.0 is the stable release. Discovery, Apple FM, MCP, agents, validated structured output, hybrid retrieval, logging, hardware advice and Responses are unreleased additions on feat/consolidated-community-upgrades. Do not describe them as shipped in 0.2.0.
Release 0.3.0 includes discovery, Apple FM, MCP, agents, validated structured output, hybrid retrieval, logging, hardware advice and Responses. Install or upgrade with `python -m pip install --upgrade local-llm-kit`. These additions were not shipped in 0.2.0.

## API and fit

Use when an application needs an OpenAI-shaped Python chat/completion API across local runtimes, request-scoped tools, an offline echo fixture, or small retrieval helpers. Example: `LLM('echo', backend='echo').chat([{'role':'user','content':'Hi'}])`; answer text is `response['choices'][0]['message']['content']`.

In-process adapters: transformers, llamacpp, experimental airllm, native apple-fm. HTTP: native ollama and OpenAI-compatible presets vllm, sglang, lmstudio, localai, llama-server, jan, gpt4all, mlx-lm, koboldcpp, transformers-serve, apfel. Generic servers use openai-compat with base_url. A preset connects to an already-running engine; it does not host or install it. Features depend on the chosen model/runtime. These are compatibility options, not a usage ranking.

## Unreleased additions
## Additions in 0.3.0

- `discover`, `probe_endpoint`, `find_local_server` and CLI `doctor`: read native capability metadata when available. Unknown locality stays unknown. `LLM(..., require_local=True)` refuses unverified/remote execution and checks again before chat/completion. It trusts metadata and is not a network sandbox.
- HTTP adapters use `max_retries` (integer or RetryPolicy), default 2. Streaming retries only connection setup, never emitted output.
Expand All @@ -31,7 +31,7 @@ Core stays light. Native inference dependencies are optional and prepared weight
## References

- [Repository and quickstart](https://github.com/1Utkarsh1/Local-LLM-kit)
- [Released 0.2.0 API](https://github.com/1Utkarsh1/Local-LLM-kit/tree/v0.2.0)
- [Released 0.3.0 API](https://github.com/1Utkarsh1/Local-LLM-kit/tree/v0.3.0)
- [Backend compatibility](https://github.com/1Utkarsh1/Local-LLM-kit/blob/main/docs/source/backends.rst)
- [API reference](https://github.com/1Utkarsh1/Local-LLM-kit/blob/main/docs/source/api_reference.rst)
- [Examples](https://github.com/1Utkarsh1/Local-LLM-kit/tree/main/examples)
Expand Down
2 changes: 1 addition & 1 deletion local_llm_kit/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
are optional extras, lazily imported.
"""

__version__ = "0.2.0"
__version__ = "0.3.0"

from .chat import achat, acomplete, chat, complete, embed
from .discovery import (
Expand Down
4 changes: 3 additions & 1 deletion local_llm_kit/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
from typing import Any, Dict, List, Optional, Tuple
from urllib.parse import quote

from . import __version__

logger = logging.getLogger(__name__)

__all__ = [
Expand Down Expand Up @@ -308,7 +310,7 @@ def _download_url(url: str, dest_path: str, chunk_size: int = 1024 * 1024) -> st
if parent:
os.makedirs(parent, exist_ok=True)
part = None
req = urllib.request.Request(url, headers={"User-Agent": "local-llm-kit/0.2.0"})
req = urllib.request.Request(url, headers={"User-Agent": "local-llm-kit/" + __version__})
try:
with (
urllib.request.urlopen(req, timeout=30) as resp,
Expand Down
4 changes: 3 additions & 1 deletion local_llm_kit/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
import uuid
from typing import Any, Dict, List, Optional

from . import __version__

__all__ = ["create_app", "run", "main"]


Expand Down Expand Up @@ -722,7 +724,7 @@ def _error(message: str, status: int = 400, err_type: str = "invalid_request_err
content={"error": {"message": message, "type": err_type}},
)

app = FastAPI(title="local-llm-kit server", version="0.2.0")
app = FastAPI(title="local-llm-kit server", version=__version__)

app.add_middleware(
CORSMiddleware,
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "local-llm-kit"
# Single-sourced: resolved at build time from local_llm_kit/__init__.py
# (__version__ = "0.2.0"). Do NOT duplicate the version string here.
# (__version__). Do NOT duplicate the version string here.
dynamic = ["version"]
description = "One Python API for offline LLMs and local servers: Ollama, AirLLM, SGLang, vLLM, LM Studio and llama.cpp"
readme = "README.md"
Expand Down Expand Up @@ -143,7 +143,7 @@ where = ["."]
include = ["local_llm_kit*"]
namespaces = false

# Version is single-sourced from local_llm_kit/__init__.py:__version__ (= "0.2.0").
# Version is single-sourced from local_llm_kit/__init__.py:__version__.
[tool.setuptools.dynamic]
version = { attr = "local_llm_kit.__version__" }

Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# local-llm-kit v0.2.0 — core runtime (light install: stdlib + typing-extensions).
# local-llm-kit — core runtime (light install: stdlib + typing-extensions).
# Install with: pip install -e .
typing-extensions>=4.6.0

Expand Down
5 changes: 1 addition & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@
python setup.py --version
pip install -e . # old pip / old setuptools

Version is single-sourced from ``local_llm_kit/__init__.py``::

__version__ = "0.2.0"

Version is single-sourced from ``local_llm_kit/__init__.py:__version__``
via ``[tool.setuptools.dynamic]`` in ``pyproject.toml``. Do NOT add
``install_requires`` / ``extras_require`` / ``version=`` here.
"""
Expand Down
Loading