Repository navigation
feat: extract shared provider substrate - #19
Conversation
19d2224 to
d7d8c96
Compare
d7d8c96 to
18c3cd2
Compare
Collection: the four new provider test files were named provider_*.py, which
pytest's default globs skip — ~1778 lines of tests never ran. Renamed to
test_provider_*.py (+67 tests now collected).
fallback: FallbackEntry.triggers gains a None "unset" state. The field default
was already ("any_error",), so `if not entry.triggers` could only ever fire on
an explicit `()` — i.e. the normalisation existed solely to destroy the
documented hard barrier. None inherits default_triggers; () survives.
anthropic: message conversion no longer raises while replaying durable history
(a raise there kills every later turn in the session, not one request).
Malformed tool arguments degrade to {}, calls missing id/name are dropped, and
a contentless assistant turn is dropped rather than emitting a zero-length text
block the API rejects.
anthropic streaming: capture signature_delta and redacted_thinking so signed
thinking replays like the non-streaming path. Adds StreamDelta.reasoning_blocks
and has the stream assembler prefer it — the flattened text channels cannot
represent a signature. Also reports reasoning_tokens on the streaming path.
protocol_client: reconcile thinking budget with max_tokens (1024 floor and
budget < max_tokens are jointly unsatisfiable below 1025; raise max_tokens
rather than emit a pair the API 400s on).
openai_responses: replay reasoning/function_call in the provider's own order —
the API pairs a reasoning item with the item that follows it, so a multi-call
turn was being replayed under a different pairing.
Consistency: reasoning_tokens uses `is not None` in all three adapters so an
explicit 0 differs from an absent field.
pause_check: recognise mapping-shaped status rows ({"status": "suspended"}),
which never matched and left suspended tasks running silently. Narrowing to str
also removes a TypeError crash path on status-less dicts.
bedrock: fall back to AWS_BEARER_TOKEN_BEDROCK and raise when still empty — the
Bearer override replaces SigV4, so ambient AWS credentials are never consulted.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Review fixes applied in 59d9c0bReviewed the diff and fixed 11 findings. All four CI gates pass: The validation line in the PR body needs updating
Renamed to Breakdown of the 1052: 924 pre-existing + 67 now-collected provider tests + 61 new regression tests. Correctness fixes
Since Worth noting this was only latent because the host forces non-streaming for
Consistency
Streamed Anthropic usage omitted reasoning tokens. The terminal Notes on the two commits pulled inThe branch was force-pushed, so this work was rebased with Reconciled with the rewritten base. One gap in 1cd2d76. The implementation looks right — task-derived affinity is no longer frozen into the SDK's One thing I looked at and judged fine: a scope resolver returning |
|
Note for anyone pinning this downstream: the description's "pin commit Worth flagging because the intermediate commits are a trap. ApodexHarness#515 is now pinned at |
Summary
Validation
uv run ruff check agent_core testsuv run pyright agent_coreuv run pytest -q(924 passed)Downstream PRs will remain stacked on each product
refactor/agent-corebranch and pin commit15996a7.