<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Mehrdad Zaker</title>
    <description>The latest articles on DEV Community by Mehrdad Zaker (@mehrdadxzaker).</description>
    <link>https://dev.to/mehrdadxzaker</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4196677%2Fd666a3ba-1630-4331-85c1-388f4bcada38.jpg</url>
      <title>DEV Community: Mehrdad Zaker</title>
      <link>https://dev.to/mehrdadxzaker</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mehrdadxzaker"/>
    <language>en</language>
    <item>
      <title>A model selector that can abstain: a contributor walkthrough of Koto</title>
      <dc:creator>Mehrdad Zaker</dc:creator>
      <pubDate>Tue, 20 Oct 2026 17:44:35 +0000</pubDate>
      <link>https://dev.to/mehrdadxzaker/a-model-selector-that-can-abstain-a-contributor-walkthrough-of-koto-1kdd</link>
      <guid>https://dev.to/mehrdadxzaker/a-model-selector-that-can-abstain-a-contributor-walkthrough-of-koto-1kdd</guid>
      <description>&lt;p&gt;I maintain &lt;a href="https://github.com/mehrdadxzaker/Koto" rel="noopener noreferrer"&gt;Koto&lt;/a&gt;, an experimental Apache-2.0 project for local-first model selection in an existing coding client. Codex is its first implemented routing connection.&lt;/p&gt;

&lt;p&gt;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?&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;h2&gt;
  
  
  The implemented loop
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;history → scorecard → classifier → model execution → observed outcome
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;Those conditions matter: a classifier recommendation does not supply missing coding qualification. &lt;strong&gt;Koto's bundled local coding examples remain unqualified.&lt;/strong&gt; This walkthrough does not demonstrate real model quality, cost savings or production-ready autonomous local coding.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try the selector with invented examples
&lt;/h2&gt;

&lt;p&gt;Use CPython 3.11–3.14 and a fresh environment:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/mehrdadxzaker/Koto.git koto
&lt;span class="nb"&gt;cd &lt;/span&gt;koto
python3 &lt;span class="nt"&gt;-m&lt;/span&gt; venv .venv
&lt;span class="nb"&gt;.&lt;/span&gt; .venv/bin/activate
python &lt;span class="nt"&gt;-m&lt;/span&gt; pip &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;--editable&lt;/span&gt; &lt;span class="nb"&gt;.&lt;/span&gt;
python &lt;span class="nt"&gt;-m&lt;/span&gt; unittest tests.test_personal_selection_fast &lt;span class="nt"&gt;-v&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;For a small direct example, run this from the same environment:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;hormuz.personal_selection&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;predict&lt;/span&gt;

&lt;span class="n"&gt;examples&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;text&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;invoice tally seven boxes&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;model&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;local-fast&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;task&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;a&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;64&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;text&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;inventory report nine crates&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;model&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;local-code&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;task&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;b&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;64&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="n"&gt;eligible&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;local-fast&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;local-code&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;predict&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;examples&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;invoice tally seven boxes today&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;eligible&lt;/span&gt;&lt;span class="p"&gt;)[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;predict&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;examples&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;translate bonjour&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;eligible&lt;/span&gt;&lt;span class="p"&gt;)[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;predict&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;examples&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;invoice tally seven boxes&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;local-code&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;})[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Expected output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;local-fast
None
None
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The first query matches an eligible example. The second lacks enough matching evidence. The third matches a model that is not eligible. &lt;code&gt;None&lt;/code&gt; 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 &lt;code&gt;hormuz&lt;/code&gt; as an internal Python namespace.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;h2&gt;
  
  
  Skills installation and routing are separate
&lt;/h2&gt;

&lt;p&gt;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 &lt;a href="https://github.com/mehrdadxzaker/Koto/blob/main/docs/AGENT_INSTALLATION.md" rel="noopener noreferrer"&gt;installation and compatibility guide&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;h2&gt;
  
  
  Three useful first contributions
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://github.com/mehrdadxzaker/Koto/issues/588" rel="noopener noreferrer"&gt;Document the history and learning command map&lt;/a&gt;: help users distinguish collection consent, learning consent, feedback, validation, disable and deletion.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/mehrdadxzaker/Koto/issues/589" rel="noopener noreferrer"&gt;Extend selector input tests&lt;/a&gt;: cover case folding, punctuation and explicit abstention through the public function.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/mehrdadxzaker/Koto/issues/590" rel="noopener noreferrer"&gt;Clarify skills versus inference&lt;/a&gt;: explain why an installed skill does not mean its host has a routing adapter.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each issue has starting files and acceptance criteria. Routine contributions need no provider account, paid model calls or model downloads. Read the &lt;a href="https://github.com/mehrdadxzaker/Koto/blob/main/docs/FIRST_CONTRIBUTION.md" rel="noopener noreferrer"&gt;first-contribution guide&lt;/a&gt; and &lt;a href="https://github.com/mehrdadxzaker/Koto/blob/main/CONTRIBUTING.md" rel="noopener noreferrer"&gt;contribution standards&lt;/a&gt;, and leave a comment on an issue before taking it on. Reviews and community support are best effort.&lt;/p&gt;

&lt;p&gt;For the complete boundaries, see &lt;a href="https://github.com/mehrdadxzaker/Koto/blob/main/docs/PERSONAL_MODEL_SELECTION.md" rel="noopener noreferrer"&gt;personal selection&lt;/a&gt;, &lt;a href="https://github.com/mehrdadxzaker/Koto/blob/main/SUPPORT.md" rel="noopener noreferrer"&gt;support&lt;/a&gt;, and the &lt;a href="https://github.com/mehrdadxzaker/Koto/blob/main/docs/ROADMAP.md" rel="noopener noreferrer"&gt;roadmap&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>python</category>
      <category>ai</category>
      <category>showdev</category>
    </item>
  </channel>
</rss>
