2026-11-26 · A server of the researcher’s own: Ollama first, then any OpenAI-style address
Context
Kalamu reaches four companies’ services at addresses written as constants, and runs a few small models itself. Universities and computing centres run models for their members, usually behind an OpenAI-style address, and some researchers may send their material only there; others run Ollama on a stronger machine in the office (#283, first of the new directions of the review of 25 November). A colleague’s Mac with Ollama is the first real server to try.
What the code holds today, checked on 26 November:
- The engine’s providers are fixed at launch (
Engine.providers, no setter); only the model list can be replaced while the app runs (Engine::set_catalog). - Every picker offers the models of the catalogue the engine holds, each for the tasks and the
types of file its entry names (
task_rules,piece::accepted_inputs). A model outside the catalogue is never offered; a refresh replaces the catalogue whole. - “Offline or cloud” is one answer,
Provider::needs_key(): it decides consent, theengineof provenance and whether a price is shown. The interface readsProviderInfo.localfor the same question. - Provenance names a provider and a model, never an address; a result’s cache key likewise.
openai.rsspeaks the Responses API. Chat Completions, which such servers speak, is spoken only bymistral/chat.rs.
What the servers do, read in their documentation and source on 26 November (Ollama 0.40.18):
- Ollama cuts a request that is too long, and says nothing. Its context is 4k, 32k or 256k
tokens by the machine’s memory. Past it, older messages are dropped, or the middle of a long
text is removed, with a line in the server’s log and nothing in the answer
(ollama#3839, still open). Its OpenAI-style
address (
/v1/chat/completions) cannot set the context nor refuse the cut. Its own address (/api/chat) can:options.num_ctxsets the context, andtruncate: falsewithshift: falseturns every overflow into an error 400. - Ollama says what each model can do:
/api/showlistscapabilities(vision,thinking,audio,embedding…) and the model’s trained context;/api/tagslists the models, and aremote_hostfor those that run at ollama.com rather than on the server. - OpenAI-style servers differ. vLLM and llama.cpp refuse a request that is too long; OpenRouter
compresses its middle on small models unless told not to; LM Studio’s behaviour is not
documented. Some say a model’s context in their list (vLLM
max_model_len, OpenRoutercontext_length, llama.cppmeta.n_ctx_train), none in the same field. Ollama’s/v1ignoresmax_completion_tokens;max_tokensis read by all. - Ollama listens on
127.0.0.1:11434, without a key and in plain HTTP; on a network it is reached once its owner setsOLLAMA_HOST.
Decision
What the researcher does
One tab in Settings, Other servers, the only place the feature shows until a server is added. Three steps, and nothing to describe by hand:
- Name and address. A name of the researcher’s choosing, an address
(
http://localhost:11434shown as the example), and a key only under This server asks for a key. Connect. - Kalamu asks the server what it is and what it has.
GET <address>/api/versionanswered means Ollama; elseGET <address>/models, then<address>/v1/models, means an OpenAI-style server; else the failure is said in plain words (nothing answers there; it answers but is not a server Kalamu knows; it refuses the key). No kind to choose. The models are listed, and the researcher ticks those to use. - Kalamu tries each ticked model before it is listed (Try and add), with three small requests: an answer at all; a small picture bundled with Kalamu that holds a number, which the answer must contain; a form of two fields, which must come back filled. Each model then shows what it does in two lines, Reads pages and Fills an analysis’s form, each yes or no.
A model is offered only for what it did in its trial. Reading pages (text extraction, and
a region read again) needs the picture read; analyses, corrections and translations of text
need the form filled; an analysis of images and the pages of a table of contents need both,
and a table of contents’ combining step the form alone; a model that did neither is not
listed. Its catalogue entry is written
from the trial (tasks, inputs), so New job, workflows and every dialog obey it through the
rules the four providers’ models already obey, and the engine converts a page to a picture or
refuses a type of file as it does for them. The researcher cannot tick an ability; Try again
repeats the trial, after a model was updated on the server. Where Ollama says a model has no
vision, the picture is not sent and the answer is no.
Transcription is not in this increment, and no model of such a server is offered for it.
The same rule is ready for it: a model would be offered for recordings only after a short
bundled clip came back transcribed. It waits for a real server to try, since Ollama’s audio
models and the /v1/audio/transcriptions of other servers return neither times nor speakers
in one agreed form. Whisper, in Kalamu itself, covers the need meanwhile. Also left out:
batches (economy mode), embeddings for the search by meaning, and the models Ollama runs at
ollama.com (remote_host set), which are shown in the list as not on this server and cannot
be ticked: a local address must not send a page to a company unseen.
Under More choices, per model, each with a value Kalamu filled: Reads up to (tokens), Longest answer (tokens), Price per million tokens in and out (none by default, and the job’s cost then reads as not priced); per server, Requests at the same time (1 by default).
Never a reading in part
- Ollama is spoken at its own address,
/api/chat, never/v1. Every request carriesoptions.num_ctx(the model’s Reads up to),truncate: false,shift: false,stream: false,options.num_predict(the Longest answer) andthink: false. An overflow is then an error 400, said as: the page or text is longer than this model reads on this server, with where to raise it.done_reason: "length"keeps the text marked as cut off, as for every provider. - Reads up to starts at the model’s trained context, capped at 32 768 tokens, since a larger
context takes memory the machine may not have; Longest answer at 8 192, or a quarter of the
context if smaller. The catalogue entry’s
max_input_tokensis the first minus the second, so the engine’s own checks refuse or split a long text before anything is sent. - An OpenAI-style server is sent
max_tokens, and no field that only some accept. Its Reads up to is taken from the server’s list where it gives one, else 8 192 until the researcher changes it. After each answer of a request that carried a text, the tokens the server says it read (usage.prompt_tokens) are compared with the text sent: fewer than one token for eight characters is refused as a reading in part, since no language is written so compactly. An answer withoutusageis accepted, and the guide says that such a server is trusted on its word. Requests toopenrouter.aiturn its compression off. - Thinking is kept out of the answer:
message.thinking,reasoningandreasoning_contentare never read, and a leading<think>…</think>is removed. No reasoning level is offered for these models in this increment. - A model reads one page a call.
On this computer, or on the network
A third kind beside offline and cloud, in two halves, decided by the address alone:
localhost,127.0.0.0/8and::1: on this computer. Nothing leaves it, no consent is asked, and an offline-only project (#282) may use it.- any other address: on the network. Consent is asked once, naming the server by the researcher’s name for it and its host, in words of its own (the files go to a server someone runs, under that person’s rules, not to a company under the researcher’s account). Changing the address asks again.
Kalamu knows only the address: what a program at localhost does with a page is its owner’s
affair, and the privacy policy says so. Plain http:// is accepted, Ollama speaking nothing
else; for an address on the network Settings says that the files travel unencrypted, and with
a key, that the key does too. Only http and https, without a user name in the address.
Provenance records it: engine is own, and a new server holds the name and the address as
they were when the piece was read, so a result opened later, or on another computer, still
says where it was made.
Where it lives
core:Reach(ThisComputer,Cloud,Network), asked throughProvider::reach(), whose default followsneeds_key()so nothing existing changes; the engine and the shell ask it wherever they askedneeds_key()to mean “sends something out”.Provider::server()gives the name and address for provenance,Noneby default.needs_key()keeps its one meaning: a key must be there.providers: one module,own, with one file per way of speaking (ollama.rs,chat.rs), the finding of a server and its models (discover), and the trial (trial). One provider per server added,own-<8 hex digits>made once and kept through renames and a changed address, so results, the cache, consent and the key (own-…-api-keyin the keychain) hang on it. Its failures name the server by the researcher’s name, never “the provider”, and a server that does not answer is not blamed on the internet connection. Its own limit on requests at the same time, since a waiting request would otherwise run out its time in the server’s queue.own::providers(client, &servers)is the registration line.catalog:OwnServerandOwnModel, the researcher’s entries, kept inservers.jsonbeside the cached model list, never refreshed; andCatalog::with_servers, which adds each server as a provider (withown: its address, whether on this computer, whether it holds a key) and each tried model as a model. They are added after the list’s checks, which hold a downloaded list and say nothing of what the researcher typed, and again after every refresh: the shell has one function that hands the engine a catalogue, and it merges.engine:Engine::set_providers, asset_catalog, so a server is usable the moment it is added. A job in flight keeps the provider it started with.app:servers.jsonread and written, the commands (find a server, try a model, save, remove), and the wiring. As built:corealso holdsDialectandchecked_address(with theurlcrate), so the address discovery keeps and the addressservers.jsonmay hold are one rule;catalogholds what Settings sends and receives (FoundServer,TrialServer,ModelTrial,ServerDraft) andOwnServers::apply, which takes each model’s abilities from a trial made in the session at that address, or the one stored while the address stays, never from the draft. The shell maps the stored entries to the providers’ configuration, one function for the catalogue (use_catalog) and one for the providers. Consent is withdrawn for a server whose address changed or that was removed, andsave_settingsno longer adds consent back from the copy it is sent. A saved pipeline or workflow that names a server since removed fails in plain words (server.removed), as a job left on it does.- Interface: the tab; in New job a server is a provider like the others, under its name. No expert mode.
Sharing with the app driven in CI
The packaged app’s tests (#277) need a
provider at an address that is a setting. This is it: the stand-in gains the two ways of
speaking, and the packaged app is driven by adding it as a server. That work follows this
increment; Addresses stays for the test build, which redirects the four providers.
Kalamu differs deliberately
- From
iwac-ai-pipelinesandzmo-ai-pipelines, which name each service in code and trust a model to read what it is sent: here a model earns each task in a trial. - From clients that speak
/v1to everything, Ollama included: that address cannot refuse a cut.
Consequences
- A change of the specification (providers, privacy, what each task accepts), the guide in
both languages (a page of its own, Other servers),
docs/privacy.mdwith a new effective date, the roadmap andAGENTS.md’s table. Provenancegains a field andenginea value; both are added, nothing stored is rewritten, so no fixture database is owed.- Two servers’ models under the same name are apart in the cache, their providers’ ids differing. A model updated on the server under its old name keeps its cached answers, as an alias at a cloud provider does; provenance records the digest Ollama gives.
- To try by hand, and to write down with what failed: a job of pages and an analysis against Ollama on a Mac, on this computer and across a network; a model too small for its page; a model updated between two runs. The OpenAI-style way is written from documentation and recorded answers until a university’s server is tried.
- Later, each with its own entry: transcription, embeddings, reasoning levels, Ollama’s ollama.com models with consent, and the services that need their own sign-in (Azure OpenAI, Vertex AI, Bedrock).
Built differently from the decision above, as found when the documents were written on 26 November:
- Provenance records the server as it stands when the files are written, not as it was
when each piece was read (
Engine::where_read,Engine::server_of). A record per piece needs a stored field on each result and a migration of the job database, with a fixture for CI; it is left for later. Until then, a server renamed or moved between reading the pages and writing the files is named inprovenance.jsonby its new name and address. A server no longer registered when the files are written (removed) leavesengineascloudand noserver, as for any provider the engine does not know. - The digest Ollama gives is not in provenance.
/api/chat’s answer carries none, so a page read by Ollama records no model version; the digest/api/tagsgave at the trial is kept with the model inservers.json(OwnModel::digest), where it tells a model updated under the same name, not in the files. - A model’s catalogue entry lists
TextExtractionandAnalysisonly. Contents, corrections and translations follow fromAnalysisthroughTask::request_task, as for every model, which is how a table of contents comes to need both abilities (Decision above says so since 26 November). - A job in flight takes the providers as they are at each piece, not as they were when it
started: the call already sent keeps its provider, and the next piece looks the list up
again. As first built, a server changed while its job ran sent the remaining pages to the new
address unasked, and one removed stopped the job in a state no resume could finish. Fixed on
26 November by refusing the change instead:
save_serverandremove_serverask the engine which models of the server the running jobs use, or may start a workflow step with (Engine::models_in_use, overkalamu_core::ahead, tested against the job database in memory), and refuse (server.in_use, naming the server) a removal, another address or way of speaking, or a model in use unticked (Saved::changes_under, tested incatalog); a rename, limits, prices or a model added stay free. A paused or interrupted job does not hold the server: a changed address is caught by the consent below when it is resumed; a removed server makes it fail withserver.removed, which says that a server added again is a new one, under a new id, to start a new job with. The confirmation before a removal says that such a job cannot be finished. - Consent was first asked only when a job, a workflow run or a dictionary proposal was
created, not when a job was started, resumed or retried, so a job made before its server’s
address changed sent to the new address unasked. Fixed on 26 November:
start_job,retry_failedandapprove_steprefuse as creation does (require_agreed), for the job’s providers and those of the workflow steps it, or the approval, may start (steps that have no job yet:kalamu_core::ahead), and the interface asks first through the same question as New job (mayResume,mayGoOn, fromproviders_aheadandrun_providers_ahead), so the researcher sees the question, and declining leaves the job as it was. A provider the engine no longer knows is not asked about but refused (server.removedfor a server’s id). A passage or a region asked again was already checked at each request; the search by meaning checks its own per-project consent at each preparation run and question; at launch nothing is sent without the researcher (workflow steps are made, not started; batches are collected, which downloads answers and sends nothing). The checks run in the shell, which was compiled outside the repository against the real crates and a stand-in for Tauri; the interface’s question is tested in Vitest and, against the sample data, in Playwright (a server moved under a paused job, the job resumed, the question naming the new host, declined). save_settingskeeps the consent the shell holds and ignores the copy it is sent: consent is given byconsent_providersalone and withdrawn only by a server’s change of address or removal. This holds for the four providers too: saving settings can neither add nor remove an agreement any more.