Skip to content

v1.1.4

Choose a tag to compare

@ralfbecher ralfbecher released this 03 May 21:52
· 38 commits to main since this release
bf22f2f

What's Changed

MCP Sampling

  • Advertise the sampling.tools sub-capability via a thin ClientSession subclass; pydantic-ai's __aenter__ picks up the patched class through module-attribute lookup, so MCP servers can now issue sampling/createMessage with tool definitions instead of falling back to a manual review path
  • Route sampling requests to the env-configured default model (DEFAULT_PROVIDER + matching *_DEFAULT_MODEL); resolution failure (e.g. missing API key) silently disables sampling
  • New MCP_ALLOW_SAMPLING=true|false env flag as a kill switch for cost/privacy reasons; when off, the patched session does not advertise sampling.tools and pydantic-ai passes no callback

UX

  • Welcome screen now shows Sampling Model: <provider>/<model> (or disabled) alongside Provider/Model and the connected MCP servers
  • Mark known sampling-using servers with — uses sampling in the connected-servers list
  • Each server-initiated sampling exchange renders as a collapsible Used Sampling: <server> step nested under the in-flight tool that triggered it (falling back to the run step if no tool is active); prompt and response are shown as wrapping markdown rather than a non-wrapping code block, truncated at STEP_OUTPUT_LIMIT

Dependencies

  • Bumped pydantic-ai floor to >=1.89.0 (latest at release time); patch confirmed compatible with 1.89.1's MCP __aenter__ call site

Full Changelog: v1.1.3...v1.1.4