Repository navigation
The gist…
Flemma v0.14.0 is the models-and-reach release. Eight new models land across all four providers — Claude Opus 5 and Claude Fable 5, the GPT-5.6 family (sol, terra, luna), Gemini 3.6 Flash and 3.5 Flash-Lite, and Moonshot Kimi K3 — alongside a full audit of pricing, context limits and cache thresholds that quietly fixes the context and cache indicators. The headline feature is model matrix parameters: append ;key=value to any model string and it decomposes into provider-scoped configuration everywhere a model is named — setup(), :Flemma switch, presets, frontmatter — with the same grammar now accepted on @file references. mcporter calls finally honour timeouts, both a configured default and a per-call budget the model can raise for slow tools like deep research. Folds survive viewoptions+=folds, so a :mkview/:loadview cycle no longer leaves a chat buffer with no folds at all. Underneath, Flemma's entire string surface moved into gettext PO catalogues — English output is unchanged, but the UI is now translatable, with real plural forms. Rounding it out: Vertex service-account auth actually works now, Gemini 3+ accepts conversations migrated from other providers, and a require()-before-setup() crash that broke nixpkgs packaging is gone.
New Feature: Model Matrix Parameters
Model strings accept matrix parameters — ;key=value pairs appended to the model name (URI matrix syntax, RFC 3986 §3.3). They decompose at write time into provider-scoped parameters, so one line does the work of three:
flemma.opt.model = "vertex/gemini-3.1-pro-preview;project_id=stans-playground"
-- exactly equivalent to:
flemma.opt.provider = "vertex"
flemma.opt.model = "gemini-3.1-pro-preview"
flemma.opt.parameters.vertex.project_id = "stans-playground"The same string works verbatim in setup(), :Flemma switch, presets and frontmatter. Later writes win in source order, so a parameters.vertex.project_id assignment after the model line overrides the matrix value and vice-versa; command-line key=value arguments beat preset parameters of the same name, whichever grammar either side used. Values follow the modeline grammar — quoting (;note='a;b'), booleans, numbers, comma lists (;tags=a,b) — and ;key=nil explicitly clears a parameter, shadowing lower config layers. Parameter names are validated against the provider's schema, so a typo like ;projext_id=x is a config error naming the full parameter path rather than a silently ignored key.
Two things worth knowing: numeric-looking values become Lua numbers, so a string-typed parameter that happens to be all digits needs quotes (;project_id='123456789042'); and matrix parameters can't be attached to a preset reference (model = "$fast;key=v"), since a preset's provider is resolved later — scope the parameter inside the preset definition instead.
@file references accept the same multi-key grammar. A MIME type that itself contains ; parameters must be quoted, since an unquoted ; starts the next option:
@./notes.txt;type='text/plain;charset=utf-8'
Also fixed alongside this: the provider/model shorthand (flemma.opt.model = "anthropic/claude-opus-4-8") now works in setup() opts and frontmatter — previously it was honoured only by :Flemma switch.
See docs/configuration.md → Model matrix parameters and docs/templates.md → Referencing local files.
New Models
Refreshed definitions and pricing across all four providers (July 24, 2026):
- Claude Opus 5 (
claude-opus-5) — $5/$25 per MTok, 1M context, 128K max output, adaptive thinking. - Claude Fable 5 (
claude-fable-5) — $10/$50 per MTok, 1M context, 128K max output, adaptive thinking. - GPT-5.6 family —
gpt-5.6-sol(with agpt-5.6alias, $5/$30),gpt-5.6-terra($2.50/$15) andgpt-5.6-luna($1/$6), all 1.05M context / 128K output. These are the first OpenAI models with a nativemaxreasoning effort and a billed cache-write rate ($6.25/$3.125/$1.25 per MTok). - Gemini 3.6 Flash (
gemini-3.6-flash, $1.50/$7.50) and Gemini 3.5 Flash-Lite (gemini-3.5-flash-lite, $0.30/$2.50). - Moonshot Kimi K3 (
kimi-k3) — $3/$15 per MTok, $0.30 cache hit, 1M context, 128K output. K3 always reasons and configures depth through the top-levelreasoning_effortfield rather than the K2 family'sthinkingobject; Flemma's unifiedthinkinglevels now map onto it correctly, so K3 no longer silently runs every request at the server default ofmax.
Claude Sonnet 4.6's max output is corrected to 128K (was 64K), and the max thinking level now reaches the API's max effort on Sonnet 4.6 and Sonnet 5. The family-wide cache-threshold approximation is replaced with each model's documented minimum cacheable prefix — which is not monotonic across generations (512 for Opus 5 and Fable 5; 1024 for Opus 4.8, Sonnet 5, Sonnet 4.6, Sonnet 4.5, Opus 4.1; 2048 for Opus 4.7; 4096 for Opus 4.6, Opus 4.5, Haiku 4.5). That fixes the cache-percentage indicator, which previously hid cache stats on prompts that were in fact cacheable and showed them on prompts that were not.
Breaking: thirteen models were removed because their providers shut them down.
- OpenAI, retired July 23 2026:
gpt-5-codex, the fourgpt-5.1-*variants,gpt-5.2-codex,o3-deep-research,o4-mini-deep-research,computer-use-preview, and the two*-search-previewmodels. - Google, retired June 1 2026:
gemini-2.0-flashandgemini-2.0-flash-lite(and their-001snapshots).
Deprecations are now flagged ahead of time: gpt-5, gpt-5-mini, gpt-5-nano, gpt-5-pro, o3 and o3-pro retire December 11 2026; Gemini 2.5 retires October 16 2026; the moonshot-v1-* line sunsets August 31 2026.
New Feature: mcporter Call Timeouts
MCP calls through mcporter now actually honour a timeout. Previously neither the configured value nor a model-supplied one reached mcporter — the value was serialized into the tool arguments and silently ignored while mcporter fell back to its own default.
tools = {
mcporter = {
timeout = 60, -- seconds, per operation (list, schema fetch, call)
},
}Flemma passes this to mcporter call --timeout and, mirroring the built-in bash tool, injects an optional per-call timeout (seconds) into every discovered tool's input schema — so the model can extend its own budget for genuinely slow tools like deep research without you raising the global default. A grace window lets mcporter report its own timeout before Flemma force-kills the subprocess, so you get mcporter's error rather than an opaque kill. If an MCP server already defines its own timeout parameter, that one is left untouched.
New Feature: Fold State Survives viewoptions+=folds
If you have folds in viewoptions (common in session/view-restoring setups), :mkview persisted stale fold state for .chat buffers and a later :loadview clobbered Flemma's folding — leaving foldmethod=manual and foldexpr=0, which meant no folds at all. Flemma now strips folds from viewoptions while a chat buffer is active, and detects and fully re-applies fold settings that a pre-existing view has overwritten. Previously only foldmethod was restored, which left a dead foldexpr behind.
editing = {
manage_viewoptions = true, -- default; set false to leave viewoptions alone
}New Feature: Translation-Ready String Catalogues
Flemma's entire string surface now lives in gettext PO catalogues, split by audience:
po/flemma-harness.po— model-facing strings: conversation text, tool descriptions, runtime tool output and errors, truncation notices, and each tool's coding-assistant personality snippet and guidelines. This is prompt surface, so it stays English and is never translated.po/flemma.po— user-facing UI strings, all keys namespacedui.*. This is the translatable surface.
Coverage is broad: every notification (usage, rejection popup, tool actions, :Flemma commands, provider switch, diagnostics, autopilot, presets, hooks, secrets, config validation, sandbox, truncation, request errors), keymap descriptions, the inline progress-spinner and tool-status indicator labels, template diagnostics for @file references and expressions, and parse diagnostics for malformed tool blocks. It ships with real gettext plural support — msgid_plural / msgstr[N] selected by a compiled Plural-Forms expression (EN/FR/RU/PL tested) — so counted messages read correctly instead of "1 orphaned jobs resolved".
Rendered output is unchanged — Flemma still speaks English by default, and this release ships no translations. What's new is that it's now translatable, and a make qa gate keeps the catalogues honest (key resolution both directions, call-site variables matching template placeholders, no pure-formatting entries).
Polish and Bug Fixes
Vertex service-account authentication never actually worked. The gcloud resolver handed the service-account key to gcloud auth print-access-token via GOOGLE_APPLICATION_CREDENTIALS — but that subcommand ignores the variable and silently used your active gcloud auth login account instead, so the service account was never used and Vertex broke whenever your user login needed reauthentication. Keys are now minted through gcloud auth application-default print-access-token, which reads the key and is immune to user reauth.
Gemini 3+ rejected migrated conversations with an HTTP 400. Tool calls that lack a native Vertex thought signature — because the conversation started on another provider — now carry Google's documented migrated-trace placeholder. Buffered API error bodies are logged too, so this class of failure stays diagnosable from the log file instead of surfacing as a bare status code.
A require() before setup() crashed Flemma, which broke any tool that loads every module in a bare Neovim — most visibly nixpkgs packaging (nvimRequireCheck). The experimental Codex adapter registers its ChatGPT secrets resolver as a load-time side effect, and that path asserted config was already initialized. Config now queues module-default registrations that arrive early and flushes them once setup() supplies the schema.
Assistant turns are no longer silently emptied by an unterminated <thinking> block — the collected content is preserved as thinking rather than dropping the rest of the turn from the AST. </thinking> still only closes a block on a line of its own, so HTML/XML examples and format transcripts pass through intact.
Foreign thinking is now framed as tagless prose closed by a lone --- rule, instead of an XML-style wrapper. Anything framing the model's own prior turns eventually gets reproduced verbatim in replies, so the framing has to stay harmless when echoed — tag pairs re-enter the conversation as structure.
Bug fixes: kimi-k2.7-code and kimi-k2.7-code-highspeed were declared thinking-toggle models, so turning thinking off sent a thinking/temperature combination the API rejects outright — they're now correctly forced, with temperature locked to the 1.0 Moonshot fixes it at, and parameter validation warns about fixed sampling parameters across the whole K2.x/K3 line; gpt-5-pro's input limit was set to its output reservation, so the context indicator showed a request half-full when it was already over the limit; gemini-2.5-pro's thinking-budget floor is 128, not 1; gpt-5.3-codex-spark's input limit is 96000, not 100000, and its entry now records that it's a research preview with restricted API access; stale thinking_budgets were dropped from the Gemini 3 entries, where they had been quietly resolving the same configured budget to different thinkingLevels on different models; fence overlays now scale to the actual backtick count and stop overlaying inner backtick lines inside a wider fence; and flemma.jobs.status's job_id guidance shipped as a JSON Schema default — a nonsense default value — with no description, so the model never saw how to fill it in.
Minor Changes
-
c3c0662: mcporter tool calls now honour a call timeout. Flemma passes
--timeout(milliseconds) tomcporter call, derived fromtools.mcporter.timeout, and exposes an optional per-calltimeout(seconds) in every discovered tool's input schema — mirroring the built-inbashtool — so the model can extend the budget for slow tools such as deep research. Previously neither the configured timeout nor a model-suppliedtimeoutreached mcporter: the value was serialized into the tool arguments and silently ignored while mcporter fell back to its own default. A grace window now lets mcporter report its own timeout before Flemma force-kills the subprocess, and a server-ownedtimeoutparameter is left untouched. -
a2b8065: Model strings accept URI matrix parameters:
flemma.opt.model = "vertex/gemini-3.1-pro-preview;project_id=x"decomposes into provider, model, and provider-scoped parameters everywhere a model is named (config,:Flemma switch, presets), with source-order precedence,;key=nilclearing, and deterministic command-line-over-preset overrides in both grammars.@filereferences accept the same multi-key;key=valueoptions (quote a parameterized MIME:;type='text/plain;charset=utf-8'). Preset parameters normalize to the config shape — provider-specific keys nest under the provider namespace. -
37864f3: Refreshed model definitions and pricing across all four providers (July 24, 2026):
- Anthropic — added Claude Opus 5 (
claude-opus-5, $5/$25 per MTok, 1M context, 128K output) and Claude Fable 5 (claude-fable-5, $10/$50, 1M/128K), both adaptive-thinking. Corrected Claude Sonnet 4.6's max output to 128K (was 64K), and raised themaxthinking level to the API'smaxeffort on Sonnet 4.6 and Sonnet 5 — per Anthropic's effort docs,maxis available on every adaptive-thinking model (Opus 4.5, which has effort but not adaptive thinking, still clamps tohigh). The intermediatexhighlevel — available on Fable 5, Opus 5, Opus 4.8, Opus 4.7 and Sonnet 5 — remains unreachable, since Flemma's canonical levels stop atmax. Replaced the family-widemin_cache_tokensapproximation with the documented per-model minimum cacheable prefix, which is not monotonic across generations: 512 for Opus 5 and Fable 5; 1024 for Opus 4.8, Sonnet 5, Sonnet 4.6, Sonnet 4.5, and Opus 4.1; 2048 for Opus 4.7; 4096 for Opus 4.6, Opus 4.5, and Haiku 4.5. This corrects the cache-percentage indicator, which previously hid cache stats on prompts that were in fact cacheable (Opus 5, Opus 4.8, Sonnet) and showed them on prompts that were not (Opus 4.6, Opus 4.5). - OpenAI — added the GPT-5.6 family:
gpt-5.6-sol(with itsgpt-5.6alias, $5/$30),gpt-5.6-terra($2.50/$15), andgpt-5.6-luna($1/$6), all 1.05M context / 128K output and the first OpenAI models with a nativemaxreasoning effort and a billed cache-write rate ($6.25/$3.125/$1.25 per MTok). Dropped eleven models shut down on July 23, 2026 (gpt-5-codex, the fourgpt-5.1-*variants,gpt-5.2-codex,o3-deep-research,o4-mini-deep-research,computer-use-preview, and the two*-search-previewmodels).gpt-5,gpt-5-mini,gpt-5-nano,gpt-5-pro,o3, ando3-proare now marked deprecated (retiring December 11, 2026); the stale deprecation note ongpt-5.1was removed. - Google (Vertex AI) — added Gemini 3.6 Flash (
gemini-3.6-flash, $1.50/$7.50) and Gemini 3.5 Flash-Lite (gemini-3.5-flash-lite, $0.30/$2.50). Droppedgemini-2.0-flashandgemini-2.0-flash-lite(and their-001snapshots), retired June 1, 2026. Gemini 2.5 models are noted as retiring October 16, 2026. - Moonshot AI — added Kimi K3 (
kimi-k3, $3/$15 per MTok, $0.30 cache hit, 1M context, 128K output). K3 always reasons and configures depth through the top-levelreasoning_effortfield rather than the K2 family'sthinkingobject. Themoonshot-v1-*line is noted as sunsetting August 31, 2026.
- Anthropic — added Claude Opus 5 (
-
2ec02c4: Survive
viewoptions+=folds: while a chat buffer is active,foldsis stripped fromviewoptionsso:mkviewno longer persists stale fold state (tweakable viaediting.manage_viewoptions), and fold settings clobbered by a:loadviewof a pre-existing view (foldmethod=manual,foldexpr=0) are now detected and fully re-applied — previously onlyfoldmethodwas restored, leaving a dead foldexpr and no folds at all.
Patch Changes
-
16b5d0c: Fixed a crash when a Flemma module is
require()d beforesetup()runs. The experimental Codex adapter registers its ChatGPT secrets resolver as a load-time side effect, and that path asserted the config system was already initialized — so merely requiring the adapter in isolation threwconfig.init() must be called before register_module_defaults(). This broke tools that load every module in a bare Neovim, most notably nixpkgs packaging (nvimRequireCheck). Config now queues module-default registrations that arrive before initialization and flushes them oncesetup()supplies the schema, so any module can be required standalone and its defaults still land. -
1489470: Fixed fence overlay rendering for wide and nested code fences — bar now scales to the actual backtick count, and inner backtick lines inside a wider fence are no longer overlaid
-
d458544: Fix
provider/modelshorthand (e.g.,flemma.opt.model = "anthropic/claude-opus-4-8") in setup opts and frontmatter — previously only worked in:Flemma switchcommands. -
be8eec2: Foreign thinking is now injected as tagless prose ("Here is some context to help you: …", closed by a lone
---rule) instead of an XML-style wrapper. Anything framing the model's own prior turns is eventually reproduced verbatim in replies, so the framing must stay harmless when echoed — tag pairs re-enter the conversation as structure. The framing lives in the string catalogue (thinking.foreign.wrapinpo/flemma-harness.po). -
93089d2: Fix the
flemma.jobs.statustool'sjob_idparameter: its guidance text was passed ass.string(<default>), so it shipped as a JSON Schemadefault(a nonsense default value) with nodescriptionfor the model. It now renders as the parameter'sdescription, so the model finally sees how to fill injob_id. -
37864f3: The unified
thinkingparameter now controls reasoning depth on Kimi K3. K3 configures thinking through the top-levelreasoning_effortfield rather than the K2 family'sthinkingobject, so settingthinkinghad no effect and every request reasoned at the server default ofmax— the most expensive setting, with no way to make K3 cheaper or faster. Flemma's canonical levels now map onto the three values the API accepts:minimalandlowsendlow,mediumandhighsendhigh, andmaxsendsmax. K3 cannot stop reasoning, so thinking turned off sendslow— the floor — rather than omitting the field and silently inheritingmax. Temperature is locked to 1.0, which Moonshot fixes on K3 as it does across the K2.x line. -
a64c027: Corrected three model limits that were wrong against provider documentation:
gpt-5-proreserves 272K of its 400K context window for output, leaving 128K for input — the inverse of every other GPT-5 model. Itsmax_input_tokenshad been set to 272000 (the output figure), so the context indicator showed a request as half-full when it was already over the limit.gemini-2.5-pro's thinking budget floor is 128, not 1. Only 2.5 Flash accepts a budget of 1; thinking cannot be turned off on 2.5 Pro at all.gpt-5.3-codex-spark's input limit is 96000 (its 128K context window minus the 32K output reservation), not 100000. Its entry now records that it is a research preview with restricted API access and that its pricing mirrorsgpt-5.3-codexrather than a published rate.
Also dropped
thinking_budgetsfrom the Gemini 3 entries that still carried them. Google publishes athinkingBudgetrange for Gemini 2.5 only, Gemini 3 usesthinkingLevel, and a request carrying both parameters returns an error. The budgets were never sent — but they clamped numeric budgets before mapping them to a level, so the same configured budget resolved to a differentthinkingLevelongemini-3-flash-previewthan ongemini-3.5-flash. -
a64c027: Fixed the request Flemma sends to
kimi-k2.7-codeandkimi-k2.7-code-highspeed. Both were declared as thinking-toggle models, so turning thinking off sentthinking = {"type": "disabled"}withtemperature = 0.6— a combination the API rejects outright, since thinking on the K2.7 Code family is always on and cannot be disabled. They are now declaredforced: nothinkingobject is sent at all (Moonshot documents it as omittable, and the only form it accepts when set explicitly is{"type":"enabled","keep":"all"}), and temperature is locked to the 1.0 the API fixes it at. Parameter validation now warns about fixed sampling parameters on every K2.x/K3 model rather than only the toggleable ones. -
ce89e46: Fix assistant turns being silently emptied by an unterminated
<thinking>block: the collected content is now preserved as thinking instead of dropping the rest of the turn from the AST.</thinking>still only closes a block on a line of its own — the token followed by content is treated as thinking prose (HTML/XML examples, format transcripts). -
6e7796f: Externalized conversation messages, tool definition strings, and the full user-facing surface into gettext PO catalogues, split by audience:
po/flemma-harness.poholds model-facing strings (conversation text, tool descriptions, runtime tool output and error messages, shared truncation-overflow notices, and each tool's coding-assistant personality snippet and guidelines — English-only prompt surface),po/flemma.poholds user-facing UI strings (the translatable surface, all keys namespacedui.*). Covers notifications (usage, rejection popup, tool actions, :Flemma commands, send-pipeline guards, provider switch/initialize, diagnostics, build-prompt failures, autopilot, presets, hooks, secrets, config validation, sandbox, migration, response truncation, max-tokens clamping, request/cURL errors), keymap descriptions, inline progress-spinner and tool-status indicator labels (thevirt_textwaiting/executing/pending/complete/failed states and the streamed-character counter), user-triggered template diagnostics (file references, includes, expression errors,@fileopen/read failures), and buffer parse diagnostics for malformed tool-use/tool-result blocks. Adds gettext plural support —msgid_plural/msgstr[N]selected by a compiledPlural-Formsexpression (EN/FR/RU/PL), fixing e.g. "1 orphaned job resolved" vs "N orphaned jobs resolved". Amake qagate (lint-messages.sh) validates key resolution, call-site↔template variables,#. Variables:comments, no pure-formatting entries, and newline-only joins between translations. Rendered strings are unchanged (still English by default); keys stay unique across the files, enforced when the catalogue loads. -
3968948: Fix Gemini 3+ rejecting conversations migrated from another provider (HTTP 400): tool calls without a native Vertex thought signature now carry Google's documented migrated-trace placeholder, and buffered API error bodies are logged so failures stay diagnosable from the log file.
-
ea64058: Fixed Vertex AI service-account authentication. The gcloud secrets resolver handed the service-account key to
gcloud auth print-access-tokenviaGOOGLE_APPLICATION_CREDENTIALS, but that subcommand ignores the variable and silently uses the activegcloud auth loginaccount — so the service account was never actually used, and Vertex broke whenever the user login required reauthentication. Service-account keys are now minted throughgcloud auth application-default print-access-token(with the cloud-platform scope), which reads the key and is immune to user reauth.