google-deepmind/onetwo v0.3.0
google-deepmind/onetwo
Captured source
source ↗published Nov 15, 2025seen 5dcaptured 11hhttp 200method plain
v0.3.0
Repository: google-deepmind/onetwo
Tag: v0.3.0
Published: 2025-11-15T14:48:52Z
Prerelease: no
Release notes:
- Backends
- GoogleGenAIAPI: Implement a
GoogleGenAIAPIbackend that can be used to connect to Gemini on both the Gemini Developer API and on Vertex AI via the new unified Google Gen AI SDK. This new backend subsumes OneTwo's existingGeminiAPIandVertexAIAPIbackends, while providing additional functionality such as control over the model's thinking config, multimodal output, support for the tokenize operation, configurable retry delays, smarter retry based on the specific error code, more efficient parallelization, more flexible control over the system instruction, and better control over the operations for which the backend is registered and the default parameters to be applied. - Core
- Structured Output: Introduce enhanced support for structured output generation across various backends with the
generate_objectmethod. This feature enables you to provide a Python type ordataclassorPydanticmodel, and have the backend return a response that conforms to the specified structure. - Multimodal Output: Introduce a new operation
llm.generate_contentthat subsumes the functionality ofllm.chat, but returns aChunkListrather than a string, so as to allow for multimodal output. Ensure that return values of typeChunkListare handled properly through the core code, including for example the caching layer. Provide support for returning details of thoughts, etc., via theinclude_details=Trueoption. Implement concrete support for this operation in theGoogleGenAIAPIbackend. - Parallelism: Provide a
max_parallel_executionscontext manager that allows overriding the maximum number of parallel execution branches, and improve the efficiency of the parallel execution code so as to ensure that the worker pool is constantly kept full up to the specifiedmax_parallel_executions. While previously it had only been possible to maintain up to 100 simultaneous LLM requests in parallel, by adjusting themax_parallel_executionsvalue, it is now possible in some cases to achieve as many as 10,000 LLM requests in parallel within a single process. - Agents
- Search Tool (Agent as a tool): Using
GoogleGenAIAPIbackend, we provide an improved search tool by wrapping an LLM call that leverages the Google Generative AI SDK's built-in search functionality. This demonstrates how easily custom tools can be created in OneTwo, even by encapsulating complex operations like LLM calls, effectively creating an "Agent as a tool". - Standard library
- Sandbox: Enhanced sandboxing capabilities with the introduction of
PythonSandboxSafeSubsetMultiProcess, that wraps the existingPythonSandboxSafeSubsetbut executes the code in a separate, persistent process using Python's standardmultiprocessinglibrary. This new sandbox offers true parallelism and greater robustness against crashes or hangs, especially when executing LLM-generated code in parallel. - Evaluation
- Fuzzy LLM critic: Implement a
naive_fuzzy_evaluation_criticthat is similar tonaive_evaluation_critic, except returns a continuous score between 0 and 1 rather than a binary rating. - Visualization
- Make
HTMLRenderermore robust to rendering of objects with cyclic references. - Documentation
- Update the tutorial colab to support the latest Gemini and OpenAI models and
GoogleGenAIAPIbackend and to illustrate best practices for structured output generation. Includes, among other things, new sections illustrating using LLMs as aToolinReActAgentandPythonPlanningAgent, and sandbox selection. - Other
- Fix to the Multimodal section of Colab tutorial: Added images directly to the codebase, with licensing and source details tracked in
image_provenance.py. Also resolved issues with image data handling in theGoogleGenAIAPIbackend. - Various other bug fixes and incremental improvements to caching, exception handling, tracing ,
ReActAgent,PythonPlanningAgent, evaluation summary output, conversion and formatting of chunks and chunk lists, test utilities, type annotations, and theGeminiAPIandVertexAIAPIbackends.
Notability
notability 4.0/10Routine library version release, no major traction or significance evident.