Skip to content
This repository was archived by the owner on Oct 15, 2026. It is now read-only.

v1.0.0-alpha.10

Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 16 Sep 07:29
· 54 commits to master since this release
0abc34a

Context budget & compaction (#64, #65, #66)

  • max_context is now enforced as an input-context budget with 20% reserved for output. Session-backed chats compact old completed turns into a rolling summary once the budget is exceeded, retaining raw history in SQLite while preserving the newest completed turn and the current turn as real messages.
  • GET /api/sessions/:id/usage estimates the full next prompt (summaries, system context, tools included) using the model's real tokenizer instead of a character-count approximation.
  • naru-shell caches and shows ctx:used/limit (percent) next to the Git branch, refreshing it after every turn, /usage, and session/agent switches; /compact triggers compaction manually while keeping the latest completed turn intact.
  • The stateless /api/v1/chat/completions endpoint is unaffected — it keeps supplied history as-is and returns context_length_exceeded when it doesn't fit.

Provider/agent model selection rework (#69, #70)

  • Providers no longer have a single global "active" one — every registered provider is always usable. providers.active and its unique index, ProviderActivate/ProviderActive, the provider activate CLI subcommand, and POST /api/providers/:id/activate are all removed.
  • An agent's model is now an explicit <provider>:<model> string (e.g. openai:gpt-4o-mini) instead of a bare model name. Agents created before this release need mininaru agent set <id> --model <provider>:<model> once — there's no way to infer which provider a bare model string meant.
  • Agents get a single "primary" cursor instead (agents.selected, enforced unique by a partial index): the first agent you create becomes primary automatically, and mininaru agent primary <id-or-name> switches it. The REPL, -p, and a gateway's "+ new session" now actually default to the primary agent instead of the alphabetically-first one.
  • naru-shell's /agent (switch agent on a new session) is removed. /model with no arguments live-queries every configured provider's own /v1/models and lets you pick one by number; /model <provider>:<model> still sets one directly.
  • The CLI gains agent add --pick-model / agent set --pick-model, the same numbered picker, so a provider:model string doesn't have to be typed by hand from the command line either.