Minimal stand-in for `AsyncAnthropic` — only exposes the resource path the runner reads.
| 285 | |
| 286 | |
| 287 | class _FakeClient: |
| 288 | """Minimal stand-in for `AsyncAnthropic` — only exposes the resource path |
| 289 | the runner reads.""" |
| 290 | |
| 291 | _tracer = None |
| 292 | |
| 293 | def __init__(self, events: FakeAsyncEvents) -> None: |
| 294 | self.beta = type( |
| 295 | "_Beta", |
| 296 | (), |
| 297 | {"sessions": type("_Sessions", (), {"events": events})()}, |
| 298 | )() |
| 299 | |
| 300 | @property |
| 301 | def open_telemetry(self) -> dict[str, Any]: |
| 302 | return {} |
| 303 | |
| 304 | def with_options(self, **_options: Any) -> _FakeClient: |
| 305 | """The copy that sends a thread's tool results is this client: the fake events record every send.""" |
| 306 | return self |
| 307 | |
| 308 | |
| 309 | async def _run_with_fakes( |
no outgoing calls