Skip to content

Agentao 0.5.24

Latest

Choose a tag to compare

@jin-bo jin-bo released this 03 Dec 11:03
b84570b

Agentao 0.5.24

Memory works properly for Chinese, Japanese and Korean. Approving one
Chinese memory proposal no longer overwrites another. A bare install now
recalls Chinese memories. With [i18n], recall no longer drops kana,
hangul, 々 or rare Han characters. [i18n] now installs rjieba in place
of jieba. Four fixes make provider errors fail, retry or recover as they
should.

If you approved memory proposals in Chinese, read the first section: some
earlier approvals may have replaced each other.

Memory keys keep CJK characters

  • Approving one Chinese proposal no longer overwrites another. A memory
    key kept only a-z, 0-9 and _. So every proposal of one type whose
    phrase was all CJK was saved under the bare type: 我们决定采用微服务架构 and
    我们决定采用单体架构 were both saved as decision, and the second approval
    replaced the first. Keys now keep Han (including 々 and CJK Extension B and
    later), kana and hangul. The katakana middle dot ・ separates words, as it
    does in recall.
  • save_memory accepts a Chinese key. save_memory(key="用户偏好", ...)
    was refused with "Memory key is empty after normalization".
  • Proposal keys keep the same characters. 人々の意見 and 人の意見 shared a
    key, katakana was dropped, and every all-hangul phrase was
    decision_unknown.

Keys without CJK characters do not change. A memory saved before this
release under a key whose CJK characters were dropped keeps that key: saving
it again with its full key adds a new memory, and a pending review item can
appear twice. Use /memory list to find and delete the old copy.

Chinese, Japanese and Korean recall

  • [i18n] installs rjieba in place of jieba. rjieba binds jieba-rs:
    it uses jieba's dictionary, gave the same filtered tokens on a ten-sentence
    sample, and segments about nine times faster. It installs about 5 MB,
    against jieba's 37 MB, and is maintained. jieba's last release is from
    January 2020.
    • rjieba is installed only where it ships a prebuilt wheel: CPython on
      macOS (x86_64, arm64), Linux (x86_64, aarch64, armv7l, ppc64le, s390x,
      i686) and Windows (x64, x86). PyPy, Windows on ARM64 and other platforms
      get jieba, so pip never has to build rjieba with Rust.
    • Two cases no install marker can name still build rjieba from source and
      need Rust: free-threaded CPython 3.13t, and musl Linux (Alpine) on
      ppc64le or s390x. Install jieba there if you have no Rust.
    • ~/.agentao/userdict.txt keeps jieba's word [freq] [tag] format.
    • A host with jieba but not rjieba keeps using jieba. No reindex is
      needed, because tokens are computed at recall time.
  • A bare install recalls Chinese memories. Without a segmenter, Chinese
    text is split into overlapping character pairs (版本管理 → 版本, 本管,
    管理), with a one-time warning. Before, it produced no CJK tokens at all.
  • Kana and hangul are recalled. The segmenters' dictionary is Chinese,
    so with [i18n] installed they were cut to single characters and dropped.
    They are now split into character pairs on every backend.
  • 々 and rare Han characters are recalled. The iteration marks 々 〆 〇 and
    every ideograph from CJK Extension B on (rare characters in names,
    Cantonese characters such as 𨋢) were dropped before segmentation. So 人々
    left no token, and 𠮷野家 became 野家.
  • An unreadable home directory no longer breaks CJK recall. It logs a
    warning and segments without the user dictionary.

Provider errors

  • A Chat Completions response that ends with finish_reason: "error"
    fails the turn.
    OpenRouter, GitHub Copilot and Mistral end a response
    this way when the provider fails part-way. The fragment was taken as a
    normal answer, and a tool call in it could run.
  • Cloudflare's 520 and 524 are retried, like a 502 or 503.
  • A 400 that states a request-body byte limit gets the 413
    recovery.
    OpenCode Go answers this way for a body over 48 MiB.
  • A LiteLLM "Context Window exceeded" error triggers overflow
    compaction
    , and an unrelated error that merely contains
    request_too_large no longer does.

Behaviour changes

  • pip install 'agentao[i18n]' (and [full]) installs rjieba, not
    jieba, on the platforms listed above.
  • Memory keys and proposal keys keep CJK characters (see above).
  • A bare install logs a one-time warning the first time it recalls with CJK
    text and no segmenter.

The full list is in CHANGELOG.md.