Skip to content

v2.16.0

Choose a tag to compare

@Eigenwise Eigenwise released this 14 Nov 14:14
6a5e19e

Read before upgrading

  • AgentConfig.model now defaults to gpt-5.6-terra. The old default, gpt-5-mini, is on OpenAI's deprecation list with a shutdown date of 2026-12-11. If you never set model, your agents switch models with this upgrade. Set model explicitly to stay on a specific one. (#355)
  • AgentConfig takes its mode from the Instructor client and warns when an explicit mode disagrees with the client. (#293)
  • ChatHistory(max_messages=...) only accepts a non-negative int or None. Booleans, floats, strings and negative numbers raise ValueError, in the constructor and in a loaded snapshot. load() also rejects a snapshot whose history is not a list or whose current_turn_id is not a string or null, and a snapshot larger than its capacity is trimmed right after loading instead of on the next add_message. (#356)
  • Media on fields declared with exclude=True is no longer sent to the model. (#359)
  • MCP endpoint URLs keep their query string, and a URL whose path already ends in /mcp or /sse is used as given. If your server is mounted under a path that ends that way, pass the full endpoint URL. (#364)
  • Models generated from MCP schemas now enforce the schema's bounds, lengths, patterns and item counts, so a value the server would reject fails locally first. (#363)
  • MCP resource URIs are kept exactly as the server sent them, and braces in a plain resource URI are literal instead of becoming URI parameters. (#345)
  • token:counted handlers are kept on the agent that registered them. Agents sharing one Instructor client no longer fire each other's token handlers. (#347)

Features

  • Opt-in chat message capture for tracing: TracingConfig(capture_messages=True) or ATOMIC_AGENTS_TRACE_CAPTURE_MESSAGES=true adds gen_ai.input.messages and gen_ai.output.messages to chat attempt spans for OpenAI-compatible chat text, tool calls and tool replies. Off by default. hide_inputs drops the request attribute and hide_outputs drops both. An attribute larger than max_attribute_length is left out whole and its size is recorded as gen_ai.input.messages.original_length or gen_ai.output.messages.original_length, so raise ATOMIC_AGENTS_TRACE_MAX_ATTRIBUTE_LENGTH for agents with long prompts. Tool-call arguments that are not valid JSON are kept as raw text. Streams and non-text media are not captured, and native Responses and Anthropic calls record request text only. (#334)
  • Three new forge tools: deed_page publishes static files to a public deed.page URL (#330), sofya_search does web and news search with page text per result (#367), and outcrawl_search does web search with optional page content as Markdown (#339).
  • The forge calculator honors safe_mode and allowed_functions: safe mode only evaluates allowlisted operators, math functions and the callables you configure. (#361)
  • The MiniMax quickstart defaults to M3.1 Flash. (#322)

Fixes

Agents, history and hooks

  • Schemas resolve through generic agent subclasses, so a fully specialized subclass gets its own input and output schema. (#328)
  • disable_hooks() pauses the agent's Instructor callbacks, and enable_hooks() restores them. (#327)
  • Local image, audio and PDF paths inside tuple fields are restored when a saved history is loaded. (#342)
  • Formatted tool calls use the title the JSON Schema advertises. (#358)

MCP

  • $ref resolves by its complete JSON Pointer, so #/definitions/Value and #/$defs/Value no longer collide. (#335)
  • Boolean schemas work as inputs: true accepts anything, false rejects everything. (#357)
  • Scalar enum and const constraints survive conversion. (#300)
  • Generic tool results that only carry structuredContent are returned instead of dropped. (#360)
  • Discovery stops with an error when a server repeats a pagination cursor, instead of looping. (#344)
  • With several resources or prompts from one server, each generated class reports errors and builds results with its own name and output schema. (#346)

Tracing

  • Agent runs and tool calls that are already in flight keep the tracing config they started with when uninstrument() or a second instrument() happens in between. (#349)

Forge tools

  • pdf_reader: a page range like 1-999999999999 is bounded by the document length before iterating (#336), and streamed downloads are closed on every failure path (#337).
  • youtube_transcript_scraper: duration comes from the Data API contentDetails instead of the summed transcript segments. (#362)
  • webpage_scraper keeps Markdown content during whitespace cleanup. (#343)
  • arxiv_search keeps legacy archive names when stripping version suffixes. (#365)
  • wikipedia_search fetches full text for the first available result. (#366)

Assembler

  • A failed clone or a failed tool copy cleans up after itself and can be retried, and an existing destination is left alone. (#350)

Examples and docs

  • The youtube-summarizer and youtube-to-recipe examples fetch transcripts again. They called a youtube-transcript-api method that the pinned version no longer has. (#433)
  • Examples, README and guides use gpt-5.6-terra. (#355) The quickstart no longer references retired Anthropic and Groq model IDs. (#331)
  • The contributing guide's tool walkthrough matches the current BaseTool API. (#338)
  • Docs cover generic schema resolution and hook pausing (#329), and warn that log shippers carry Instructor's raw retry-exhaustion record (#326).

Verification

  • Core suite on the merged tree: 1362 passed and 11 skipped on Windows, plus two tests that only fail in a local all-packages environment and pass in CI. Every forge tool's tests and the assembler tests were run too. Black and Flake8 are clean.
  • Each merged pull request was tested alone on top of main, and its new tests were run against the old source to confirm they fail there.
  • The quickstarts and the hooks, multimodal and persistent-memory examples were run unmodified against a live model through an OpenAI-compatible endpoint. One known rough edge showed up on both the old and the new code: when a streamed response comes back empty, run_stream raises a ValidationError for the missing field.
  • Not run live: the three new vendor tools with a real key, the examples that need SearXNG, Gemini or a YouTube Data API key, and rag-chatbot.

Full changelog: v2.15.0...v2.16.0