Skip to content

Remove the unused nonstreaming adapter path - #92

Merged
easel merged 2 commits into
mainfrom
claude/remove-nonstreaming-path
Nov 9, 2026
Merged

easel merged 2 commits into
mainfrom
claude/remove-nonstreaming-path

Conversation

@easel

@easel easel commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Tether's model port only streams: every production call goes through stream() and sends stream: true. OpenAIAdapter._retry, _once and the nonstreaming request_native were called only from their own tests. This PR deletes them (about 180 lines).

  • Removed _retry and _once from src/tether/adapters/pydantic_ai/compatible.py, request_native from native.py, and the two tests that called _retry.
  • Added test_stream_does_not_retry_a_permanent_status, which covers the one case only those tests checked (HTTP 400 is not retried). The stream tests already cover recovery after a transient failure and running out of attempts.
  • Kept the fallback for a server that ignores stream: true and returns one JSON body: it still gets strict body validation and becomes one whole-text delta.
  • Corrected docs that still described the native adapter as nonstreaming: AGENTS.md, architecture.md, CONTRACT-001 and the ADR-013 gateway-dialect bullet. The dated evidence JSON files are left as historical records.

Checks

Locally: ruff, pyright, shape ceilings, layer and dependency checks pass, and 159 adapter, wire and Databricks tests pass. The full make check is left to CI, because this machine is heavily loaded and timing-sensitive tests flake here.

🤖 Generated with Claude Code

easel and others added 2 commits November 8, 2026 17:17
The model port only streams, and nothing outside tests called
OpenAIAdapter._retry, _once or the nonstreaming request_native. Delete them
and their two direct tests; a streaming test now covers the one case only
they checked, that a permanent HTTP 400 is not retried. A server that answers
a streaming request with one JSON body still gets strict body validation.

Docs that still described the native adapter as nonstreaming now say it only
streams.

Co-authored-by: Erik LaBianca <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Keep the 'adapter only streams' wording in ADR-013 alongside main's
gateway JSON-body observation and the new cache-count bullet.

Co-authored-by: Erik LaBianca <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
@easel
easel merged commit 369f8b7 into main Nov 9, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant