Skip to content

llx 0.6.0

Choose a tag to compare

@rsaryev rsaryev released this 17 Nov 11:01
· 32 commits to main since this release
00febd3
  • An answer's steps, tabs and callouts are drawn as what they are. A quote that opens with a marker is a form: > [!NOTE], [!TIP], [!IMPORTANT], [!WARNING] and [!CAUTION] (GitHub's alerts) a callout behind a bar of its colour; > [!STEPS] over a numbered list, stages down a rail; > [!TABS] over headings, each variant under its label; > [!STATS] figures on one row, or a list where the row does not hold them; > [!PROS] and > [!CONS] lists by + and -; > [!DETAILS] a section under its title; > [!SOURCES] links by number. Before, each was a quote with [!NOTE] left in its text. A task's box stands where its bullet would, its text hanging under itself; an image shows its description and address, and a list written with blank lines between its items keeps them. A table too wide for the terminal gives its columns room by what they hold, as a browser does (a column of names stays narrow beside one of sentences), and rules its rows apart when they hold long text (half of them take three lines or more); code keeps its tabs as columns, four wide (they were shown as \t); a word and the punctuation that runs into it (`--flag`:) go to the next row together, and so do the words of a code span a row holds (`git reset --hard` is not broken in two); a link's underline ends with its last word, not with the space after it. The model is told the forms where its answer is drawn (a session, exec at a terminal), by the package that reads them (markdown::prompt, in the context's <answer_format>); an answer that goes to a pipe, a file or --json is asked for none. The Markdown is read by llx's own parser (packages/markdown: every example of CommonMark 0.31.2 and of GitHub's tables, strikethrough, task lists and bare links, no dependency), in place of pulldown-cmark. It is the one crate of the release built for speed (opt-level = 3, about 33 KB of the binary): an answer is read again as each piece of it arrives. In exec, an answer drawn with no call before it is a blank row from the line that says how the run ended, as one after a call is. A call that joins the one before it under ↳ keeps its first row inside the screen; before, a row that filled the width under a bullet went two columns past it and broke in the middle of a word. The demo on llx.sh and the README's GIF are recorded again from real runs, with answers drawn as steps, tabs and a table among them.
  • An answer reads better in a terminal. Headings stand out by their weight (the first underlined, the second bold, the third bold and slanted), a list's bullet says how deep the list is (•, then ◦), and a task is ✓ or ☐ where its bullet would stand. A quote that ends with — Author names its source under it; a picture's caption (the emphasised line right under it) stands under it. A fence that names its file (```ts src/app.ts or title="…") is drawn under the name, a diff or patch fence in green and red by what its lines add and take away, a ```tree fence as a file tree with its branches, what is said of the names in one column; a mermaid fence says it is a diagram. A formula ($x^2$, $$ … $$, a math fence) is written as the Unicode a terminal has, \frac{1}{k} \sum_{i=1}^{k} r_i as 1/k ∑ᵢ₌₁ᵏ rᵢ, a block one set in on rows of its own; a price ($5) and a shell variable ($HOME) stay text. A footnote is its number where it is named and its text at the end. A step's name has a row of its own with what is said of it under it, and the numbers of a long chain end in one column; figures stand side by side, each number over what it counts; a source's address has a row of its own, whole whatever its name's length. A blank row stands only between two blocks that are drawn, and nesting deeper than the width holds is drawn flat rather than past the edge. The parser reads the formulas and the footnotes itself (Kind::Math, Kind::MathBlock, Kind::FootnoteRef, Kind::Footnotes). The model is told of the tree and diff fences, the file's name, the quote's source and how a formula is written, with the other forms.
  • Models on your own machine, and any host of chat completions. llx finds the servers that run local models and calls each for the models it says it runs: Ollama (OLLAMA_HOST, else port 11434), LM Studio (1234), llama.cpp's llama-server (8080), and any you name under local in ~/.config/llx/settings.json ({"name": "box", "url": "http://box.lan:8080"}). /model lists those that answer under Local:, beside the catalog's providers under Cloud: (Local: none running when none does); --provider ollama -m qwen3:8b names one for a run; llx doctor says which answer. No list of local models is built in: a server is asked each time, with the context each model is loaded with where it tells it (llama.cpp's /props, LM Studio's /api/v0/models, Ollama's /api/ps). A local model is asked to stream, so a reply its limit cut keeps its last call, with its usage and what it read from its cache; a reply is 8,192 tokens at most, a quarter of the context when that is less; no title is asked of it, as it answers one request at a time. LLX_LOCAL=0 looks only for what the settings name. Any other OpenAI-compatible host, wherever it is, goes under hosts ({"name": "work", "url": "https://llm.example/v1", "key": "…"}, with models, context and output for what it does not say itself): a Hosts: tab of /model and --provider work, called as any plain host with none of a local server's limits. /login adds a host too: its last row, Another host, asks the address, a name and the key, checks that it answers and saves it in settings.json. A name that is a provider's own is asked again at once, and never offered. A host at the address of a provider the catalog knows (OpenRouter's, Anthropic's) is called as that provider, with its models, prices, levels and prompt cache. A model such a host serves that the catalog knows under any provider (anthropic/claude-… behind a proxy, a vendor's model under its bare id) is called with what the catalog says of it: its levels, its limits, and the prompt-cache marks the models that need them take (a host that refuses the marks is asked again without); the context and reply the settings give still win. A field a host refuses by name (Unsupported parameter: …) is left out, or the reply's limit sent as max_completion_tokens where it asks for that, and the request asked again; later requests to it go out so. A host the catalog does not know that says no cost for a request is priced from the catalog's entry of the model, where it has one: its vendor's price, which the host's own may differ from; a server on this machine costs nothing. A 429 that says the account has nothing left (Insufficient balance, insufficient_quota) is said at once, not asked three times. The cache counts are read as DeepSeek (prompt_cache_hit_tokens) and Anthropic-style proxies (cache_read_input_tokens, cache_creation_input_tokens) say them too.
  • A long session's request never goes a token past the limit. The size a conversation is held to was rounded down twice, the conversation's and the tools' descriptions', so a request could be one token larger than the limit it was fitted to; both are now rounded up.