-
Notifications
You must be signed in to change notification settings - Fork 13
Resolve TEE endpoint and TLS cert from on-chain registry #175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
kylexqian
wants to merge
7
commits into
main
Choose a base branch
from
claude/lucid-khorana
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
08ce578
feat: resolve TEE endpoint and TLS cert from on-chain registry
kylexqian bfedcae
fix: fall back to non-streaming endpoint when tool calls are requeste…
kylexqian 7057ddb
fix(tests): update client_test fixtures to mock TEERegistry and fix T…
kylexqian 7cf92d1
fix(cli): guard against empty choices in streaming loop and format to…
kylexqian 304e066
Update pyproject.toml
kylexqian 8b9cc26
fix(makefile): add system prompt to chat-tool targets to reliably tri…
kylexqian 56a1ce4
fix(makefile): use proven Dallas/Texas payload to reliably trigger GP…
kylexqian File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| [ | ||
| { | ||
| "inputs": [], | ||
| "name": "getActiveTEEs", | ||
| "outputs": [{"internalType": "bytes32[]", "name": "", "type": "bytes32[]"}], | ||
| "stateMutability": "view", | ||
| "type": "function" | ||
| }, | ||
| { | ||
| "inputs": [{"internalType": "uint8", "name": "teeType", "type": "uint8"}], | ||
| "name": "getTEEsByType", | ||
| "outputs": [{"internalType": "bytes32[]", "name": "", "type": "bytes32[]"}], | ||
| "stateMutability": "view", | ||
| "type": "function" | ||
| }, | ||
| { | ||
| "inputs": [{"internalType": "bytes32", "name": "teeId", "type": "bytes32"}], | ||
| "name": "getTEE", | ||
| "outputs": [ | ||
| { | ||
| "components": [ | ||
| {"internalType": "address", "name": "owner", "type": "address"}, | ||
| {"internalType": "address", "name": "paymentAddress", "type": "address"}, | ||
| {"internalType": "string", "name": "endpoint", "type": "string"}, | ||
| {"internalType": "bytes", "name": "publicKey", "type": "bytes"}, | ||
| {"internalType": "bytes", "name": "tlsCertificate", "type": "bytes"}, | ||
| {"internalType": "bytes32", "name": "pcrHash", "type": "bytes32"}, | ||
| {"internalType": "uint8", "name": "teeType", "type": "uint8"}, | ||
| {"internalType": "bool", "name": "active", "type": "bool"}, | ||
| {"internalType": "uint256", "name": "registeredAt", "type": "uint256"}, | ||
| {"internalType": "uint256", "name": "lastUpdatedAt", "type": "uint256"} | ||
| ], | ||
| "internalType": "struct TEERegistry.TEEInfo", | ||
| "name": "", | ||
| "type": "tuple" | ||
| } | ||
| ], | ||
| "stateMutability": "view", | ||
| "type": "function" | ||
| }, | ||
| { | ||
| "inputs": [{"internalType": "bytes32", "name": "teeId", "type": "bytes32"}], | ||
| "name": "isActive", | ||
| "outputs": [{"internalType": "bool", "name": "", "type": "bool"}], | ||
| "stateMutability": "view", | ||
| "type": "function" | ||
| } | ||
| ] |
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When the caller supplies a custom
og_llm_streaming_server_urlbut leavesog_llm_server_url=None(triggering registry lookup), both the non-streaming and streaming TLS contexts are set to the registry-pinned certificate (ssl_ctxis shared, lines 88-90 ofllm.py). However,og_llm_streaming_server_urlkeeps the caller-supplied value (line 137 ofclient.py), which may point to a different host that does not present the same certificate. This will cause TLS handshake failures when streaming.The TLS context for the streaming client should use the system CA bundle (i.e.,
True) whenog_llm_streaming_server_urlwas explicitly provided by the caller, not the registry-pinned cert.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we still have streaming_server_url, doesn't it come from the TEE registry now?