Mehrdad ZakerI maintain Koto, an experimental Apache-2.0 project for local-first model selection in an existing...
I maintain Koto, an experimental Apache-2.0 project for local-first model selection in an existing coding client. Codex is its first implemented routing connection.
The question is small enough to test: when checked examples support a local model for a familiar task, can the selector recommend it—and otherwise leave the permitted commercial baseline in place?
The coding client keeps its editor, tools, permissions and agent loop. Koto's work is the selection and routing layer, with explicit privacy and qualification boundaries.
history → scorecard → classifier → model execution → observed outcome
History collection and classifier learning require separate opt-ins. Checked outcomes can come from independent checks or explicit feedback. A local nearest-neighbor classifier uses retained examples without making another model call to classify a prompt.
Learning starts in observation mode. Automatic selection requires held-out quality and latency validation and eligible destinations. Unfamiliar or unsupported work keeps the approved commercial baseline. Under hard local-only policy, a missing suitable local choice produces a block.
Those conditions matter: a classifier recommendation does not supply missing coding qualification. Koto's bundled local coding examples remain unqualified. This walkthrough does not demonstrate real model quality, cost savings or production-ready autonomous local coding.
Use CPython 3.11–3.14 and a fresh environment:
git clone https://github.com/mehrdadxzaker/Koto.git koto
cd koto
python3 -m venv .venv
. .venv/bin/activate
python -m pip install --editable .
python -m unittest tests.test_personal_selection_fast -v
Installing dependencies may use the network. This test module uses synthetic inputs; it does not start a router, download models, contact model providers or change an active client's configuration.
For a small direct example, run this from the same environment:
from hormuz.personal_selection import predict
examples = [
{"text": "invoice tally seven boxes", "model": "local-fast", "task": "a" * 64},
{"text": "inventory report nine crates", "model": "local-code", "task": "b" * 64},
]
eligible = {"local-fast", "local-code"}
print(predict(examples, "invoice tally seven boxes today", eligible)[0])
print(predict(examples, "translate bonjour", eligible)[0])
print(predict(examples, "invoice tally seven boxes", {"local-code"})[0])
Expected output:
local-fast
None
None
The first query matches an eligible example. The second lacks enough matching evidence. The third matches a model that is not eligible. None is the selector abstaining; it does not itself execute a model or authorize a fallback. The names and tasks here are invented. The implementation currently retains hormuz as an internal Python namespace.
In the full workflow, destination admission, privacy policy and continuation affinity still apply after classification. A synthetic example is a way to inspect one behavior, not evidence that a local model can complete coding tasks.
Koto provides a CLI and portable skills. The skills can help manage a supported Codex connection from several agent hosts, but installing instructions does not install Python, start a router, download a model, establish provider access or implement that host's inference adapter. See the installation and compatibility guide.
The current product scope is the local routing and selection workflow. Standalone apps, hosted billing and enterprise front doors are retired from the active 2.0 source product.
Each issue has starting files and acceptance criteria. Routine contributions need no provider account, paid model calls or model downloads. Read the first-contribution guide and contribution standards, and leave a comment on an issue before taking it on. Reviews and community support are best effort.
For the complete boundaries, see personal selection, support, and the roadmap.
Disclosure: I maintain Koto. Codex helped prepare this walkthrough; the claims were checked against the linked source docs, and the synthetic example was executed before publication.