Repository navigation
Remove the unused nonstreaming adapter path - #92
Merged
Merged
Conversation
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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Tether's model port only streams: every production call goes through
stream()and sendsstream: true.OpenAIAdapter._retry,_onceand the nonstreamingrequest_nativewere called only from their own tests. This PR deletes them (about 180 lines)._retryand_oncefromsrc/tether/adapters/pydantic_ai/compatible.py,request_nativefromnative.py, and the two tests that called_retry.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.stream: trueand returns one JSON body: it still gets strict body validation and becomes one whole-text delta.Checks
Locally: ruff, pyright, shape ceilings, layer and dependency checks pass, and 159 adapter, wire and Databricks tests pass. The full
make checkis left to CI, because this machine is heavily loaded and timing-sensitive tests flake here.🤖 Generated with Claude Code