Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces a dedicated TEE connection abstraction that can periodically re-resolve TEE configuration from the on-chain registry, and updates the LLM client and tests to use that abstraction.
Changes:
- Added
tee_connection.pywithRegistryTEEConnection(background refresh + reconnect) andStaticTEEConnection(fixed URL). - Refactored
LLMto use the new connection layer (including a newLLM.from_url(...)constructor). - Added/updated tests to cover connection lifecycle, refresh behavior, and updated LLM internals.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
src/opengradient/client/tee_connection.py |
New connection abstraction with reconnect + background refresh loop. |
src/opengradient/client/llm.py |
Refactor to delegate TEE endpoint + client lifecycle to TEEConnectionInterface; adds from_url. |
src/opengradient/client/tee_registry.py |
Makes TEEEndpoint frozen/immutable. |
tests/tee_connection_test.py |
New test suite for connection lifecycle, reconnect, refresh loop, and close semantics. |
tests/llm_test.py |
Updates patching and expectations to align with the new connection layer. |
tests/client_test.py |
Updates initialization assertions to reference the new connection state. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
added 3 commits
March 26, 2026 22:02
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.
Uh oh!
There was an error while loading. Please reload this page.