cendor-sdk 1.7.1
Provider-adapter fixes surfaced by live black-box testing (Gemini, Ollama, structured output). No API changes; a pure bug-fix release.
Fixed
- Gemini tool calls no longer 400.
Tool.to_gemini()stampedadditionalProperties(and other JSON-Schema keys) into the function declaration, which google-genai rejects with400 INVALID_ARGUMENT— so every tool-equipped Gemini agent failed. The declaration schema is now sanitized to the subset Gemini'sSchemaproto accepts (recursively). run.aio()works on Gemini. The async path wrapped the syncclient.models.generate_contentand then awaited its non-awaitable result (TypeError: object GenerateContentResponse can't be used in 'await'). Async runs now target google-genai's async-nativeclient.aio.models.generate_content. The async-detection shim is also hardened to never crash on a sync-only client (it runs it blocking instead), so a future sync-only provider degrades gracefully.- Ollama tool loops survive the replay turn. Canonical history stores tool-call
function.argumentsas a JSON string; the ollama client requires a dict and rejected the string (pydanticdict_type/ server 400Value looks like object, but can't find closing '}' symbol).OllamaProvider.build_kwargsnow re-hydrates arguments to dicts for the ollama wire. - Structured output tolerates fenced/wrapped JSON.
output_type=parsing did a barejson.loadsand silently returned the raw string when a provider without a native JSON-schema mode (Anthropic/Ollama/HF) wrapped its JSON in a```jsonfence or prose — breaking the declared type. Parsing now strips the fence / extracts the first balanced JSON value first.