Accept `include_evidence` on peer and workspace chat, sync and async. Opting in returns a `ChatResponse` carrying the answer alongside what the dialectic read to produce it; leaving it out returns the answer on its own, so existing callers are unaffected. Overloads discriminate on the flag's literal value, so a Pydantic `response_format` combined with evidence types as `ChatResponse[Model]` while the default call still types as `str | None`. The four chat methods shared identical response-reading logic, which now lives in one `parse_chat_response` so they cannot drift. Evidence for a streamed answer can only be known once the answer is complete, so the server sends it on the stream's terminal event. `SSEStreamParser` now keeps it instead of discarding that event, and the stream response exposes it as `evidence` once drained. Reading it mid-stream returns None. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| conftest.py | ||
| sdk_integration_test.py | ||
| test_chat_evidence.py | ||
| test_client.py | ||
| test_conclusions.py | ||
| test_file_uploads.py | ||
| test_metadata_caching.py | ||
| test_pagination.py | ||
| test_peer.py | ||
| test_scope_options.py | ||
| test_session.py | ||