| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Parent folder | |||
| langroid-0.68.0-py3-none-any.whl | 2026-09-16 | 480.0 kB | |
| langroid-0.68.0.tar.gz | 2026-09-16 | 428.4 kB | |
| 0.68.0 source code.tar.gz | 2026-09-16 | 59.2 MB | |
| 0.68.0 source code.zip | 2026-09-16 | 59.7 MB | |
| README.md | 2026-09-16 | 2.8 kB | |
| Totals: 5 Items | 119.9 MB | 1 | |
Highlights
This release makes Langroid installable alongside the new openai 3.x SDK,
fixes a JSON-argument corruption bug in tool/function calls, and removes the
OpenAIAssistant agent now that OpenAI has shut down the Assistants API.
Breaking change
OpenAIAssistant removed (#1127)
OpenAI sunset the Assistants API on 2026-08-26; every endpoint now returns
404, so OpenAIAssistant could no longer work under any configuration. The
module, its tests, and the Assistants-based examples are gone
(langroid.agent.openai_assistant now raises ModuleNotFoundError). This
is the reason for the minor bump.
The class was never exported from langroid or langroid.agent, so only
code that imported the module path directly is affected. See
docs/notes/openai-assistant-removal.md for a migration guide mapping each
Assistants feature (threads, file_search, code_interpreter, function
calling) to its ChatAgent equivalent. Regular Chat Completions tool
calling (oai_tool_calls, oai_tool_id, …) is unchanged.
Language models
Support for openai SDK 3.x (httpx2) alongside 2.x (#1139)
The openai pin is widened from <3.0.0 to <4.0.0. openai 3.x is built on
httpx2 (the Pydantic-maintained successor to httpx) rather than httpx,
so passing an httpx.Client / httpx.Timeout to the new SDK fails. A small
shim, langroid.language_models.httpx_compat, now picks the family matching
the installed SDK major, and openai_gpt.py, client_cache.py, and
azure_openai.py take Timeout / Client / AsyncClient from it. If you
build your own HTTP client for http_client_factory, import from the shim
(see docs/notes/openai-http-client.md).
Caveat: litellm still pins openai<3, so installs with the litellm
extra stay on openai 2.x until that pin is lifted. Base installs can use
openai 3.
Fixes [#1138], reported by @alexagr.
Preserve JSON escape semantics in function arguments (#1137)
Valid JSON function/tool-call arguments could be altered by the imperfect-
JSON repair path: "https:\/\/example.org" kept its backslashes, and
surrogate-pair escapes such as "😀" decoded to two lone
surrogates instead of one emoji. This affected both ordinary and streamed
tool calls. JSON objects and arrays are now decoded with json.loads
first, falling back to Python-literal and repair parsing only when that
fails. Regression tests cover nested keys, arrays, literal backslashes,
single-character stream chunks, async streams, and cached-response replay.
Contributed by @feng1201.
Contributors
Thanks to @feng1201 for the JSON-arguments fix and to @alexagr for reporting the openai 3.x incompatibility.
Full changelog: https://github.com/langroid/langroid/compare/0.67.8...0.68.0